Disable photo picker for new installations

pull/209/head
M66B 3 years ago
parent 974488d715
commit 689cbc8330

@ -653,6 +653,10 @@ public class ApplicationEx extends Application
editor.putBoolean("doubletap", true); editor.putBoolean("doubletap", true);
} else if (version < 1960) } else if (version < 1960)
editor.remove("sqlite_auto_vacuum"); editor.remove("sqlite_auto_vacuum");
else if (version < 1961) {
if (!prefs.contains("photo_picker"))
editor.putBoolean("photo_picker", true);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)
editor.remove("background_service"); editor.remove("background_service");

@ -3051,7 +3051,7 @@ public class FragmentCompose extends FragmentBase {
// https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES // https://developer.android.com/reference/android/provider/MediaStore#ACTION_PICK_IMAGES
// Android 12: cmd device_config put storage_native_boot picker_intent_enabled true // Android 12: cmd device_config put storage_native_boot picker_intent_enabled true
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean photo_picker = prefs.getBoolean("photo_picker", true); boolean photo_picker = prefs.getBoolean("photo_picker", false);
Intent picker = new Intent(MediaStore.ACTION_PICK_IMAGES); Intent picker = new Intent(MediaStore.ACTION_PICK_IMAGES);
picker.setType("image/*"); picker.setType("image/*");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&

@ -558,7 +558,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
etDefaultSnooze.setText(default_snooze == 1 ? null : Integer.toString(default_snooze)); etDefaultSnooze.setText(default_snooze == 1 ? null : Integer.toString(default_snooze));
etDefaultSnooze.setHint("1"); etDefaultSnooze.setHint("1");
swPhotoPicker.setChecked(prefs.getBoolean("photo_picker", true)); swPhotoPicker.setChecked(prefs.getBoolean("photo_picker", false));
swPull.setChecked(prefs.getBoolean("pull", true)); swPull.setChecked(prefs.getBoolean("pull", true));
swAutoScroll.setChecked(prefs.getBoolean("autoscroll", false)); swAutoScroll.setChecked(prefs.getBoolean("autoscroll", false));

Loading…
Cancel
Save