summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2013-02-04 17:39:13 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-02-04 17:39:13 -0800
commit791fc1669d14c046fc9a723b847ec8d3af0b1787 (patch)
tree31eb947ea19c6f2918472ab02fee7e08406485fb
parentebbdbe6488af7aa6de40d44e4c5952fc1381b483 (diff)
parent2697f082010c9eb34298dbe7b5c4967d745709d2 (diff)
downloadframeworks_base-791fc1669d14c046fc9a723b847ec8d3af0b1787.zip
frameworks_base-791fc1669d14c046fc9a723b847ec8d3af0b1787.tar.gz
frameworks_base-791fc1669d14c046fc9a723b847ec8d3af0b1787.tar.bz2
am 2697f082: am 887c5236: am 74637db2: Merge "AndroidKeyStore: return error code on error"
# Via Android Git Automerger (2) and others * commit '2697f082010c9eb34298dbe7b5c4967d745709d2': AndroidKeyStore: return error code on error
-rw-r--r--keystore/java/android/security/KeyStore.java7
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;