fail with warning if we get data from the AOSP mail client (see #290)

This commit is contained in:
Vincent Breitmoser
2015-09-16 21:03:49 +02:00
parent 5e0c40346e
commit d5bde6997e
2 changed files with 12 additions and 1 deletions

View File

@@ -159,7 +159,17 @@ public class DecryptActivity extends BaseActivity {
canDelete = true;
case OpenKeychainIntents.DECRYPT_DATA:
default:
uris.add(intent.getData());
Uri uri = intent.getData();
if (uri != null) {
if ("com.android.email.attachmentprovider".equals(uri.getHost())) {
Toast.makeText(this, R.string.error_reading_aosp, Toast.LENGTH_LONG).show();
finish();
return;
}
uris.add(intent.getData());
}
}