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

Commit 6c3de300 authored by Eric Biggers's avatar Eric Biggers
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
parent b7c9cfd6
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -873,7 +873,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,
@@ -885,8 +884,6 @@ public class ChooseLockPattern extends SettingsActivity {
            mChosenPattern = chosenPattern;
            mUserId = userId;

            mLockVirgin = !mUtils.isPatternEverChosen(mUserId);

            start();
        }

@@ -917,14 +914,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);
        }
    }
}