RESTRICT AUTOMERGE: Catch exceptions from setLockCredential() am: 50f93771bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24297965 Change-Id: I527deaf07af54d6aba582898d29c06c957eff994 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user