mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-25 08:28:50 -05:00
More cleanup
This commit is contained in:
parent
e87c69647c
commit
3a6ac2a16a
@ -239,7 +239,7 @@ public class EncryptActivity extends DrawerActivity implements EncryptActivityIn
|
|||||||
|
|
||||||
if (mShareAfterEncrypt) {
|
if (mShareAfterEncrypt) {
|
||||||
// Share encrypted message/file
|
// Share encrypted message/file
|
||||||
startActivity(sendWithChooserExcludingOpenKeychain(message));
|
startActivity(sendWithChooserExcludingEncrypt(message));
|
||||||
} else if (isContentMessage()) {
|
} else if (isContentMessage()) {
|
||||||
// Copy to clipboard
|
// Copy to clipboard
|
||||||
copyToClipboard(message);
|
copyToClipboard(message);
|
||||||
@ -308,17 +308,18 @@ public class EncryptActivity extends DrawerActivity implements EncryptActivityIn
|
|||||||
* @param message
|
* @param message
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Intent sendWithChooserExcludingOpenKeychain(Message message) {
|
private Intent sendWithChooserExcludingEncrypt(Message message) {
|
||||||
Intent prototype = createSendIntent(message);
|
Intent prototype = createSendIntent(message);
|
||||||
|
|
||||||
String title = isContentMessage() ? getString(R.string.title_share_message)
|
String title = isContentMessage() ? getString(R.string.title_share_message)
|
||||||
: getString(R.string.title_share_file);
|
: getString(R.string.title_share_file);
|
||||||
|
|
||||||
// somehow this returns lists with only one entry on Android 2.3
|
// fallback on Android 2.3, otherwise we would get weird results
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
||||||
return Intent.createChooser(prototype, title);
|
return Intent.createChooser(prototype, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prevent recursion aka Inception :P
|
||||||
String[] blacklist = new String[]{Constants.PACKAGE_NAME + ".ui.EncryptActivity"};
|
String[] blacklist = new String[]{Constants.PACKAGE_NAME + ".ui.EncryptActivity"};
|
||||||
|
|
||||||
List<LabeledIntent> targetedShareIntents = new ArrayList<LabeledIntent>();
|
List<LabeledIntent> targetedShareIntents = new ArrayList<LabeledIntent>();
|
||||||
|
Loading…
Reference in New Issue
Block a user