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

Commit 250f2727 authored by Eric Biggers's avatar Eric Biggers Committed by Chun-Wei Wang
Browse files

ChooseLockPattern: remove redundant setting of visible pattern default

Remove the code that set LOCK_PATTERN_VISIBLE to true the first time a
pattern was set, since LOCK_PATTERN_VISIBLE now defaults to true when
unset (ag/22912136).  The explicit defaulting to true was only needed
before because the low-level default value was wrong.

Bug: 270013005
Test: Set a pattern.  Verified that Keyguard uses visible pattern.
      Disabled the "Make pattern visible" option in Settings.  Verified
      that Keyguard doesn't use visible pattern.
Change-Id: I63f29c68f9a508fee0ee2f03f2cca33317fb8a32
Merged-In: I63f29c68f9a508fee0ee2f03f2cca33317fb8a32
(cherry picked from commit 6c3de300)
parent 2070808a
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -872,7 +872,6 @@ public class ChooseLockPattern extends SettingsActivity {

        private LockscreenCredential mChosenPattern;
        private LockscreenCredential mCurrentCredential;
        private boolean mLockVirgin;

        public void start(LockPatternUtils utils, boolean requestGatekeeperPassword,
                LockscreenCredential chosenPattern, LockscreenCredential currentCredential,
@@ -884,8 +883,6 @@ public class ChooseLockPattern extends SettingsActivity {
            mChosenPattern = chosenPattern;
            mUserId = userId;

            mLockVirgin = !mUtils.isPatternEverChosen(mUserId);

            start();
        }

@@ -916,14 +913,5 @@ public class ChooseLockPattern extends SettingsActivity {
            }
            return Pair.create(success, result);
        }

        @Override
        protected void finish(Intent resultData) {
            if (mLockVirgin) {
                mUtils.setVisiblePatternEnabled(true, mUserId);
            }

            super.finish(resultData);
        }
    }
}