Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +9 −3 Original line number Original line Diff line number Diff line Loading @@ -102,6 +102,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange private boolean mWakeAndUnlockRunning; private boolean mWakeAndUnlockRunning; private boolean mKeyguardShowing; private boolean mKeyguardShowing; private boolean mShowingLaunchAffordance; private boolean mShowingLaunchAffordance; private boolean mKeyguardJustShown; private boolean mUpdatePending; private boolean mUpdatePending; private final KeyguardMonitor.Callback mKeyguardMonitorCallback = private final KeyguardMonitor.Callback mKeyguardMonitorCallback = Loading @@ -115,6 +116,9 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange mBlockUpdates = false; mBlockUpdates = false; force = true; force = true; } } if (!wasShowing && mKeyguardShowing) { mKeyguardJustShown = true; } update(force); update(force); } } Loading Loading @@ -273,8 +277,10 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange int state = getState(); int state = getState(); int lastState = mLastState; int lastState = mLastState; boolean keyguardJustShown = mKeyguardJustShown; mIsFaceUnlockState = state == STATE_SCANNING_FACE; mIsFaceUnlockState = state == STATE_SCANNING_FACE; mLastState = state; mLastState = state; mKeyguardJustShown = false; boolean shouldUpdate = lastState != state || mForceUpdate; boolean shouldUpdate = lastState != state || mForceUpdate; if (mBlockUpdates && canBlockUpdates()) { if (mBlockUpdates && canBlockUpdates()) { Loading @@ -283,7 +289,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange if (shouldUpdate) { if (shouldUpdate) { mForceUpdate = false; mForceUpdate = false; @LockAnimIndex final int lockAnimIndex = getAnimationIndexForTransition(lastState, @LockAnimIndex final int lockAnimIndex = getAnimationIndexForTransition(lastState, state, mPulsing, mDozing); state, mPulsing, mDozing, keyguardJustShown); boolean isAnim = lockAnimIndex != -1; boolean isAnim = lockAnimIndex != -1; int iconRes = isAnim ? getThemedAnimationResId(lockAnimIndex) : getIconForState(state); int iconRes = isAnim ? getThemedAnimationResId(lockAnimIndex) : getIconForState(state); Loading Loading @@ -412,7 +418,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange } } private static int getAnimationIndexForTransition(int oldState, int newState, boolean pulsing, private static int getAnimationIndexForTransition(int oldState, int newState, boolean pulsing, boolean dozing) { boolean dozing, boolean keyguardJustShown) { // Never animate when screen is off // Never animate when screen is off if (dozing && !pulsing) { if (dozing && !pulsing) { Loading @@ -423,7 +429,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange return ERROR; return ERROR; } else if (oldState != STATE_LOCK_OPEN && newState == STATE_LOCK_OPEN) { } else if (oldState != STATE_LOCK_OPEN && newState == STATE_LOCK_OPEN) { return UNLOCK; return UNLOCK; } else if (oldState == STATE_LOCK_OPEN && newState == STATE_LOCKED) { } else if (oldState == STATE_LOCK_OPEN && newState == STATE_LOCKED && !keyguardJustShown) { return LOCK; return LOCK; } else if (newState == STATE_SCANNING_FACE) { } else if (newState == STATE_SCANNING_FACE) { return SCANNING; return SCANNING; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +9 −3 Original line number Original line Diff line number Diff line Loading @@ -102,6 +102,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange private boolean mWakeAndUnlockRunning; private boolean mWakeAndUnlockRunning; private boolean mKeyguardShowing; private boolean mKeyguardShowing; private boolean mShowingLaunchAffordance; private boolean mShowingLaunchAffordance; private boolean mKeyguardJustShown; private boolean mUpdatePending; private boolean mUpdatePending; private final KeyguardMonitor.Callback mKeyguardMonitorCallback = private final KeyguardMonitor.Callback mKeyguardMonitorCallback = Loading @@ -115,6 +116,9 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange mBlockUpdates = false; mBlockUpdates = false; force = true; force = true; } } if (!wasShowing && mKeyguardShowing) { mKeyguardJustShown = true; } update(force); update(force); } } Loading Loading @@ -273,8 +277,10 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange int state = getState(); int state = getState(); int lastState = mLastState; int lastState = mLastState; boolean keyguardJustShown = mKeyguardJustShown; mIsFaceUnlockState = state == STATE_SCANNING_FACE; mIsFaceUnlockState = state == STATE_SCANNING_FACE; mLastState = state; mLastState = state; mKeyguardJustShown = false; boolean shouldUpdate = lastState != state || mForceUpdate; boolean shouldUpdate = lastState != state || mForceUpdate; if (mBlockUpdates && canBlockUpdates()) { if (mBlockUpdates && canBlockUpdates()) { Loading @@ -283,7 +289,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange if (shouldUpdate) { if (shouldUpdate) { mForceUpdate = false; mForceUpdate = false; @LockAnimIndex final int lockAnimIndex = getAnimationIndexForTransition(lastState, @LockAnimIndex final int lockAnimIndex = getAnimationIndexForTransition(lastState, state, mPulsing, mDozing); state, mPulsing, mDozing, keyguardJustShown); boolean isAnim = lockAnimIndex != -1; boolean isAnim = lockAnimIndex != -1; int iconRes = isAnim ? getThemedAnimationResId(lockAnimIndex) : getIconForState(state); int iconRes = isAnim ? getThemedAnimationResId(lockAnimIndex) : getIconForState(state); Loading Loading @@ -412,7 +418,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange } } private static int getAnimationIndexForTransition(int oldState, int newState, boolean pulsing, private static int getAnimationIndexForTransition(int oldState, int newState, boolean pulsing, boolean dozing) { boolean dozing, boolean keyguardJustShown) { // Never animate when screen is off // Never animate when screen is off if (dozing && !pulsing) { if (dozing && !pulsing) { Loading @@ -423,7 +429,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange return ERROR; return ERROR; } else if (oldState != STATE_LOCK_OPEN && newState == STATE_LOCK_OPEN) { } else if (oldState != STATE_LOCK_OPEN && newState == STATE_LOCK_OPEN) { return UNLOCK; return UNLOCK; } else if (oldState == STATE_LOCK_OPEN && newState == STATE_LOCKED) { } else if (oldState == STATE_LOCK_OPEN && newState == STATE_LOCKED && !keyguardJustShown) { return LOCK; return LOCK; } else if (newState == STATE_SCANNING_FACE) { } else if (newState == STATE_SCANNING_FACE) { return SCANNING; return SCANNING; Loading