Merge "WAKE_AND_UNLOCK when FP is auth'd while animating screen off" into tm-dev
This commit is contained in:
@@ -1219,7 +1219,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
|
|||||||
doKeyguardLaterLocked(timeout);
|
doKeyguardLaterLocked(timeout);
|
||||||
mLockLater = true;
|
mLockLater = true;
|
||||||
} else if (!mLockPatternUtils.isLockScreenDisabled(currentUser)) {
|
} else if (!mLockPatternUtils.isLockScreenDisabled(currentUser)) {
|
||||||
mPendingLock = true;
|
setPendingLock(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mPendingLock) {
|
if (mPendingLock) {
|
||||||
@@ -1263,7 +1263,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
|
|||||||
mContext.getSystemService(PowerManager.class).wakeUp(SystemClock.uptimeMillis(),
|
mContext.getSystemService(PowerManager.class).wakeUp(SystemClock.uptimeMillis(),
|
||||||
PowerManager.WAKE_REASON_CAMERA_LAUNCH,
|
PowerManager.WAKE_REASON_CAMERA_LAUNCH,
|
||||||
"com.android.systemui:CAMERA_GESTURE_PREVENT_LOCK");
|
"com.android.systemui:CAMERA_GESTURE_PREVENT_LOCK");
|
||||||
mPendingLock = false;
|
setPendingLock(false);
|
||||||
mPendingReset = false;
|
mPendingReset = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1333,7 +1333,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
doKeyguardLocked(null);
|
doKeyguardLocked(null);
|
||||||
mPendingLock = false;
|
setPendingLock(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2134,6 +2134,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
|
|||||||
Log.i(TAG, "Device is going to sleep, aborting keyguardDone");
|
Log.i(TAG, "Device is going to sleep, aborting keyguardDone");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
setPendingLock(false); // user may have authenticated during the screen off animation
|
||||||
if (mExitSecureCallback != null) {
|
if (mExitSecureCallback != null) {
|
||||||
try {
|
try {
|
||||||
mExitSecureCallback.onKeyguardExitResult(true /* authenciated */);
|
mExitSecureCallback.onKeyguardExitResult(true /* authenciated */);
|
||||||
@@ -2264,7 +2265,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
|
|||||||
mHiding = false;
|
mHiding = false;
|
||||||
mKeyguardExitAnimationRunner = null;
|
mKeyguardExitAnimationRunner = null;
|
||||||
mWakeAndUnlocking = false;
|
mWakeAndUnlocking = false;
|
||||||
mPendingLock = false;
|
setPendingLock(false);
|
||||||
setShowingLocked(true);
|
setShowingLocked(true);
|
||||||
mKeyguardViewControllerLazy.get().show(options);
|
mKeyguardViewControllerLazy.get().show(options);
|
||||||
resetKeyguardDonePendingLocked();
|
resetKeyguardDonePendingLocked();
|
||||||
@@ -3040,6 +3041,11 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setPendingLock(boolean hasPendingLock) {
|
||||||
|
mPendingLock = hasPendingLock;
|
||||||
|
Trace.traceCounter(Trace.TRACE_TAG_APP, "pendingLock", mPendingLock ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
public void addStateMonitorCallback(IKeyguardStateCallback callback) {
|
public void addStateMonitorCallback(IKeyguardStateCallback callback) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
mKeyguardStateCallbacks.add(callback);
|
mKeyguardStateCallbacks.add(callback);
|
||||||
|
|||||||
@@ -265,6 +265,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
|
|||||||
}
|
}
|
||||||
|
|
||||||
private KeyguardUnlockAnimationController mKeyguardUnlockAnimationController;
|
private KeyguardUnlockAnimationController mKeyguardUnlockAnimationController;
|
||||||
|
private final ScreenOffAnimationController mScreenOffAnimationController;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public BiometricUnlockController(DozeScrimController dozeScrimController,
|
public BiometricUnlockController(DozeScrimController dozeScrimController,
|
||||||
@@ -284,7 +285,8 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
|
|||||||
StatusBarStateController statusBarStateController,
|
StatusBarStateController statusBarStateController,
|
||||||
KeyguardUnlockAnimationController keyguardUnlockAnimationController,
|
KeyguardUnlockAnimationController keyguardUnlockAnimationController,
|
||||||
SessionTracker sessionTracker,
|
SessionTracker sessionTracker,
|
||||||
LatencyTracker latencyTracker) {
|
LatencyTracker latencyTracker,
|
||||||
|
ScreenOffAnimationController screenOffAnimationController) {
|
||||||
mPowerManager = powerManager;
|
mPowerManager = powerManager;
|
||||||
mShadeController = shadeController;
|
mShadeController = shadeController;
|
||||||
mUpdateMonitor = keyguardUpdateMonitor;
|
mUpdateMonitor = keyguardUpdateMonitor;
|
||||||
@@ -310,6 +312,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
|
|||||||
mStatusBarStateController = statusBarStateController;
|
mStatusBarStateController = statusBarStateController;
|
||||||
mKeyguardUnlockAnimationController = keyguardUnlockAnimationController;
|
mKeyguardUnlockAnimationController = keyguardUnlockAnimationController;
|
||||||
mSessionTracker = sessionTracker;
|
mSessionTracker = sessionTracker;
|
||||||
|
mScreenOffAnimationController = screenOffAnimationController;
|
||||||
dumpManager.registerDumpable(getClass().getName(), this);
|
dumpManager.registerDumpable(getClass().getName(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -554,7 +557,8 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
|
|||||||
boolean deviceDreaming = mUpdateMonitor.isDreaming();
|
boolean deviceDreaming = mUpdateMonitor.isDreaming();
|
||||||
|
|
||||||
if (!mUpdateMonitor.isDeviceInteractive()) {
|
if (!mUpdateMonitor.isDeviceInteractive()) {
|
||||||
if (!mKeyguardViewController.isShowing()) {
|
if (!mKeyguardViewController.isShowing()
|
||||||
|
&& !mScreenOffAnimationController.isKeyguardShowDelayed()) {
|
||||||
return MODE_ONLY_WAKE;
|
return MODE_ONLY_WAKE;
|
||||||
} else if (mDozeScrimController.isPulsing() && unlockingAllowed) {
|
} else if (mDozeScrimController.isPulsing() && unlockingAllowed) {
|
||||||
return MODE_WAKE_AND_UNLOCK_PULSING;
|
return MODE_WAKE_AND_UNLOCK_PULSING;
|
||||||
|
|||||||
@@ -113,6 +113,8 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
|
|||||||
private SessionTracker mSessionTracker;
|
private SessionTracker mSessionTracker;
|
||||||
@Mock
|
@Mock
|
||||||
private LatencyTracker mLatencyTracker;
|
private LatencyTracker mLatencyTracker;
|
||||||
|
@Mock
|
||||||
|
private ScreenOffAnimationController mScreenOffAnimationController;
|
||||||
private BiometricUnlockController mBiometricUnlockController;
|
private BiometricUnlockController mBiometricUnlockController;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
@@ -134,7 +136,7 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
|
|||||||
mMetricsLogger, mDumpManager, mPowerManager,
|
mMetricsLogger, mDumpManager, mPowerManager,
|
||||||
mNotificationMediaManager, mWakefulnessLifecycle, mScreenLifecycle,
|
mNotificationMediaManager, mWakefulnessLifecycle, mScreenLifecycle,
|
||||||
mAuthController, mStatusBarStateController, mKeyguardUnlockAnimationController,
|
mAuthController, mStatusBarStateController, mKeyguardUnlockAnimationController,
|
||||||
mSessionTracker, mLatencyTracker);
|
mSessionTracker, mLatencyTracker, mScreenOffAnimationController);
|
||||||
mBiometricUnlockController.setKeyguardViewController(mStatusBarKeyguardViewManager);
|
mBiometricUnlockController.setKeyguardViewController(mStatusBarKeyguardViewManager);
|
||||||
mBiometricUnlockController.setBiometricModeListener(mBiometricModeListener);
|
mBiometricUnlockController.setBiometricModeListener(mBiometricModeListener);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user