Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dee47fbf authored by Eric Biggers's avatar Eric Biggers Committed by Android (Google) Code Review
Browse files

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

parents df35caa5 8f3ca8da
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1103,8 +1103,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();
            }
+7 −2
Original line number Diff line number Diff line
@@ -898,8 +898,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();
            }