Merge "RESTRICT AUTOMERGE: Catch exceptions from setLockCredential()" into udc-qpr-dev

This commit is contained in:
Eric Biggers
2023-08-08 00:50:18 +00:00
committed by Android (Google) Code Review

View File

@@ -107,9 +107,14 @@ public class SaveAndFinishWorker extends Fragment {
@VisibleForTesting @VisibleForTesting
Pair<Boolean, Intent> saveAndVerifyInBackground() { Pair<Boolean, Intent> saveAndVerifyInBackground() {
final int userId = mUserId; final int userId = mUserId;
try {
if (!mUtils.setLockCredential(mChosenCredential, mCurrentCredential, userId)) { if (!mUtils.setLockCredential(mChosenCredential, mCurrentCredential, userId)) {
return Pair.create(false, null); return Pair.create(false, null);
} }
} catch (RuntimeException e) {
Log.e(TAG, "Failed to set lockscreen credential", e);
return Pair.create(false, null);
}
unifyProfileCredentialIfRequested(); unifyProfileCredentialIfRequested();