Loading core/java/com/android/internal/widget/LockPatternUtils.java +8 −8 Original line number Diff line number Diff line Loading @@ -1097,20 +1097,20 @@ public class LockPatternUtils { setLong(Settings.Secure.LOCK_PATTERN_SIZE, size, UserHandle.USER_CURRENT); } public void setVisibleDotsEnabled(boolean enabled) { setBoolean(Settings.Secure.LOCK_DOTS_VISIBLE, enabled, UserHandle.USER_CURRENT); public void setVisibleDotsEnabled(boolean enabled, int userId) { setBoolean(Settings.Secure.LOCK_DOTS_VISIBLE, enabled, userId); } public boolean isVisibleDotsEnabled() { return getBoolean(Settings.Secure.LOCK_DOTS_VISIBLE, true, UserHandle.USER_CURRENT); public boolean isVisibleDotsEnabled(int userId) { return getBoolean(Settings.Secure.LOCK_DOTS_VISIBLE, true, userId); } public void setShowErrorPath(boolean enabled) { setBoolean(Settings.Secure.LOCK_SHOW_ERROR_PATH, enabled, UserHandle.USER_CURRENT); public void setShowErrorPath(boolean enabled, int userId) { setBoolean(Settings.Secure.LOCK_SHOW_ERROR_PATH, enabled, userId); } public boolean isShowErrorPath() { return getBoolean(Settings.Secure.LOCK_SHOW_ERROR_PATH, true, UserHandle.USER_CURRENT); public boolean isShowErrorPath(int userId) { return getBoolean(Settings.Secure.LOCK_SHOW_ERROR_PATH, true, userId); } /** Loading core/java/com/android/internal/widget/LockPatternView.java +18 −17 Original line number Diff line number Diff line Loading @@ -1149,6 +1149,7 @@ public class LockPatternView extends View { currentPath.rewind(); // draw the circles if (mVisibleDots) { for (int i = 0; i < mPatternSize; i++) { float centerY = getCenterYForRow(i); for (int j = 0; j < mPatternSize; j++) { Loading @@ -1162,7 +1163,7 @@ public class LockPatternView extends View { } else { drawCircle(canvas, (int) centerX, (int) centerY + translationY, cellState.radius, drawLookup[i][j], cellState.alpha); } } } } Loading @@ -1170,8 +1171,6 @@ public class LockPatternView extends View { // TODO: the path should be created and cached every time we hit-detect a cell // only the last segment of the path should be computed here // draw the path of the pattern (unless we are in stealth mode) // draw the path of the pattern (unless the user is in progress, and // we are in stealth mode) final boolean drawPath = ((!mInStealthMode && mPatternDisplayMode != DisplayMode.Wrong) || (mPatternDisplayMode == DisplayMode.Wrong && mShowErrorPath)); if (drawPath) { Loading Loading @@ -1231,7 +1230,9 @@ public class LockPatternView extends View { } private int getCurrentColor(boolean partOfPattern) { if (!partOfPattern || mInStealthMode || mPatternInProgress) { if (!partOfPattern || (mInStealthMode && mPatternDisplayMode != DisplayMode.Wrong) || (mPatternDisplayMode == DisplayMode.Wrong && !mShowErrorPath) || mPatternInProgress) { // unselected circle return mRegularColor; } else if (mPatternDisplayMode == DisplayMode.Wrong) { Loading packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java +4 −2 Original line number Diff line number Diff line Loading @@ -135,8 +135,10 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit mLockPatternView.setLockPatternUtils(mLockPatternUtils); mLockPatternView.setLockPatternSize(mLockPatternUtils.getLockPatternSize()); mLockPatternView.setVisibleDots(mLockPatternUtils.isVisibleDotsEnabled()); mLockPatternView.setShowErrorPath(mLockPatternUtils.isShowErrorPath()); mLockPatternView.setVisibleDots(mLockPatternUtils.isVisibleDotsEnabled( KeyguardUpdateMonitor.getCurrentUser())); mLockPatternView.setShowErrorPath(mLockPatternUtils.isShowErrorPath( KeyguardUpdateMonitor.getCurrentUser())); // stealth mode will be the same for the life of this screen mLockPatternView.setInStealthMode(!mLockPatternUtils.isVisiblePatternEnabled( Loading Loading
core/java/com/android/internal/widget/LockPatternUtils.java +8 −8 Original line number Diff line number Diff line Loading @@ -1097,20 +1097,20 @@ public class LockPatternUtils { setLong(Settings.Secure.LOCK_PATTERN_SIZE, size, UserHandle.USER_CURRENT); } public void setVisibleDotsEnabled(boolean enabled) { setBoolean(Settings.Secure.LOCK_DOTS_VISIBLE, enabled, UserHandle.USER_CURRENT); public void setVisibleDotsEnabled(boolean enabled, int userId) { setBoolean(Settings.Secure.LOCK_DOTS_VISIBLE, enabled, userId); } public boolean isVisibleDotsEnabled() { return getBoolean(Settings.Secure.LOCK_DOTS_VISIBLE, true, UserHandle.USER_CURRENT); public boolean isVisibleDotsEnabled(int userId) { return getBoolean(Settings.Secure.LOCK_DOTS_VISIBLE, true, userId); } public void setShowErrorPath(boolean enabled) { setBoolean(Settings.Secure.LOCK_SHOW_ERROR_PATH, enabled, UserHandle.USER_CURRENT); public void setShowErrorPath(boolean enabled, int userId) { setBoolean(Settings.Secure.LOCK_SHOW_ERROR_PATH, enabled, userId); } public boolean isShowErrorPath() { return getBoolean(Settings.Secure.LOCK_SHOW_ERROR_PATH, true, UserHandle.USER_CURRENT); public boolean isShowErrorPath(int userId) { return getBoolean(Settings.Secure.LOCK_SHOW_ERROR_PATH, true, userId); } /** Loading
core/java/com/android/internal/widget/LockPatternView.java +18 −17 Original line number Diff line number Diff line Loading @@ -1149,6 +1149,7 @@ public class LockPatternView extends View { currentPath.rewind(); // draw the circles if (mVisibleDots) { for (int i = 0; i < mPatternSize; i++) { float centerY = getCenterYForRow(i); for (int j = 0; j < mPatternSize; j++) { Loading @@ -1162,7 +1163,7 @@ public class LockPatternView extends View { } else { drawCircle(canvas, (int) centerX, (int) centerY + translationY, cellState.radius, drawLookup[i][j], cellState.alpha); } } } } Loading @@ -1170,8 +1171,6 @@ public class LockPatternView extends View { // TODO: the path should be created and cached every time we hit-detect a cell // only the last segment of the path should be computed here // draw the path of the pattern (unless we are in stealth mode) // draw the path of the pattern (unless the user is in progress, and // we are in stealth mode) final boolean drawPath = ((!mInStealthMode && mPatternDisplayMode != DisplayMode.Wrong) || (mPatternDisplayMode == DisplayMode.Wrong && mShowErrorPath)); if (drawPath) { Loading Loading @@ -1231,7 +1230,9 @@ public class LockPatternView extends View { } private int getCurrentColor(boolean partOfPattern) { if (!partOfPattern || mInStealthMode || mPatternInProgress) { if (!partOfPattern || (mInStealthMode && mPatternDisplayMode != DisplayMode.Wrong) || (mPatternDisplayMode == DisplayMode.Wrong && !mShowErrorPath) || mPatternInProgress) { // unselected circle return mRegularColor; } else if (mPatternDisplayMode == DisplayMode.Wrong) { Loading
packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java +4 −2 Original line number Diff line number Diff line Loading @@ -135,8 +135,10 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit mLockPatternView.setLockPatternUtils(mLockPatternUtils); mLockPatternView.setLockPatternSize(mLockPatternUtils.getLockPatternSize()); mLockPatternView.setVisibleDots(mLockPatternUtils.isVisibleDotsEnabled()); mLockPatternView.setShowErrorPath(mLockPatternUtils.isShowErrorPath()); mLockPatternView.setVisibleDots(mLockPatternUtils.isVisibleDotsEnabled( KeyguardUpdateMonitor.getCurrentUser())); mLockPatternView.setShowErrorPath(mLockPatternUtils.isShowErrorPath( KeyguardUpdateMonitor.getCurrentUser())); // stealth mode will be the same for the life of this screen mLockPatternView.setInStealthMode(!mLockPatternUtils.isVisiblePatternEnabled( Loading