prevent cancel dring consolidate, move logic into progressable
This commit is contained in:
@@ -472,8 +472,7 @@ public class KeychainIntentService extends IntentService implements Progressable
|
||||
|
||||
// Special: consolidate on secret key import (cannot be cancelled!)
|
||||
if (result.mSecret > 0) {
|
||||
// cannot cancel from here on out!
|
||||
sendMessageToHandler(KeychainIntentServiceHandler.MESSAGE_PREVENT_CANCEL);
|
||||
// TODO move this into the import operation
|
||||
providerHelper.consolidateDatabaseStep1(this);
|
||||
}
|
||||
|
||||
@@ -676,6 +675,11 @@ public class KeychainIntentService extends IntentService implements Progressable
|
||||
setProgress(null, progress, max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPreventCancel() {
|
||||
sendMessageToHandler(KeychainIntentServiceHandler.MESSAGE_PREVENT_CANCEL);
|
||||
}
|
||||
|
||||
private InputData createDecryptInputData(Bundle data) throws IOException, PgpGeneralException {
|
||||
return createCryptInputData(data, DECRYPT_CIPHERTEXT_BYTES);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user