diff options
author | Alex Klyubin <klyubin@google.com> | 2015-05-29 12:39:32 -0700 |
---|---|---|
committer | Alex Klyubin <klyubin@google.com> | 2015-05-29 12:41:22 -0700 |
commit | 96d7245c00be386355ec583ac980b024b223218b (patch) | |
tree | d86071b29a4e29244181bd6914b99f8016c24676 /keystore/java | |
parent | 614b39f3de7747e9e1cd00d8985ec6fa9b356217 (diff) | |
download | frameworks_base-96d7245c00be386355ec583ac980b024b223218b.zip frameworks_base-96d7245c00be386355ec583ac980b024b223218b.tar.gz frameworks_base-96d7245c00be386355ec583ac980b024b223218b.tar.bz2 |
Cleanup Binder token resetting.
This is a follow-up to 7cbcfd4fc1e538bd391a20cdd00dd1494ace2d0e where
during the review it was pointed out that the code could be
streamlined.
Bug: 18088752
Change-Id: Iecb9fdbc31a0f3cdcb94ddb1b3e7e12a0543a231
Diffstat (limited to 'keystore/java')
-rw-r--r-- | keystore/java/android/security/keystore/AndroidKeyStoreCipherSpiBase.java | 3 | ||||
-rw-r--r-- | keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreCipherSpiBase.java b/keystore/java/android/security/keystore/AndroidKeyStoreCipherSpiBase.java index 4104dcc..be935a9 100644 --- a/keystore/java/android/security/keystore/AndroidKeyStoreCipherSpiBase.java +++ b/keystore/java/android/security/keystore/AndroidKeyStoreCipherSpiBase.java @@ -162,7 +162,6 @@ abstract class AndroidKeyStoreCipherSpiBase extends CipherSpi implements KeyStor protected void resetAll() { IBinder operationToken = mOperationToken; if (operationToken != null) { - mOperationToken = null; mKeyStore.abort(operationToken); } mEncrypting = false; @@ -186,9 +185,9 @@ abstract class AndroidKeyStoreCipherSpiBase extends CipherSpi implements KeyStor protected void resetWhilePreservingInitState() { IBinder operationToken = mOperationToken; if (operationToken != null) { - mOperationToken = null; mKeyStore.abort(operationToken); } + mOperationToken = null; mOperationHandle = 0; mMainDataStreamer = null; mCachedException = null; diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java index b82a7f5..6422374 100644 --- a/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java +++ b/keystore/java/android/security/keystore/AndroidKeyStoreHmacSpi.java @@ -128,9 +128,9 @@ public abstract class AndroidKeyStoreHmacSpi extends MacSpi implements KeyStoreC mKey = null; IBinder operationToken = mOperationToken; if (operationToken != null) { - mOperationToken = null; mKeyStore.abort(operationToken); } + mOperationToken = null; mOperationHandle = 0; mChunkedStreamer = null; } @@ -138,9 +138,9 @@ public abstract class AndroidKeyStoreHmacSpi extends MacSpi implements KeyStoreC private void resetWhilePreservingInitState() { IBinder operationToken = mOperationToken; if (operationToken != null) { - mOperationToken = null; mKeyStore.abort(operationToken); } + mOperationToken = null; mOperationHandle = 0; mChunkedStreamer = null; } |