From 4494d0bdf73971f6f1e34a78fad70d998384991f Mon Sep 17 00:00:00 2001 From: Kaartic Sivaraam Date: Mon, 4 Sep 2023 07:02:04 +0530 Subject: [PATCH] Potential fix for get_content picker being used in first run The initial state of the 'openDocumentPhotoPickerPref' seems to be incorrect during a fresh install on some devices. Try to ensure we always use the proper initial state by propagating the default to the preference access code. This hopefully fixes #5274 --- .../free/nrw/commons/contributions/ContributionController.java | 2 +- 1 file changed, 1 insertion(+), 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 e4cc0e55f..755766fd4 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 @@ -171,7 +171,7 @@ public class ContributionController { */ private void initiateGalleryUpload(final Activity activity, final boolean allowMultipleUploads) { setPickerConfiguration(activity, allowMultipleUploads); - boolean openDocumentIntentPreferred = defaultKvStore.getBoolean("openDocumentPhotoPickerPref"); + boolean openDocumentIntentPreferred = defaultKvStore.getBoolean("openDocumentPhotoPickerPref", true); FilePicker.openGallery(activity, 0, openDocumentIntentPreferred); }