Merge "Hide lock icon while WAKE_AND_UNLOCK is happening." into qt-dev
This commit is contained in:
@@ -69,7 +69,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
sysui:ignoreRightInset="true"
|
sysui:ignoreRightInset="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/lock_icon_container"
|
android:id="@+id/lock_icon_container"
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
|
|||||||
private float mDozeAmount;
|
private float mDozeAmount;
|
||||||
private int mIconRes;
|
private int mIconRes;
|
||||||
private boolean mWasPulsingOnThisFrame;
|
private boolean mWasPulsingOnThisFrame;
|
||||||
|
private boolean mWakeAndUnlockRunning;
|
||||||
|
|
||||||
private final Runnable mDrawOffTimeout = () -> update(true /* forceUpdate */);
|
private final Runnable mDrawOffTimeout = () -> update(true /* forceUpdate */);
|
||||||
private final DockManager.DockEventListener mDockEventListener =
|
private final DockManager.DockEventListener mDockEventListener =
|
||||||
@@ -277,7 +278,8 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
|
|||||||
mLastBouncerVisible = mBouncerVisible;
|
mLastBouncerVisible = mBouncerVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean invisible = mDozing && (!mPulsing || mDocked);
|
boolean onAodNotPulsingOrDocked = mDozing && (!mPulsing || mDocked);
|
||||||
|
boolean invisible = onAodNotPulsingOrDocked || mWakeAndUnlockRunning;
|
||||||
setVisibility(invisible ? INVISIBLE : VISIBLE);
|
setVisibility(invisible ? INVISIBLE : VISIBLE);
|
||||||
updateClickability();
|
updateClickability();
|
||||||
}
|
}
|
||||||
@@ -450,4 +452,23 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
|
|||||||
public void onUnlockMethodStateChanged() {
|
public void onUnlockMethodStateChanged() {
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We need to hide the lock whenever there's a fingerprint unlock, otherwise you'll see the
|
||||||
|
* icon on top of the black front scrim.
|
||||||
|
*/
|
||||||
|
public void onBiometricAuthModeChanged(boolean wakeAndUnlock) {
|
||||||
|
if (wakeAndUnlock) {
|
||||||
|
mWakeAndUnlockRunning = true;
|
||||||
|
}
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Triggered after the unlock animation is over and the user is looking at launcher.
|
||||||
|
*/
|
||||||
|
public void onKeyguardFadedAway() {
|
||||||
|
mWakeAndUnlockRunning = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -538,6 +538,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
}
|
}
|
||||||
if (mKeyguardMonitor.isKeyguardFadingAway()) {
|
if (mKeyguardMonitor.isKeyguardFadingAway()) {
|
||||||
mStatusBarKeyguardViewManager.onKeyguardFadedAway();
|
mStatusBarKeyguardViewManager.onKeyguardFadedAway();
|
||||||
|
mStatusBarWindow.onKeyguardFadedAway();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3798,6 +3799,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
public void notifyBiometricAuthModeChanged() {
|
public void notifyBiometricAuthModeChanged() {
|
||||||
updateDozing();
|
updateDozing();
|
||||||
updateScrimController();
|
updateScrimController();
|
||||||
|
mStatusBarWindow.onBiometricAuthModeChanged(mBiometricUnlockController.isWakeAndUnlock());
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
|||||||
@@ -265,6 +265,21 @@ public class StatusBarWindowView extends FrameLayout {
|
|||||||
mLockIcon.setPulsing(pulsing);
|
mLockIcon.setPulsing(pulsing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the biometric authentication mode changes.
|
||||||
|
* @param wakeAndUnlock If the type is {@link BiometricUnlockController#isWakeAndUnlock()}
|
||||||
|
*/
|
||||||
|
public void onBiometricAuthModeChanged(boolean wakeAndUnlock) {
|
||||||
|
mLockIcon.onBiometricAuthModeChanged(wakeAndUnlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called after finished unlocking and the status bar window is already collapsed.
|
||||||
|
*/
|
||||||
|
public void onKeyguardFadedAway() {
|
||||||
|
mLockIcon.onKeyguardFadedAway();
|
||||||
|
}
|
||||||
|
|
||||||
public void setStatusBarView(PhoneStatusBarView statusBarView) {
|
public void setStatusBarView(PhoneStatusBarView statusBarView) {
|
||||||
mStatusBarView = statusBarView;
|
mStatusBarView = statusBarView;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user