decrypt: always show "View in OpenKeychain" as intent chooser option iff isLikelyText
This commit is contained in:
@@ -591,6 +591,18 @@ public class DecryptListFragment
|
|||||||
|
|
||||||
Intent chooserIntent = Intent.createChooser(intent, getString(R.string.intent_show));
|
Intent chooserIntent = Intent.createChooser(intent, getString(R.string.intent_show));
|
||||||
chooserIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
chooserIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
|
|
||||||
|
if (!share && metadata.isLooksLikeText()) {
|
||||||
|
LabeledIntent internalIntent = new LabeledIntent(
|
||||||
|
new Intent(intent)
|
||||||
|
.setClass(activity, DisplayTextActivity.class)
|
||||||
|
.putExtra(DisplayTextActivity.EXTRA_RESULT, result.mDecryptVerifyResult)
|
||||||
|
.putExtra(DisplayTextActivity.EXTRA_METADATA, metadata),
|
||||||
|
BuildConfig.APPLICATION_ID, R.string.view_internal, R.mipmap.ic_launcher);
|
||||||
|
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS,
|
||||||
|
new Parcelable[] { internalIntent });
|
||||||
|
}
|
||||||
|
|
||||||
startActivity(chooserIntent);
|
startActivity(chooserIntent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user