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
This commit is contained in:
Rubin Xu
2020-02-10 17:49:29 +00:00
parent 6666041589
commit 95f3c1dbc2

View File

@@ -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);
}