summaryrefslogtreecommitdiffstats
path: root/keystore/java
diff options
context:
space:
mode:
Diffstat (limited to 'keystore/java')
-rw-r--r--keystore/java/android/security/KeyStore.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java
index a47534b..0a2fe4c 100644
--- a/keystore/java/android/security/KeyStore.java
+++ b/keystore/java/android/security/KeyStore.java
@@ -172,8 +172,10 @@ public class KeyStore {
socket.shutdownOutput();
InputStream in = socket.getInputStream();
- code = in.read();
- if (code == -1) {
+ if ((code = in.read()) != NO_ERROR) {
+ if (code != -1) {
+ mError = code;
+ }
return null;
}
@@ -194,7 +196,7 @@ public class KeyStore {
}
results.add(result);
}
- mError = code;
+ mError = NO_ERROR;
return results.toArray(new byte[results.size()][]);
} catch (IOException e) {
// ignore