RESTRICT AUTOMERGE: Catch exceptions from setLockCredential() am: e0b5a793a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24301337 Change-Id: I8607f271c5daf117b25502b572598e48dc2de30f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1048,8 +1048,13 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
|
||||
@Override
|
||||
protected Pair<Boolean, Intent> saveAndVerifyInBackground() {
|
||||
final boolean success = mUtils.setLockCredential(
|
||||
mChosenPassword, mCurrentCredential, mUserId);
|
||||
boolean success;
|
||||
try {
|
||||
success = mUtils.setLockCredential(mChosenPassword, mCurrentCredential, mUserId);
|
||||
} catch (RuntimeException e) {
|
||||
Log.e(TAG, "Failed to set lockscreen credential", e);
|
||||
success = false;
|
||||
}
|
||||
if (success) {
|
||||
unifyProfileCredentialIfRequested();
|
||||
}
|
||||
|
@@ -909,8 +909,13 @@ public class ChooseLockPattern extends SettingsActivity {
|
||||
@Override
|
||||
protected Pair<Boolean, Intent> saveAndVerifyInBackground() {
|
||||
final int userId = mUserId;
|
||||
final boolean success = mUtils.setLockCredential(mChosenPattern, mCurrentCredential,
|
||||
userId);
|
||||
boolean success;
|
||||
try {
|
||||
success = mUtils.setLockCredential(mChosenPattern, mCurrentCredential, userId);
|
||||
} catch (RuntimeException e) {
|
||||
Log.e(TAG, "Failed to set lockscreen credential", e);
|
||||
success = false;
|
||||
}
|
||||
if (success) {
|
||||
unifyProfileCredentialIfRequested();
|
||||
}
|
||||
|
Reference in New Issue
Block a user