mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-04 16:25:05 -05:00
Disable sharing chooser blacklisting for lollipop
This commit is contained in:
parent
09e992081b
commit
3ac466c9db
@ -111,7 +111,7 @@ public class DecryptTextFragment extends DecryptFragment {
|
|||||||
Intent prototype = createSendIntent(text);
|
Intent prototype = createSendIntent(text);
|
||||||
String title = getString(R.string.title_share_file);
|
String title = getString(R.string.title_share_file);
|
||||||
|
|
||||||
// we don't want to decrypt the decypted, no inception ;)
|
// we don't want to decrypt the decrypted, no inception ;)
|
||||||
String[] blacklist = new String[]{
|
String[] blacklist = new String[]{
|
||||||
Constants.PACKAGE_NAME + ".ui.DecryptTextActivity",
|
Constants.PACKAGE_NAME + ".ui.DecryptTextActivity",
|
||||||
"org.thialfihar.android.apg.ui.DecryptActivity"
|
"org.thialfihar.android.apg.ui.DecryptActivity"
|
||||||
|
@ -247,6 +247,7 @@ public class EncryptTextActivity extends EncryptActivity implements EncryptActiv
|
|||||||
users.add(userId[1]);
|
users.add(userId[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// pass trough email addresses as extra for email applications
|
||||||
sendIntent.putExtra(Intent.EXTRA_EMAIL, users.toArray(new String[users.size()]));
|
sendIntent.putExtra(Intent.EXTRA_EMAIL, users.toArray(new String[users.size()]));
|
||||||
}
|
}
|
||||||
return sendIntent;
|
return sendIntent;
|
||||||
|
@ -43,9 +43,11 @@ public class ShareHelper {
|
|||||||
* Put together from some stackoverflow posts...
|
* Put together from some stackoverflow posts...
|
||||||
*/
|
*/
|
||||||
public Intent createChooserExcluding(Intent prototype, String title, String[] activityBlacklist) {
|
public Intent createChooserExcluding(Intent prototype, String title, String[] activityBlacklist) {
|
||||||
// Produced an empty list on Huawei U8860 with Android Version 4.0.3 and weird results on 2.3
|
// Produced an empty list on Huawei U8860 with Android Version 4.0.3
|
||||||
// TODO: test on 4.1, 4.2, 4.3, only tested on 4.4
|
// TODO: test on 4.1, 4.2, 4.3, only tested on 4.4
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
|
// Disabled on 5.0 because using EXTRA_INITIAL_INTENTS prevents the usage based sorting
|
||||||
|
// introduced in 5.0: https://medium.com/@xXxXxXxXxXam/how-lollipops-share-menu-is-organized-d204888f606d
|
||||||
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT || Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
return Intent.createChooser(prototype, title);
|
return Intent.createChooser(prototype, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user