diff options
author | Kenny Root <kroot@google.com> | 2013-02-04 17:35:35 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-02-04 17:35:35 -0800 |
commit | 887c523646012f4f0b63f5ffd0a1e9ebc3c2bdf1 (patch) | |
tree | 4502db46424fe9c82fa96eb7ccb264999c59d5c7 /keystore/java | |
parent | c4a768c87e03a5e6d8b4435aaca6893546006321 (diff) | |
parent | 74637db21eb0b3c0167378e2b5c866fdc02e51f2 (diff) | |
download | frameworks_base-887c523646012f4f0b63f5ffd0a1e9ebc3c2bdf1.zip frameworks_base-887c523646012f4f0b63f5ffd0a1e9ebc3c2bdf1.tar.gz frameworks_base-887c523646012f4f0b63f5ffd0a1e9ebc3c2bdf1.tar.bz2 |
am 74637db2: Merge "AndroidKeyStore: return error code on error"
# Via Gerrit Code Review (1) and Kenny Root (1)
* commit '74637db21eb0b3c0167378e2b5c866fdc02e51f2':
AndroidKeyStore: return error code on error
Diffstat (limited to 'keystore/java')
-rw-r--r-- | keystore/java/android/security/KeyStore.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java index 444dc1d..ceaff37 100644 --- a/keystore/java/android/security/KeyStore.java +++ b/keystore/java/android/security/KeyStore.java @@ -243,7 +243,12 @@ public class KeyStore { */ public long getmtime(String key) { try { - return mBinder.getmtime(key) * 1000L; + final long millis = mBinder.getmtime(key); + if (millis == -1L) { + return -1L; + } + + return millis * 1000L; } catch (RemoteException e) { Log.w(TAG, "Cannot connect to keystore", e); return -1L; |