moved some Intent extra constants into more appropriate places, some basic preparations to test thread-pausing during decryption/encryption to deal with certain situations, mainly an unknown signature key
This commit is contained in:
@@ -509,7 +509,7 @@ public class DecryptActivity extends BaseActivity {
|
||||
OutputStream out = mDataDestination.getOutputStream(this);
|
||||
|
||||
if (mSignedOnly) {
|
||||
data = Apg.verifyText(this, in, out, this);
|
||||
data = Apg.verifyText(this, in, out, this, getRunningThread(), getHandler());
|
||||
} else {
|
||||
data = Apg.decrypt(this, in, out, Apg.getCachedPassPhrase(getSecretKeyId()),
|
||||
this, mAssumeSymmetricEncryption);
|
||||
@@ -539,7 +539,7 @@ public class DecryptActivity extends BaseActivity {
|
||||
error = "" + e;
|
||||
}
|
||||
|
||||
data.putInt(Apg.EXTRA_STATUS, Id.message.done);
|
||||
data.putInt(Constants.extras.status, Id.message.done);
|
||||
|
||||
if (error != null) {
|
||||
data.putString(Apg.EXTRA_ERROR, error);
|
||||
@@ -549,6 +549,19 @@ public class DecryptActivity extends BaseActivity {
|
||||
sendMessage(msg);
|
||||
}
|
||||
|
||||
public void handlerCallback(Message msg) {
|
||||
Bundle data = msg.getData();
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.getInt(Constants.extras.status) == Id.message.unknown_signature_key) {
|
||||
|
||||
}
|
||||
|
||||
super.handlerCallback(msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doneCallback(Message msg) {
|
||||
super.doneCallback(msg);
|
||||
|
||||
Reference in New Issue
Block a user