mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-25 07:23:03 +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)
|
||||
editor.remove("crash_report_count");
|
||||
|
||||
if (!BuildConfig.DEBUG)
|
||||
editor.remove("photo_picker");
|
||||
|
||||
if (!BuildConfig.TEST_RELEASE)
|
||||
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.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.setType("image/*");
|
||||
intent.setType("*/*");
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
|
||||
if (intent.resolveActivity(pm) == null) // GET_CONTENT whitelisted
|
||||
noStorageAccessFramework();
|
||||
|
@ -3584,7 +3584,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
EntityAttachment attachment = addAttachment(context, id, uri, type, image, resize, privacy);
|
||||
if (attachment == null)
|
||||
continue;
|
||||
if (!image)
|
||||
if (!image || !attachment.isImage())
|
||||
continue;
|
||||
|
||||
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() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
|
|
Loading…
Reference in a new issue