summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rubin Xu <rubinxu@google.com> 2020-02-10 17:49:29 +0000
committer Rubin Xu <rubinxu@google.com> 2020-02-10 17:53:36 +0000
commit95f3c1dbc20ac2ab8990e5ab213238679bd21c23 (patch)
tree359d31609d8136f3774d3e1afeb2aca5b77247ed
parent66660415890d105449d3227ffa0139ddd0f67d6d (diff)
Throw exception when gatekeeper fails
This is a non-recoverable system internal error and let's make the failure loud and clear. Bug: 148159520 Test: atest com.android.server.locksettings Change-Id: I38737113d9d06862077b873548dbdfe025578cdd
-rw-r--r--services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
index b726e571cf0c..ac49fa293fe7 100644
--- a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
+++ b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
@@ -590,8 +590,8 @@ public class SyntheticPasswordManager {
throw new IllegalStateException("Failed to create new SID for user", e);
}
if (response.getResponseCode() != GateKeeperResponse.RESPONSE_OK) {
- Slog.e(TAG, "Fail to create new SID for user " + userId);
- return;
+ throw new IllegalStateException("Fail to create new SID for user " + userId
+ + " response: " + response.getResponseCode());
}
saveSyntheticPasswordHandle(response.getPayload(), userId);
}