am ea09a5b6: Merge change 26791 into eclair

Merge commit 'ea09a5b662e141a1d05c2fa6accd914f7f5904bc' into eclair-plus-aosp

* commit 'ea09a5b662e141a1d05c2fa6accd914f7f5904bc':
  KeyStore: return null when response code indicates an error.
This commit is contained in:
Chia-chi Yeh
2009-09-23 22:44:40 -07:00
committed by Android Git Automerger

View File

@@ -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