From 4f74aaed15599a7f3edc6ebfdbebc791babbf9de Mon Sep 17 00:00:00 2001 From: misaochan Date: Wed, 7 Feb 2018 20:04:28 +1000 Subject: [PATCH] Improve debug logging in ContributionController --- .../free/nrw/commons/contributions/ContributionController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/fr/free/nrw/commons/contributions/ContributionController.java b/app/src/main/java/fr/free/nrw/commons/contributions/ContributionController.java index c6d27be5a..0e193f693 100644 --- a/app/src/main/java/fr/free/nrw/commons/contributions/ContributionController.java +++ b/app/src/main/java/fr/free/nrw/commons/contributions/ContributionController.java @@ -80,11 +80,12 @@ public class ContributionController { //FIXME: Starts gallery (opens Google Photos) Intent pickImageIntent = new Intent(ACTION_GET_CONTENT); pickImageIntent.setType("image/*"); - Timber.d("startGalleryPick() called with pickImageIntent"); // See https://stackoverflow.com/questions/22366596/android-illegalstateexception-fragment-not-attached-to-activity-webview if (!fragment.isAdded()) { + Timber.d("Fragment is not added, startActivityForResult cannot be called"); return; } + Timber.d("startGalleryPick() called with pickImageIntent"); fragment.startActivityForResult(pickImageIntent, SELECT_FROM_GALLERY); }