Loading core/java/com/android/internal/widget/LockPatternView.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -1007,8 +1007,6 @@ public class LockPatternView extends View { // TODO: the path should be created and cached every time we hit-detect a cell // 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 // 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 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) final boolean drawPath = ((!mInStealthMode && mPatternDisplayMode != DisplayMode.Wrong) || (mPatternDisplayMode == DisplayMode.Wrong && mShowErrorPath)); || (mPatternDisplayMode == DisplayMode.Wrong && mShowErrorPath)); if (drawPath) { if (drawPath) { Loading Loading @@ -1068,7 +1066,9 @@ public class LockPatternView extends View { } } private int getCurrentColor(boolean partOfPattern) { private int getCurrentColor(boolean partOfPattern) { if (!partOfPattern || mInStealthMode || mPatternInProgress) { if (!partOfPattern || (mInStealthMode && mPatternDisplayMode != DisplayMode.Wrong) || (mPatternDisplayMode == DisplayMode.Wrong && !mShowErrorPath) || mPatternInProgress) { // unselected circle // unselected circle return mRegularColor; return mRegularColor; } else if (mPatternDisplayMode == DisplayMode.Wrong) { } else if (mPatternDisplayMode == DisplayMode.Wrong) { Loading @@ -1087,6 +1087,9 @@ public class LockPatternView extends View { */ */ private void drawCircle(Canvas canvas, float centerX, float centerY, float size, private void drawCircle(Canvas canvas, float centerX, float centerY, float size, boolean partOfPattern, float alpha) { boolean partOfPattern, float alpha) { if (!mVisibleDots) { return; } mPaint.setColor(getCurrentColor(partOfPattern)); mPaint.setColor(getCurrentColor(partOfPattern)); mPaint.setAlpha((int) (alpha * 255)); mPaint.setAlpha((int) (alpha * 255)); canvas.drawCircle(centerX, centerY, size/2, mPaint); canvas.drawCircle(centerX, centerY, size/2, mPaint); Loading Loading
core/java/com/android/internal/widget/LockPatternView.java +6 −3 Original line number Original line Diff line number Diff line Loading @@ -1007,8 +1007,6 @@ public class LockPatternView extends View { // TODO: the path should be created and cached every time we hit-detect a cell // 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 // 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 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) final boolean drawPath = ((!mInStealthMode && mPatternDisplayMode != DisplayMode.Wrong) || (mPatternDisplayMode == DisplayMode.Wrong && mShowErrorPath)); || (mPatternDisplayMode == DisplayMode.Wrong && mShowErrorPath)); if (drawPath) { if (drawPath) { Loading Loading @@ -1068,7 +1066,9 @@ public class LockPatternView extends View { } } private int getCurrentColor(boolean partOfPattern) { private int getCurrentColor(boolean partOfPattern) { if (!partOfPattern || mInStealthMode || mPatternInProgress) { if (!partOfPattern || (mInStealthMode && mPatternDisplayMode != DisplayMode.Wrong) || (mPatternDisplayMode == DisplayMode.Wrong && !mShowErrorPath) || mPatternInProgress) { // unselected circle // unselected circle return mRegularColor; return mRegularColor; } else if (mPatternDisplayMode == DisplayMode.Wrong) { } else if (mPatternDisplayMode == DisplayMode.Wrong) { Loading @@ -1087,6 +1087,9 @@ public class LockPatternView extends View { */ */ private void drawCircle(Canvas canvas, float centerX, float centerY, float size, private void drawCircle(Canvas canvas, float centerX, float centerY, float size, boolean partOfPattern, float alpha) { boolean partOfPattern, float alpha) { if (!mVisibleDots) { return; } mPaint.setColor(getCurrentColor(partOfPattern)); mPaint.setColor(getCurrentColor(partOfPattern)); mPaint.setAlpha((int) (alpha * 255)); mPaint.setAlpha((int) (alpha * 255)); canvas.drawCircle(centerX, centerY, size/2, mPaint); canvas.drawCircle(centerX, centerY, size/2, mPaint); Loading