summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Justin Weir <justinweir@google.com> 2023-05-31 13:09:48 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-05-31 13:09:48 +0000
commitdd87b7b5e9b1463b65ebe15f1ecee5bc0cd06076 (patch)
tree1ec7e1531dd344d9c0daa6ab1cfbc7aa0c9187d9
parentb1432a74f442b8f6086b8ead93e8d1be13ac9441 (diff)
parent15c57b584ba5f619f3aa55073b04dce8af4fb935 (diff)
Merge changes from topics "284332422", "b284332422" into udc-qpr-dev
* changes: Remove CentralSurfaces.getNotificationShadeWindowViewController Remove CentralSurfacesImpl.getNotificationShadeWindowView Remove calls to CentralSurfacesImpl.getNotificationShadeWindowView Remove calls to CentralSurfacesImpl.getNotificationShadeWindowView Remove calls to CentralSurfacesImpl.getNotificationShadeWindowView Remove calls to CentralSurfacesImpl.getNotificationShadeWindowView Remove calls to CentralSurfacesImpl.getNotificationShadeWindowView
-rw-r--r--packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java20
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java9
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterTest.java2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationControllerTest.kt4
15 files changed, 62 insertions, 46 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java
index 1da8718b111f..8225c47d904b 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java
@@ -51,7 +51,6 @@ import android.view.IWallpaperVisibilityListener;
import android.view.IWindowManager;
import android.view.View;
import android.view.WindowInsets;
-import android.view.WindowManagerGlobal;
import android.view.accessibility.AccessibilityManager;
import androidx.annotation.NonNull;
@@ -69,10 +68,13 @@ import com.android.systemui.settings.DisplayTracker;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.phone.BarTransitions.TransitionMode;
import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.policy.KeyguardStateController;
+import dagger.Lazy;
+
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
@@ -80,8 +82,6 @@ import java.util.Optional;
import javax.inject.Inject;
-import dagger.Lazy;
-
/**
* Extracts shared elements between navbar and taskbar delegate to de-dupe logic and help them
* experience the joys of friendship.
@@ -111,6 +111,7 @@ public final class NavBarHelper implements
private final AccessibilityButtonTargetsObserver mAccessibilityButtonTargetsObserver;
private final List<NavbarTaskbarStateUpdater> mStateListeners = new ArrayList<>();
private final Context mContext;
+ private final NotificationShadeWindowController mNotificationShadeWindowController;
private final CommandQueue mCommandQueue;
private final ContentResolver mContentResolver;
private final EdgeBackGestureHandler mEdgeBackGestureHandler;
@@ -182,9 +183,11 @@ public final class NavBarHelper implements
IWindowManager wm,
UserTracker userTracker,
DisplayTracker displayTracker,
+ NotificationShadeWindowController notificationShadeWindowController,
DumpManager dumpManager,
CommandQueue commandQueue) {
mContext = context;
+ mNotificationShadeWindowController = notificationShadeWindowController;
mCommandQueue = commandQueue;
mContentResolver = mContext.getContentResolver();
mAccessibilityManager = accessibilityManager;
@@ -460,11 +463,7 @@ public final class NavBarHelper implements
* {@link InputMethodService} and the keyguard states.
*/
public boolean isImeShown(int vis) {
- View shadeWindowView = null;
- if (mCentralSurfacesOptionalLazy.get().isPresent()) {
- shadeWindowView =
- mCentralSurfacesOptionalLazy.get().get().getNotificationShadeWindowView();
- }
+ View shadeWindowView = mNotificationShadeWindowController.getWindowRootView();
boolean isKeyguardShowing = mKeyguardStateController.isShowing();
boolean imeVisibleOnShade = shadeWindowView != null && shadeWindowView.isAttachedToWindow()
&& shadeWindowView.getRootWindowInsets().isVisible(WindowInsets.Type.ime());
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 7f4c2a6e84a9..1174d3d932ae 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -2573,7 +2573,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
this);
return;
}
- if (mCentralSurfaces.getNotificationShadeWindowView()
+ if (mNotificationShadeWindowController.getWindowRootView()
.isVisibleToUser()) {
mView.getViewTreeObserver().removeOnGlobalLayoutListener(
this);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt
index 1827a46958f8..5ad5d841fad5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt
@@ -45,6 +45,7 @@ import com.android.systemui.plugins.ActivityStarter.OnDismissAction
import com.android.systemui.settings.UserTracker
import com.android.systemui.shade.ShadeController
import com.android.systemui.statusbar.NotificationLockscreenUserManager
+import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.policy.DeviceProvisionedController
@@ -68,6 +69,7 @@ constructor(
private val keyguardViewMediatorLazy: Lazy<KeyguardViewMediator>,
private val shadeControllerLazy: Lazy<ShadeController>,
private val statusBarKeyguardViewManagerLazy: Lazy<StatusBarKeyguardViewManager>,
+ private val notifShadeWindowControllerLazy: Lazy<NotificationShadeWindowController>,
private val activityLaunchAnimator: ActivityLaunchAnimator,
private val context: Context,
private val lockScreenUserManager: NotificationLockscreenUserManager,
@@ -866,6 +868,7 @@ constructor(
return StatusBarLaunchAnimatorController(
animationController,
it,
+ notifShadeWindowControllerLazy.get(),
isLaunchForActivity
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
index 226df76a452a..0b02f33daeae 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
@@ -46,8 +46,6 @@ import com.android.systemui.navigationbar.NavigationBarView;
import com.android.systemui.plugins.ActivityStarter.OnDismissAction;
import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper;
import com.android.systemui.qs.QSPanelController;
-import com.android.systemui.shade.NotificationShadeWindowView;
-import com.android.systemui.shade.NotificationShadeWindowViewController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.shared.system.RemoteAnimationRunnerCompat;
import com.android.systemui.statusbar.NotificationPresenter;
@@ -212,10 +210,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {
*/
void wakeUpIfDozing(long time, String why, @PowerManager.WakeReason int wakeReason);
- NotificationShadeWindowView getNotificationShadeWindowView();
-
- NotificationShadeWindowViewController getNotificationShadeWindowViewController();
-
/** */
ShadeViewController getShadeViewController();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index cab95c6b3888..fde08bde5d17 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -457,7 +457,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
private PhoneStatusBarTransitions mStatusBarTransitions;
private final AuthRippleController mAuthRippleController;
@WindowVisibleState private int mStatusBarWindowState = WINDOW_STATE_SHOWING;
- protected final NotificationShadeWindowController mNotificationShadeWindowController;
+ private final NotificationShadeWindowController mNotificationShadeWindowController;
private final StatusBarInitializer mStatusBarInitializer;
private final StatusBarWindowController mStatusBarWindowController;
private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
@@ -1143,7 +1143,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
@Override
public void onPluginConnected(OverlayPlugin plugin, Context pluginContext) {
mMainExecutor.execute(
- () -> plugin.setup(getNotificationShadeWindowView(),
+ () -> plugin.setup(
+ mNotificationShadeWindowController.getWindowRootView(),
getNavigationBarView(),
new Callback(plugin), mDozeParameters));
}
@@ -1743,16 +1744,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
}
@Override
- public NotificationShadeWindowView getNotificationShadeWindowView() {
- return mNotificationShadeWindowView;
- }
-
- @Override
- public NotificationShadeWindowViewController getNotificationShadeWindowViewController() {
- return mNotificationShadeWindowViewController;
- }
-
- @Override
public ShadeViewController getShadeViewController() {
return mShadeSurface;
}
@@ -3051,9 +3042,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
}
protected ViewRootImpl getViewRootImpl() {
- NotificationShadeWindowView nswv = getNotificationShadeWindowView();
- if (nswv != null) return nswv.getViewRootImpl();
-
+ View root = mNotificationShadeWindowController.getWindowRootView();
+ if (root != null) return root.getViewRootImpl();
return null;
}
/**
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 a34cc96573b6..f11b8e2713ec 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -750,7 +750,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
@Override
public void onStartedWakingUp() {
- mCentralSurfaces.getNotificationShadeWindowView().getWindowInsetsController()
+ mNotificationShadeWindowController.getWindowRootView().getWindowInsetsController()
.setAnimationsDisabled(false);
NavigationBarView navBarView = mCentralSurfaces.getNavigationBarView();
if (navBarView != null) {
@@ -764,7 +764,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
@Override
public void onStartedGoingToSleep() {
- mCentralSurfaces.getNotificationShadeWindowView().getWindowInsetsController()
+ mNotificationShadeWindowController.getWindowRootView().getWindowInsetsController()
.setAnimationsDisabled(true);
NavigationBarView navBarView = mCentralSurfaces.getNavigationBarView();
if (navBarView != null) {
@@ -1114,7 +1114,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
if (view != null) {
view.setVisibility(View.VISIBLE);
}
- mCentralSurfaces.getNotificationShadeWindowView().getWindowInsetsController()
+ mNotificationShadeWindowController.getWindowRootView().getWindowInsetsController()
.show(navigationBars());
}
};
@@ -1192,7 +1192,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
}
} else {
mNotificationContainer.removeCallbacks(mMakeNavigationBarVisibleRunnable);
- mCentralSurfaces.getNotificationShadeWindowView().getWindowInsetsController()
+ mNotificationShadeWindowController.getWindowRootView().getWindowInsetsController()
.hide(navigationBars());
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt
index 9f69db93e64a..00ac3f4cdc11 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt
@@ -3,6 +3,7 @@ package com.android.systemui.statusbar.phone
import android.view.View
import com.android.systemui.animation.ActivityLaunchAnimator
import com.android.systemui.animation.LaunchAnimator
+import com.android.systemui.statusbar.NotificationShadeWindowController
/**
* A [ActivityLaunchAnimator.Controller] that takes care of collapsing the status bar at the right
@@ -11,12 +12,13 @@ import com.android.systemui.animation.LaunchAnimator
class StatusBarLaunchAnimatorController(
private val delegate: ActivityLaunchAnimator.Controller,
private val centralSurfaces: CentralSurfaces,
+ private val notificationShadeWindowController: NotificationShadeWindowController,
private val isLaunchForActivity: Boolean = true
) : ActivityLaunchAnimator.Controller by delegate {
// Always sync the opening window with the shade, given that we draw a hole punch in the shade
// of the same size and position as the opening app to make it visible.
override val openingWindowSyncView: View?
- get() = centralSurfaces.notificationShadeWindowView
+ get() = notificationShadeWindowController.windowRootView
override fun onIntentStarted(willAnimate: Boolean) {
delegate.onIntentStarted(willAnimate)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java
index 7bbb03b4bc94..28ec1ac5e593 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java
@@ -63,6 +63,7 @@ import com.android.systemui.statusbar.NotificationClickNotifier;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
+import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.notification.NotificationActivityStarter;
import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
@@ -122,6 +123,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
private final CentralSurfaces mCentralSurfaces;
private final NotificationPresenter mPresenter;
private final ShadeViewController mNotificationPanel;
+ private final NotificationShadeWindowController mNotificationShadeWindowController;
private final ActivityLaunchAnimator mActivityLaunchAnimator;
private final NotificationLaunchAnimatorControllerProvider mNotificationAnimationProvider;
private final UserTracker mUserTracker;
@@ -157,6 +159,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
CentralSurfaces centralSurfaces,
NotificationPresenter presenter,
ShadeViewController panel,
+ NotificationShadeWindowController notificationShadeWindowController,
ActivityLaunchAnimator activityLaunchAnimator,
NotificationLaunchAnimatorControllerProvider notificationAnimationProvider,
LaunchFullScreenIntentProvider launchFullScreenIntentProvider,
@@ -182,6 +185,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
mLockPatternUtils = lockPatternUtils;
mStatusBarRemoteInputCallback = remoteInputCallback;
mActivityIntentHelper = activityIntentHelper;
+ mNotificationShadeWindowController = notificationShadeWindowController;
mFeatureFlags = featureFlags;
mMetricsLogger = metricsLogger;
mLogger = logger;
@@ -437,6 +441,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
new StatusBarLaunchAnimatorController(
mNotificationAnimationProvider.getAnimatorController(row, null),
mCentralSurfaces,
+ mNotificationShadeWindowController,
isActivityIntent);
mActivityLaunchAnimator.startPendingIntentWithAnimation(
animationController,
@@ -475,7 +480,9 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
ActivityLaunchAnimator.Controller animationController =
new StatusBarLaunchAnimatorController(
mNotificationAnimationProvider.getAnimatorController(row),
- mCentralSurfaces, true /* isActivityIntent */);
+ mCentralSurfaces,
+ mNotificationShadeWindowController,
+ true /* isActivityIntent */);
mActivityLaunchAnimator.startIntentWithAnimation(
animationController, animate, intent.getPackage(),
@@ -520,9 +527,11 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
);
ActivityLaunchAnimator.Controller animationController =
viewController == null ? null
- : new StatusBarLaunchAnimatorController(viewController,
+ : new StatusBarLaunchAnimatorController(
+ viewController,
mCentralSurfaces,
- true /* isActivityIntent */);
+ mNotificationShadeWindowController,
+ true /* isActivityIntent */);
mActivityLaunchAnimator.startIntentWithAnimation(animationController, animate,
intent.getPackage(),
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt
index 592d1aa8f43f..96a4d900c160 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt
@@ -22,6 +22,7 @@ import com.android.systemui.keyguard.KeyguardViewMediator
import com.android.systemui.keyguard.WakefulnessLifecycle
import com.android.systemui.statusbar.CircleReveal
import com.android.systemui.statusbar.LightRevealScrim
+import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.statusbar.StatusBarStateControllerImpl
import com.android.systemui.statusbar.notification.AnimatableProperty
@@ -60,6 +61,7 @@ class UnlockedScreenOffAnimationController @Inject constructor(
private val keyguardStateController: KeyguardStateController,
private val dozeParameters: dagger.Lazy<DozeParameters>,
private val globalSettings: GlobalSettings,
+ private val notifShadeWindowControllerLazy: dagger.Lazy<NotificationShadeWindowController>,
private val interactionJankMonitor: InteractionJankMonitor,
private val powerManager: PowerManager,
private val handler: Handler = Handler()
@@ -114,7 +116,7 @@ class UnlockedScreenOffAnimationController @Inject constructor(
override fun onAnimationStart(animation: Animator?) {
interactionJankMonitor.begin(
- mCentralSurfaces.notificationShadeWindowView, CUJ_SCREEN_OFF)
+ notifShadeWindowControllerLazy.get().windowRootView, CUJ_SCREEN_OFF)
}
})
}
@@ -218,7 +220,7 @@ class UnlockedScreenOffAnimationController @Inject constructor(
.setCustomInterpolator(View.ALPHA, Interpolators.FAST_OUT_SLOW_IN),
true /* animate */)
interactionJankMonitor.begin(
- mCentralSurfaces.notificationShadeWindowView,
+ notifShadeWindowControllerLazy.get().windowRootView,
CUJ_SCREEN_OFF_SHOW_AOD
)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java
index 9b8605dccd09..8d306cceeaa7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java
@@ -52,6 +52,7 @@ import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.settings.DisplayTracker;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.policy.KeyguardStateController;
@@ -112,6 +113,9 @@ public class NavBarHelperTest extends SysuiTestCase {
EdgeBackGestureHandler mEdgeBackGestureHandler;
@Mock
EdgeBackGestureHandler.Factory mEdgeBackGestureHandlerFactory;
+ @Mock
+ NotificationShadeWindowController mNotificationShadeWindowController;
+
private AccessibilityManager.AccessibilityServicesStateChangeListener
mAccessibilityServicesStateChangeListener;
@@ -136,7 +140,7 @@ public class NavBarHelperTest extends SysuiTestCase {
mSystemActions, mOverviewProxyService, mAssistManagerLazy,
() -> Optional.of(mock(CentralSurfaces.class)), mock(KeyguardStateController.class),
mNavigationModeController, mEdgeBackGestureHandlerFactory, mWm, mUserTracker,
- mDisplayTracker, mDumpManager, mCommandQueue);
+ mDisplayTracker, mNotificationShadeWindowController, mDumpManager, mCommandQueue);
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java
index f062ec732b21..25d494cee5e8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java
@@ -99,6 +99,7 @@ import com.android.systemui.shared.system.TaskStackChangeListeners;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.NotificationShadeDepthController;
+import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.phone.AutoHideController;
import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.phone.LightBarController;
@@ -209,6 +210,8 @@ public class NavigationBarTest extends SysuiTestCase {
private EdgeBackGestureHandler.Factory mEdgeBackGestureHandlerFactory;
@Mock
private EdgeBackGestureHandler mEdgeBackGestureHandler;
+ @Mock
+ private NotificationShadeWindowController mNotificationShadeWindowController;
private FakeExecutor mFakeExecutor = new FakeExecutor(new FakeSystemClock());
private DeviceConfigProxyFake mDeviceConfigProxyFake = new DeviceConfigProxyFake();
private TaskStackChangeListeners mTaskStackChangeListeners =
@@ -256,7 +259,8 @@ public class NavigationBarTest extends SysuiTestCase {
() -> mock(AssistManager.class), () -> Optional.of(mCentralSurfaces),
mKeyguardStateController, mock(NavigationModeController.class),
mEdgeBackGestureHandlerFactory, mock(IWindowManager.class),
- mock(UserTracker.class), mock(DisplayTracker.class), mock(DumpManager.class),
+ mock(UserTracker.class), mock(DisplayTracker.class),
+ mNotificationShadeWindowController, mock(DumpManager.class),
mock(CommandQueue.class)));
mNavigationBar = createNavBar(mContext);
mExternalDisplayNavigationBar = createNavBar(mSysuiTestableContextExternal);
@@ -339,7 +343,6 @@ public class NavigationBarTest extends SysuiTestCase {
NotificationShadeWindowView mockShadeWindowView = mock(NotificationShadeWindowView.class);
WindowInsets windowInsets = new WindowInsets.Builder().setVisible(ime(), false).build();
doReturn(windowInsets).when(mockShadeWindowView).getRootWindowInsets();
- doReturn(mockShadeWindowView).when(mCentralSurfaces).getNotificationShadeWindowView();
doReturn(true).when(mockShadeWindowView).isAttachedToWindow();
doNothing().when(defaultNavBar).checkNavBarModes();
doNothing().when(externalNavBar).checkNavBarModes();
@@ -375,7 +378,7 @@ public class NavigationBarTest extends SysuiTestCase {
@Test
public void testSetImeWindowStatusWhenKeyguardLockingAndImeInsetsChange() {
NotificationShadeWindowView mockShadeWindowView = mock(NotificationShadeWindowView.class);
- doReturn(mockShadeWindowView).when(mCentralSurfaces).getNotificationShadeWindowView();
+ doReturn(mockShadeWindowView).when(mNotificationShadeWindowController).getWindowRootView();
doReturn(true).when(mockShadeWindowView).isAttachedToWindow();
doNothing().when(mNavigationBar).checkNavBarModes();
mNavigationBar.init();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt
index 4a3080050a37..442ba0977cf6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt
@@ -31,6 +31,7 @@ import com.android.systemui.plugins.ActivityStarter.OnDismissAction
import com.android.systemui.settings.UserTracker
import com.android.systemui.shade.ShadeController
import com.android.systemui.statusbar.NotificationLockscreenUserManager
+import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.policy.DeviceProvisionedController
@@ -68,6 +69,7 @@ class ActivityStarterImplTest : SysuiTestCase() {
@Mock private lateinit var activityLaunchAnimator: ActivityLaunchAnimator
@Mock private lateinit var lockScreenUserManager: NotificationLockscreenUserManager
@Mock private lateinit var statusBarWindowController: StatusBarWindowController
+ @Mock private lateinit var notifShadeWindowController: NotificationShadeWindowController
@Mock private lateinit var wakefulnessLifecycle: WakefulnessLifecycle
@Mock private lateinit var keyguardStateController: KeyguardStateController
@Mock private lateinit var statusBarStateController: SysuiStatusBarStateController
@@ -90,6 +92,7 @@ class ActivityStarterImplTest : SysuiTestCase() {
Lazy { keyguardViewMediator },
Lazy { shadeController },
Lazy { statusBarKeyguardViewManager },
+ Lazy { notifShadeWindowController },
activityLaunchAnimator,
context,
lockScreenUserManager,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
index 3eea93c6ec2c..8ad522ac3d6f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
@@ -135,6 +135,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
@Mock private BouncerView mBouncerView;
@Mock private BouncerViewDelegate mBouncerViewDelegate;
@Mock private OnBackAnimationCallback mBouncerViewDelegateBackCallback;
+ @Mock private NotificationShadeWindowController mNotificationShadeWindowController;
@Mock private NotificationShadeWindowView mNotificationShadeWindowView;
@Mock private WindowInsetsController mWindowInsetsController;
@Mock private TaskbarDelegate mTaskbarDelegate;
@@ -168,7 +169,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
.isEnabled(Flags.WM_ENABLE_PREDICTIVE_BACK_BOUNCER_ANIM))
.thenReturn(true);
- when(mCentralSurfaces.getNotificationShadeWindowView())
+ when(mNotificationShadeWindowController.getWindowRootView())
.thenReturn(mNotificationShadeWindowView);
when(mNotificationShadeWindowView.getWindowInsetsController())
.thenReturn(mWindowInsetsController);
@@ -184,7 +185,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
mDreamOverlayStateController,
mock(NavigationModeController.class),
mock(DockManager.class),
- mock(NotificationShadeWindowController.class),
+ mNotificationShadeWindowController,
mKeyguardStateController,
mock(NotificationMediaManager.class),
mKeyguardMessageAreaFactory,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterTest.java
index d6ae2b711583..d44af885a27e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterTest.java
@@ -73,6 +73,7 @@ import com.android.systemui.statusbar.NotificationClickNotifier;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
+import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
@@ -233,6 +234,7 @@ public class StatusBarNotificationActivityStarterTest extends SysuiTestCase {
mCentralSurfaces,
mock(NotificationPresenter.class),
mock(ShadeViewController.class),
+ mock(NotificationShadeWindowController.class),
mActivityLaunchAnimator,
notificationAnimationProvider,
mock(LaunchFullScreenIntentProvider.class),
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationControllerTest.kt
index ea534bbd0794..2e9a6909e402 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationControllerTest.kt
@@ -28,6 +28,7 @@ import com.android.systemui.keyguard.KeyguardViewMediator
import com.android.systemui.keyguard.WakefulnessLifecycle
import com.android.systemui.shade.ShadeViewController
import com.android.systemui.statusbar.LightRevealScrim
+import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.StatusBarStateControllerImpl
import com.android.systemui.statusbar.policy.KeyguardStateController
import com.android.systemui.util.mockito.eq
@@ -65,6 +66,8 @@ class UnlockedScreenOffAnimationControllerTest : SysuiTestCase() {
@Mock
private lateinit var shadeViewController: ShadeViewController
@Mock
+ private lateinit var notifShadeWindowController: NotificationShadeWindowController
+ @Mock
private lateinit var lightRevealScrim: LightRevealScrim
@Mock
private lateinit var wakefulnessLifecycle: WakefulnessLifecycle
@@ -89,6 +92,7 @@ class UnlockedScreenOffAnimationControllerTest : SysuiTestCase() {
keyguardStateController,
dagger.Lazy<DozeParameters> { dozeParameters },
globalSettings,
+ dagger.Lazy<NotificationShadeWindowController> { notifShadeWindowController },
interactionJankMonitor,
powerManager,
handler = handler