remove the most probably the buggiest calls ever

This commit is contained in:
Mohamed Zenadi 2017-07-25 18:24:47 +01:00
parent 7e7a98e80a
commit 5119ae1b8e

View file

@ -394,9 +394,11 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
protected void onActivityResult(int requestCode, int resultCode, Intent data) { protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
Log.d(Constants.TAG, "onActivityResult resultCode: " + resultCode); Log.d(Constants.TAG, "onActivityResult resultCode: " + resultCode);
if (data == null) { if (data == null) {
setResult(RESULT_CANCELED, null); setResult(RESULT_CANCELED, null);
finish(); finish();
return;
} }
// try again after user interaction // try again after user interaction
@ -408,14 +410,6 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
* interaction, for example selected key ids. * interaction, for example selected key ids.
*/ */
switch (requestCode) { switch (requestCode) {
case REQUEST_CODE_ENCRYPT: {
encrypt(data);
break;
}
case REQUEST_CODE_DECRYPT_AND_VERIFY: {
decryptAndVerify(data);
break;
}
case REQUEST_CODE_GET_KEY_IDS: case REQUEST_CODE_GET_KEY_IDS:
getKeyIds(data); getKeyIds(data);
break; break;
@ -423,6 +417,9 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
edit(data); edit(data);
break; break;
} }
default:
setResult(RESULT_OK);
finish();
} }
} else if (resultCode == RESULT_CANCELED) { } else if (resultCode == RESULT_CANCELED) {
setResult(RESULT_CANCELED, data); setResult(RESULT_CANCELED, data);