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 6c3de30086
)
This commit is contained in:
committed by
Chun-Wei Wang
parent
2070808a62
commit
250f2727b0
@@ -872,7 +872,6 @@ public class ChooseLockPattern extends SettingsActivity {
|
|||||||
|
|
||||||
private LockscreenCredential mChosenPattern;
|
private LockscreenCredential mChosenPattern;
|
||||||
private LockscreenCredential mCurrentCredential;
|
private LockscreenCredential mCurrentCredential;
|
||||||
private boolean mLockVirgin;
|
|
||||||
|
|
||||||
public void start(LockPatternUtils utils, boolean requestGatekeeperPassword,
|
public void start(LockPatternUtils utils, boolean requestGatekeeperPassword,
|
||||||
LockscreenCredential chosenPattern, LockscreenCredential currentCredential,
|
LockscreenCredential chosenPattern, LockscreenCredential currentCredential,
|
||||||
@@ -884,8 +883,6 @@ public class ChooseLockPattern extends SettingsActivity {
|
|||||||
mChosenPattern = chosenPattern;
|
mChosenPattern = chosenPattern;
|
||||||
mUserId = userId;
|
mUserId = userId;
|
||||||
|
|
||||||
mLockVirgin = !mUtils.isPatternEverChosen(mUserId);
|
|
||||||
|
|
||||||
start();
|
start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -916,14 +913,5 @@ public class ChooseLockPattern extends SettingsActivity {
|
|||||||
}
|
}
|
||||||
return Pair.create(success, result);
|
return Pair.create(success, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void finish(Intent resultData) {
|
|
||||||
if (mLockVirgin) {
|
|
||||||
mUtils.setVisiblePatternEnabled(true, mUserId);
|
|
||||||
}
|
|
||||||
|
|
||||||
super.finish(resultData);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user