mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-25 15:32:52 +00:00
Force file picker
This commit is contained in:
parent
8e5d431d1f
commit
60b7ef78b7
3 changed files with 3 additions and 6 deletions
|
@ -375,9 +375,6 @@ public class ApplicationEx extends Application
|
||||||
if (version < BuildConfig.VERSION_CODE)
|
if (version < BuildConfig.VERSION_CODE)
|
||||||
editor.remove("crash_report_count");
|
editor.remove("crash_report_count");
|
||||||
|
|
||||||
if (!BuildConfig.DEBUG)
|
|
||||||
editor.remove("photo_picker");
|
|
||||||
|
|
||||||
if (!BuildConfig.TEST_RELEASE)
|
if (!BuildConfig.TEST_RELEASE)
|
||||||
editor.remove("test1").remove("test2").remove("test3").remove("test4").remove("test5");
|
editor.remove("test1").remove("test2").remove("test3").remove("test4").remove("test5");
|
||||||
|
|
||||||
|
|
|
@ -3525,7 +3525,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
intent.setType("image/*");
|
intent.setType("*/*");
|
||||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
|
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
|
||||||
if (intent.resolveActivity(pm) == null) // GET_CONTENT whitelisted
|
if (intent.resolveActivity(pm) == null) // GET_CONTENT whitelisted
|
||||||
noStorageAccessFramework();
|
noStorageAccessFramework();
|
||||||
|
@ -3584,7 +3584,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
EntityAttachment attachment = addAttachment(context, id, uri, type, image, resize, privacy);
|
EntityAttachment attachment = addAttachment(context, id, uri, type, image, resize, privacy);
|
||||||
if (attachment == null)
|
if (attachment == null)
|
||||||
continue;
|
continue;
|
||||||
if (!image)
|
if (!image || !attachment.isImage())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
File file = attachment.getFile(context);
|
File file = attachment.getFile(context);
|
||||||
|
|
|
@ -519,7 +519,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
swPhotoPicker.setVisibility(Helper.hasPhotoPicker() && BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
|
swPhotoPicker.setVisibility(Helper.hasPhotoPicker() ? View.VISIBLE : View.GONE);
|
||||||
swPhotoPicker.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
swPhotoPicker.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
|
Loading…
Reference in a new issue