Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +6 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private static final String TAG = "KeyguardUpdateMonitor"; private static final boolean DEBUG = KeyguardConstants.DEBUG; private static final boolean DEBUG_SIM_STATES = KeyguardConstants.DEBUG_SIM_STATES; private static final boolean DEBUG_FACE = true; private static final int LOW_BATTERY_THRESHOLD = 20; private static final String ACTION_FACE_UNLOCK_STARTED Loading Loading @@ -182,6 +183,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { * Prudently disable lockscreen. */ public static final boolean CORE_APPS_ONLY; static { try { CORE_APPS_ONLY = IPackageManager.Stub.asInterface( Loading Loading @@ -734,6 +736,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { if (acquireInfo != FaceManager.FACE_ACQUIRED_GOOD) { return; } if (DEBUG_FACE) Log.d(TAG, "Face acquired"); for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { Loading @@ -760,6 +763,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { Log.d(TAG, "Face authentication disabled by DPM for userId: " + userId); return; } if (DEBUG_FACE) Log.d(TAG, "Face auth succeeded for user " + userId); onFaceAuthenticated(userId); } finally { setFaceRunningState(BIOMETRIC_STATE_STOPPED); Loading @@ -768,6 +772,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } private void handleFaceHelp(int msgId, String helpString) { if (DEBUG_FACE) Log.d(TAG, "Face help received: " + helpString); for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { Loading @@ -786,6 +791,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { }; private void handleFaceError(int msgId, String errString) { if (DEBUG_FACE) Log.d(TAG, "Face error received: " + errString); if (msgId == FaceManager.FACE_ERROR_CANCELED && mFaceRunningState == BIOMETRIC_STATE_CANCELLING_RESTARTING) { setFaceRunningState(BIOMETRIC_STATE_STOPPED); Loading packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +1 −9 Original line number Diff line number Diff line Loading @@ -741,13 +741,5 @@ public class KeyguardIndicationController implements StateListener, updateIndication(false); } } @Override public void onKeyguardBouncerChanged(boolean bouncer) { if (mLockIcon == null) { return; } mLockIcon.setBouncerVisible(bouncer); } }; } packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +4 −19 Original line number Diff line number Diff line Loading @@ -90,11 +90,9 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange private int mDensity; private boolean mPulsing; private boolean mDozing; private boolean mBouncerVisible; private boolean mDocked; private boolean mLastDozing; private boolean mLastPulsing; private boolean mLastBouncerVisible; private int mIconColor; private float mDozeAmount; private int mIconRes; Loading Loading @@ -252,9 +250,9 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange int state = getState(); mIsFaceUnlockState = state == STATE_SCANNING_FACE; if (state != mLastState || mLastDozing != mDozing || mLastPulsing != mPulsing || mLastScreenOn != mScreenOn || mLastBouncerVisible != mBouncerVisible || force) { || mLastScreenOn != mScreenOn || force) { @LockAnimIndex final int lockAnimIndex = getAnimationIndexForTransition(mLastState, state, mLastPulsing, mPulsing, mLastDozing, mDozing, mBouncerVisible); state, mLastPulsing, mPulsing, mLastDozing, mDozing); boolean isAnim = lockAnimIndex != -1; int iconRes = isAnim ? getThemedAnimationResId(lockAnimIndex) : getIconForState(state); Loading Loading @@ -302,7 +300,6 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange mLastScreenOn = mScreenOn; mLastDozing = mDozing; mLastPulsing = mPulsing; mLastBouncerVisible = mBouncerVisible; } boolean onAodNotPulsingOrDocked = mDozing && (!mPulsing || mDocked); Loading Loading @@ -371,8 +368,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange } private int getAnimationIndexForTransition(int oldState, int newState, boolean wasPulsing, boolean pulsing, boolean wasDozing, boolean dozing, boolean bouncerVisible) { boolean wasPulsing, boolean pulsing, boolean wasDozing, boolean dozing) { // Never animate when screen is off if (dozing && !pulsing && !mWasPulsingOnThisFrame) { Loading @@ -391,7 +387,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange return UNLOCK; } else if (justLocked) { return LOCK; } else if (newState == STATE_SCANNING_FACE && bouncerVisible) { } else if (newState == STATE_SCANNING_FACE) { return SCANNING; } else if ((nowPulsing || turningOn) && newState != STATE_LOCK_OPEN) { return LOCK_IN; Loading Loading @@ -496,17 +492,6 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange setImageTintList(ColorStateList.valueOf(color)); } /** * If bouncer is visible or not. */ public void setBouncerVisible(boolean bouncerVisible) { if (mBouncerVisible == bouncerVisible) { return; } mBouncerVisible = bouncerVisible; update(); } @Override public void onDensityOrFontScaleChanged() { ViewGroup.LayoutParams lp = getLayoutParams(); Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +6 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private static final String TAG = "KeyguardUpdateMonitor"; private static final boolean DEBUG = KeyguardConstants.DEBUG; private static final boolean DEBUG_SIM_STATES = KeyguardConstants.DEBUG_SIM_STATES; private static final boolean DEBUG_FACE = true; private static final int LOW_BATTERY_THRESHOLD = 20; private static final String ACTION_FACE_UNLOCK_STARTED Loading Loading @@ -182,6 +183,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { * Prudently disable lockscreen. */ public static final boolean CORE_APPS_ONLY; static { try { CORE_APPS_ONLY = IPackageManager.Stub.asInterface( Loading Loading @@ -734,6 +736,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { if (acquireInfo != FaceManager.FACE_ACQUIRED_GOOD) { return; } if (DEBUG_FACE) Log.d(TAG, "Face acquired"); for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { Loading @@ -760,6 +763,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { Log.d(TAG, "Face authentication disabled by DPM for userId: " + userId); return; } if (DEBUG_FACE) Log.d(TAG, "Face auth succeeded for user " + userId); onFaceAuthenticated(userId); } finally { setFaceRunningState(BIOMETRIC_STATE_STOPPED); Loading @@ -768,6 +772,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } private void handleFaceHelp(int msgId, String helpString) { if (DEBUG_FACE) Log.d(TAG, "Face help received: " + helpString); for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { Loading @@ -786,6 +791,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { }; private void handleFaceError(int msgId, String errString) { if (DEBUG_FACE) Log.d(TAG, "Face error received: " + errString); if (msgId == FaceManager.FACE_ERROR_CANCELED && mFaceRunningState == BIOMETRIC_STATE_CANCELLING_RESTARTING) { setFaceRunningState(BIOMETRIC_STATE_STOPPED); Loading
packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +1 −9 Original line number Diff line number Diff line Loading @@ -741,13 +741,5 @@ public class KeyguardIndicationController implements StateListener, updateIndication(false); } } @Override public void onKeyguardBouncerChanged(boolean bouncer) { if (mLockIcon == null) { return; } mLockIcon.setBouncerVisible(bouncer); } }; }
packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +4 −19 Original line number Diff line number Diff line Loading @@ -90,11 +90,9 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange private int mDensity; private boolean mPulsing; private boolean mDozing; private boolean mBouncerVisible; private boolean mDocked; private boolean mLastDozing; private boolean mLastPulsing; private boolean mLastBouncerVisible; private int mIconColor; private float mDozeAmount; private int mIconRes; Loading Loading @@ -252,9 +250,9 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange int state = getState(); mIsFaceUnlockState = state == STATE_SCANNING_FACE; if (state != mLastState || mLastDozing != mDozing || mLastPulsing != mPulsing || mLastScreenOn != mScreenOn || mLastBouncerVisible != mBouncerVisible || force) { || mLastScreenOn != mScreenOn || force) { @LockAnimIndex final int lockAnimIndex = getAnimationIndexForTransition(mLastState, state, mLastPulsing, mPulsing, mLastDozing, mDozing, mBouncerVisible); state, mLastPulsing, mPulsing, mLastDozing, mDozing); boolean isAnim = lockAnimIndex != -1; int iconRes = isAnim ? getThemedAnimationResId(lockAnimIndex) : getIconForState(state); Loading Loading @@ -302,7 +300,6 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange mLastScreenOn = mScreenOn; mLastDozing = mDozing; mLastPulsing = mPulsing; mLastBouncerVisible = mBouncerVisible; } boolean onAodNotPulsingOrDocked = mDozing && (!mPulsing || mDocked); Loading Loading @@ -371,8 +368,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange } private int getAnimationIndexForTransition(int oldState, int newState, boolean wasPulsing, boolean pulsing, boolean wasDozing, boolean dozing, boolean bouncerVisible) { boolean wasPulsing, boolean pulsing, boolean wasDozing, boolean dozing) { // Never animate when screen is off if (dozing && !pulsing && !mWasPulsingOnThisFrame) { Loading @@ -391,7 +387,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange return UNLOCK; } else if (justLocked) { return LOCK; } else if (newState == STATE_SCANNING_FACE && bouncerVisible) { } else if (newState == STATE_SCANNING_FACE) { return SCANNING; } else if ((nowPulsing || turningOn) && newState != STATE_LOCK_OPEN) { return LOCK_IN; Loading Loading @@ -496,17 +492,6 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange setImageTintList(ColorStateList.valueOf(color)); } /** * If bouncer is visible or not. */ public void setBouncerVisible(boolean bouncerVisible) { if (mBouncerVisible == bouncerVisible) { return; } mBouncerVisible = bouncerVisible; update(); } @Override public void onDensityOrFontScaleChanged() { ViewGroup.LayoutParams lp = getLayoutParams(); Loading