Open decrypted application/pgp-keys only in OpenKeychain

This commit is contained in:
Dominik Schürmann
2015-10-15 16:48:24 +02:00
parent 759ffc5a4b
commit 6ea89a0892

View File

@@ -533,6 +533,11 @@ public class DecryptListFragment
} else { } else {
intent = new Intent(Intent.ACTION_VIEW); intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(outputUri, metadata.getMimeType()); intent.setDataAndType(outputUri, metadata.getMimeType());
if ("application/pgp-keys".equals(metadata.getMimeType())) {
// bind Intent to this OpenKeychain, don't allow other apps to intercept here!
intent.setPackage(getActivity().getPackageName());
}
} }
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);