summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java5
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java10
6 files changed, 24 insertions, 17 deletions
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
index 707ee4fed84d..1814fd0403d0 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
@@ -264,6 +264,11 @@ public class CarKeyguardViewController extends OverlayViewController implements
}
@Override
+ public void setKeyguardGoingAwayState(boolean isKeyguardGoingAway) {
+ // no-op
+ }
+
+ @Override
public void onStartedGoingToSleep() {
// no-op
}
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java
index 03ccc1c91487..6a90d00c1e75 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java
@@ -114,6 +114,11 @@ public interface KeyguardViewController {
void keyguardGoingAway();
/**
+ * Sets the system state depending on whether the keyguard is going away or not.
+ */
+ void setKeyguardGoingAwayState(boolean isKeyguardGoingAway);
+
+ /**
* @return Whether window animation for unlock should be disabled.
*/
boolean shouldDisableWindowAnimationsForUnlock();
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 226ac16cf1f2..1012a5213a58 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -96,7 +96,6 @@ import com.android.systemui.statusbar.phone.BiometricUnlockController;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.NavigationModeController;
import com.android.systemui.statusbar.phone.NotificationPanelViewController;
-import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.util.DeviceConfigProxy;
import com.android.systemui.util.InjectionInflationController;
@@ -216,7 +215,6 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
private AlarmManager mAlarmManager;
private AudioManager mAudioManager;
private StatusBarManager mStatusBarManager;
- private final NotificationShadeWindowController mNotificationShadeWindowController;
private final Executor mUiBgExecutor;
private boolean mSystemReady;
@@ -628,7 +626,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
@Override
public void keyguardGone() {
Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardGone");
- mNotificationShadeWindowController.setKeyguardGoingAway(false);
+ mKeyguardViewControllerLazy.get().setKeyguardGoingAwayState(false);
mKeyguardDisplayManager.hide();
Trace.endSection();
}
@@ -717,7 +715,6 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
FalsingManager falsingManager,
LockPatternUtils lockPatternUtils,
BroadcastDispatcher broadcastDispatcher,
- NotificationShadeWindowController notificationShadeWindowController,
Lazy<KeyguardViewController> statusBarKeyguardViewManagerLazy,
DismissCallbackRegistry dismissCallbackRegistry,
KeyguardUpdateMonitor keyguardUpdateMonitor, DumpManager dumpManager,
@@ -729,7 +726,6 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
mFalsingManager = falsingManager;
mLockPatternUtils = lockPatternUtils;
mBroadcastDispatcher = broadcastDispatcher;
- mNotificationShadeWindowController = notificationShadeWindowController;
mKeyguardViewControllerLazy = statusBarKeyguardViewManagerLazy;
mDismissCallbackRegistry = dismissCallbackRegistry;
mUiBgExecutor = uiBgExecutor;
@@ -877,7 +873,8 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
mGoingToSleep = true;
// Reset keyguard going away state so we can start listening for fingerprint. We
- // explicitly DO NOT want to call mStatusBarWindowController.setKeyguardGoingAway(false)
+ // explicitly DO NOT want to call
+ // mKeyguardViewControllerLazy.get().setKeyguardGoingAwayState(false)
// here, since that will mess with the device lock state.
mUpdateMonitor.setKeyguardGoingAway(false);
@@ -1861,7 +1858,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
adjustStatusBarLocked();
userActivity();
mUpdateMonitor.setKeyguardGoingAway(false);
- mNotificationShadeWindowController.setKeyguardGoingAway(false);
+ mKeyguardViewControllerLazy.get().setKeyguardGoingAwayState(false);
mShowKeyguardWakeLock.release();
}
mKeyguardDisplayManager.show();
@@ -1901,7 +1898,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
}
mUpdateMonitor.setKeyguardGoingAway(true);
- mNotificationShadeWindowController.setKeyguardGoingAway(true);
+ mKeyguardViewControllerLazy.get().setKeyguardGoingAwayState(true);
// Don't actually hide the Keyguard at the moment, wait for window
// manager until it tells us it's safe to do so with
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java b/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java
index 7a63a5e406f6..83c95b77b716 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java
@@ -30,7 +30,6 @@ import com.android.systemui.keyguard.DismissCallbackRegistry;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.statusbar.phone.NavigationModeController;
-import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.util.DeviceConfigProxy;
@@ -57,7 +56,6 @@ public class KeyguardModule {
FalsingManager falsingManager,
LockPatternUtils lockPatternUtils,
BroadcastDispatcher broadcastDispatcher,
- NotificationShadeWindowController notificationShadeWindowController,
Lazy<KeyguardViewController> statusBarKeyguardViewManagerLazy,
DismissCallbackRegistry dismissCallbackRegistry,
KeyguardUpdateMonitor updateMonitor,
@@ -72,7 +70,6 @@ public class KeyguardModule {
falsingManager,
lockPatternUtils,
broadcastDispatcher,
- notificationShadeWindowController,
statusBarKeyguardViewManagerLazy,
dismissCallbackRegistry,
updateMonitor,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index 03021c2744f4..ed25db40fea6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -916,6 +916,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
}
@Override
+ public void setKeyguardGoingAwayState(boolean isKeyguardGoingAway) {
+ mNotificationShadeWindowController.setKeyguardGoingAway(isKeyguardGoingAway);
+ }
+
+ @Override
public void onCancelClicked() {
// No-op
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
index 6871aad0ea98..24b128af9fbd 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
@@ -43,7 +43,6 @@ import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.classifier.FalsingManagerFake;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.statusbar.phone.NavigationModeController;
-import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.util.DeviceConfigProxy;
import com.android.systemui.util.DeviceConfigProxyFake;
@@ -66,7 +65,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
private @Mock LockPatternUtils mLockPatternUtils;
private @Mock KeyguardUpdateMonitor mUpdateMonitor;
private @Mock StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
- private @Mock NotificationShadeWindowController mNotificationShadeWindowController;
private @Mock BroadcastDispatcher mBroadcastDispatcher;
private @Mock DismissCallbackRegistry mDismissCallbackRegistry;
private @Mock DumpManager mDumpManager;
@@ -88,7 +86,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
mViewMediator = new KeyguardViewMediator(
mContext, mFalsingManager, mLockPatternUtils, mBroadcastDispatcher,
- mNotificationShadeWindowController, () -> mStatusBarKeyguardViewManager,
+ () -> mStatusBarKeyguardViewManager,
mDismissCallbackRegistry, mUpdateMonitor, mDumpManager, mUiBgExecutor,
mPowerManager, mTrustManager, mDeviceConfig, mNavigationModeController);
mViewMediator.start();
@@ -98,18 +96,18 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
public void testOnGoingToSleep_UpdatesKeyguardGoingAway() {
mViewMediator.onStartedGoingToSleep(OFF_BECAUSE_OF_USER);
verify(mUpdateMonitor).setKeyguardGoingAway(false);
- verify(mNotificationShadeWindowController, never()).setKeyguardGoingAway(anyBoolean());
+ verify(mStatusBarKeyguardViewManager, never()).setKeyguardGoingAwayState(anyBoolean());
}
@Test
public void testRegisterDumpable() {
verify(mDumpManager).registerDumpable(KeyguardViewMediator.class.getName(), mViewMediator);
- verify(mNotificationShadeWindowController, never()).setKeyguardGoingAway(anyBoolean());
+ verify(mStatusBarKeyguardViewManager, never()).setKeyguardGoingAwayState(anyBoolean());
}
@Test
public void testKeyguardGone_notGoingaway() {
mViewMediator.mViewMediatorCallback.keyguardGone();
- verify(mNotificationShadeWindowController).setKeyguardGoingAway(eq(false));
+ verify(mStatusBarKeyguardViewManager).setKeyguardGoingAwayState(eq(false));
}
}