mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-29 17:11:12 +01:00
Workaround for default intent chooser bug
This commit is contained in:
@@ -122,6 +122,14 @@ public class Helper {
|
||||
}
|
||||
}
|
||||
|
||||
static Intent getChooser(Context context, Intent intent) {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
if (pm.queryIntentActivities(intent, 0).size() == 1)
|
||||
return intent;
|
||||
else
|
||||
return Intent.createChooser(intent, context.getString(R.string.title_select_app));
|
||||
}
|
||||
|
||||
static Intent getIntentPrivacy() {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse("https://email.faircode.eu/privacy/"));
|
||||
|
||||
Reference in New Issue
Block a user