Fixed a crash on ViewKeyActivity

This occurs when deleting a key with a stripped master key from the
ViewKeyActivity.
This commit is contained in:
Manoj Khanna
2015-03-18 17:53:24 +05:30
parent 0bcc2793c3
commit d122d27eba
2 changed files with 53 additions and 57 deletions

View File

@@ -47,21 +47,6 @@ public class ExportHelper {
this.mActivity = activity;
}
public void deleteKey(Uri dataUri, Handler deleteHandler) {
try {
long masterKeyId = new ProviderHelper(mActivity).getCachedPublicKeyRing(dataUri)
.extractOrGetMasterKeyId();
// Create a new Messenger for the communication back
Messenger messenger = new Messenger(deleteHandler);
DeleteKeyDialogFragment deleteKeyDialog = DeleteKeyDialogFragment.newInstance(messenger,
new long[]{ masterKeyId });
deleteKeyDialog.show(mActivity.getSupportFragmentManager(), "deleteKeyDialog");
} catch (PgpKeyNotFoundException e) {
Log.e(Constants.TAG, "key not found!", e);
}
}
/**
* Show dialog where to export keys
*/