Merge "Made sure to unlock the pending unlock if the user is being switched" into qt-r1-dev

This commit is contained in:
Selim Cinek
2019-06-24 21:21:54 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ import android.hardware.face.FaceManager
import android.provider.Settings
import com.android.keyguard.KeyguardUpdateMonitor
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.tuner.TunerService
import javax.inject.Inject
@@ -61,7 +62,8 @@ class KeyguardBypassController {
@Inject
constructor(context: Context, tunerService: TunerService,
statusBarStateController: StatusBarStateController) {
statusBarStateController: StatusBarStateController,
lockscreenUserManager: NotificationLockscreenUserManager) {
unlockMethodCache = UnlockMethodCache.getInstance(context)
this.statusBarStateController = statusBarStateController
statusBarStateController.addCallback(object : StatusBarStateController.StateListener {
@@ -88,6 +90,7 @@ class KeyguardBypassController {
KeyguardUpdateMonitor.getCurrentUser()) != 0
}
}, Settings.Secure.FACE_UNLOCK_DISMISSES_KEYGUARD)
lockscreenUserManager.addUserChangedListener { pendingUnlockType = null }
}
/**

View File

@@ -112,7 +112,8 @@ public class NotificationPanelViewTest extends SysuiTestCase {
mDependency.injectMockDependency(ConfigurationController.class);
mDependency.injectMockDependency(ZenModeController.class);
KeyguardBypassController bypassController = new KeyguardBypassController(mContext,
mock(TunerService.class), mStatusBarStateController);
mock(TunerService.class), mStatusBarStateController,
mock(NotificationLockscreenUserManager.class));
NotificationWakeUpCoordinator coordinator =
new NotificationWakeUpCoordinator(mContext,
mock(HeadsUpManagerPhone.class),