Delete CentralSurfaces.getShadeViewController
Fixes: 288868098 Test: updated and ran affected tests Change-Id: Ic169e34e058abee5dd76aa0cb860c5f1965916a1
This commit is contained in:
@@ -78,7 +78,6 @@ import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.internal.app.AssistUtils;
|
||||
import com.android.internal.app.IVoiceInteractionSessionListener;
|
||||
import com.android.internal.logging.UiEventLogger;
|
||||
import com.android.internal.policy.ScreenDecorationsUtils;
|
||||
import com.android.internal.util.ScreenshotHelper;
|
||||
import com.android.internal.util.ScreenshotRequest;
|
||||
import com.android.systemui.Dumpable;
|
||||
@@ -143,6 +142,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
|
||||
private final Executor mMainExecutor;
|
||||
private final ShellInterface mShellInterface;
|
||||
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
|
||||
private final Lazy<ShadeViewController> mShadeViewControllerLazy;
|
||||
private SysUiState mSysUiState;
|
||||
private final Handler mHandler;
|
||||
private final Lazy<NavigationBarController> mNavBarControllerLazy;
|
||||
@@ -201,11 +201,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
|
||||
// TODO move this logic to message queue
|
||||
mCentralSurfacesOptionalLazy.get().ifPresent(centralSurfaces -> {
|
||||
if (event.getActionMasked() == ACTION_DOWN) {
|
||||
ShadeViewController shadeViewController =
|
||||
centralSurfaces.getShadeViewController();
|
||||
if (shadeViewController != null) {
|
||||
shadeViewController.startExpandLatencyTracking();
|
||||
}
|
||||
mShadeViewControllerLazy.get().startExpandLatencyTracking();
|
||||
}
|
||||
mHandler.post(() -> {
|
||||
int action = event.getActionMasked();
|
||||
@@ -552,8 +548,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
|
||||
ShellInterface shellInterface,
|
||||
Lazy<NavigationBarController> navBarControllerLazy,
|
||||
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
|
||||
Lazy<ShadeViewController> shadeViewControllerLazy,
|
||||
NavigationModeController navModeController,
|
||||
NotificationShadeWindowController statusBarWinController, SysUiState sysUiState,
|
||||
NotificationShadeWindowController statusBarWinController,
|
||||
SysUiState sysUiState,
|
||||
UserTracker userTracker,
|
||||
ScreenLifecycle screenLifecycle,
|
||||
WakefulnessLifecycle wakefulnessLifecycle,
|
||||
@@ -573,6 +571,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
|
||||
mMainExecutor = mainExecutor;
|
||||
mShellInterface = shellInterface;
|
||||
mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy;
|
||||
mShadeViewControllerLazy = shadeViewControllerLazy;
|
||||
mHandler = new Handler();
|
||||
mNavBarControllerLazy = navBarControllerLazy;
|
||||
mStatusBarWinController = statusBarWinController;
|
||||
@@ -677,13 +676,10 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
|
||||
mNavBarControllerLazy.get().getDefaultNavigationBar();
|
||||
final NavigationBarView navBarView =
|
||||
mNavBarControllerLazy.get().getNavigationBarView(mContext.getDisplayId());
|
||||
final ShadeViewController panelController =
|
||||
mCentralSurfacesOptionalLazy.get()
|
||||
.map(CentralSurfaces::getShadeViewController)
|
||||
.orElse(null);
|
||||
if (SysUiState.DEBUG) {
|
||||
Log.d(TAG_OPS, "Updating sysui state flags: navBarFragment=" + navBarFragment
|
||||
+ " navBarView=" + navBarView + " panelController=" + panelController);
|
||||
+ " navBarView=" + navBarView
|
||||
+ " shadeViewController=" + mShadeViewControllerLazy.get());
|
||||
}
|
||||
|
||||
if (navBarFragment != null) {
|
||||
@@ -692,9 +688,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
|
||||
if (navBarView != null) {
|
||||
navBarView.updateDisabledSystemUiStateFlags(mSysUiState);
|
||||
}
|
||||
if (panelController != null) {
|
||||
panelController.updateSystemUiStateFlags();
|
||||
}
|
||||
mShadeViewControllerLazy.get().updateSystemUiStateFlags();
|
||||
if (mStatusBarWinController != null) {
|
||||
mStatusBarWinController.notifyStateChangedCallbacks();
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ import com.android.systemui.plugins.ActivityStarter
|
||||
import com.android.systemui.plugins.ActivityStarter.OnDismissAction
|
||||
import com.android.systemui.settings.UserTracker
|
||||
import com.android.systemui.shade.ShadeController
|
||||
import com.android.systemui.shade.ShadeViewController
|
||||
import com.android.systemui.statusbar.NotificationLockscreenUserManager
|
||||
import com.android.systemui.statusbar.NotificationShadeWindowController
|
||||
import com.android.systemui.statusbar.SysuiStatusBarStateController
|
||||
@@ -69,6 +70,7 @@ constructor(
|
||||
private val biometricUnlockControllerLazy: Lazy<BiometricUnlockController>,
|
||||
private val keyguardViewMediatorLazy: Lazy<KeyguardViewMediator>,
|
||||
private val shadeControllerLazy: Lazy<ShadeController>,
|
||||
private val shadeViewControllerLazy: Lazy<ShadeViewController>,
|
||||
private val statusBarKeyguardViewManagerLazy: Lazy<StatusBarKeyguardViewManager>,
|
||||
private val notifShadeWindowControllerLazy: Lazy<NotificationShadeWindowController>,
|
||||
private val activityLaunchAnimator: ActivityLaunchAnimator,
|
||||
@@ -896,7 +898,7 @@ constructor(
|
||||
if (dismissShade) {
|
||||
return StatusBarLaunchAnimatorController(
|
||||
animationController,
|
||||
it.shadeViewController,
|
||||
shadeViewControllerLazy.get(),
|
||||
shadeControllerLazy.get(),
|
||||
notifShadeWindowControllerLazy.get(),
|
||||
isLaunchForActivity
|
||||
|
||||
@@ -44,7 +44,6 @@ import com.android.systemui.display.data.repository.DisplayMetricsRepository;
|
||||
import com.android.systemui.navigationbar.NavigationBarView;
|
||||
import com.android.systemui.plugins.ActivityStarter.OnDismissAction;
|
||||
import com.android.systemui.qs.QSPanelController;
|
||||
import com.android.systemui.shade.ShadeViewController;
|
||||
import com.android.systemui.shared.system.RemoteAnimationRunnerCompat;
|
||||
import com.android.systemui.statusbar.NotificationPresenter;
|
||||
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
|
||||
@@ -195,9 +194,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {
|
||||
@Override
|
||||
Lifecycle getLifecycle();
|
||||
|
||||
/** */
|
||||
ShadeViewController getShadeViewController();
|
||||
|
||||
/** Get the Keyguard Message Area that displays auth messages. */
|
||||
AuthKeyguardMessageArea getKeyguardMessageArea();
|
||||
|
||||
|
||||
@@ -1677,8 +1677,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
|
||||
Trace.endSection();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShadeViewController getShadeViewController() {
|
||||
protected ShadeViewController getShadeViewController() {
|
||||
return mShadeSurface;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.android.systemui.navigationbar.NavigationModeController
|
||||
import com.android.systemui.recents.OverviewProxyService.ACTION_QUICKSTEP
|
||||
import com.android.systemui.settings.FakeDisplayTracker
|
||||
import com.android.systemui.settings.UserTracker
|
||||
import com.android.systemui.shade.ShadeViewController
|
||||
import com.android.systemui.shared.recents.IOverviewProxy
|
||||
import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_WAKEFULNESS_MASK
|
||||
import com.android.systemui.shared.system.QuickStepContract.WAKEFULNESS_ASLEEP
|
||||
@@ -93,6 +94,7 @@ class OverviewProxyServiceTest : SysuiTestCase() {
|
||||
@Mock private lateinit var shellInterface: ShellInterface
|
||||
@Mock private lateinit var navBarController: NavigationBarController
|
||||
@Mock private lateinit var centralSurfaces: CentralSurfaces
|
||||
@Mock private lateinit var shadeViewController: ShadeViewController
|
||||
@Mock private lateinit var navModeController: NavigationModeController
|
||||
@Mock private lateinit var statusBarWinController: NotificationShadeWindowController
|
||||
@Mock private lateinit var userTracker: UserTracker
|
||||
@@ -132,6 +134,7 @@ class OverviewProxyServiceTest : SysuiTestCase() {
|
||||
shellInterface,
|
||||
Lazy { navBarController },
|
||||
Lazy { Optional.of(centralSurfaces) },
|
||||
Lazy { shadeViewController },
|
||||
navModeController,
|
||||
statusBarWinController,
|
||||
sysUiState,
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.android.systemui.keyguard.WakefulnessLifecycle
|
||||
import com.android.systemui.plugins.ActivityStarter.OnDismissAction
|
||||
import com.android.systemui.settings.UserTracker
|
||||
import com.android.systemui.shade.ShadeController
|
||||
import com.android.systemui.shade.ShadeViewController
|
||||
import com.android.systemui.statusbar.NotificationLockscreenUserManager
|
||||
import com.android.systemui.statusbar.NotificationShadeWindowController
|
||||
import com.android.systemui.statusbar.SysuiStatusBarStateController
|
||||
@@ -65,6 +66,7 @@ class ActivityStarterImplTest : SysuiTestCase() {
|
||||
@Mock private lateinit var biometricUnlockController: BiometricUnlockController
|
||||
@Mock private lateinit var keyguardViewMediator: KeyguardViewMediator
|
||||
@Mock private lateinit var shadeController: ShadeController
|
||||
@Mock private lateinit var shadeViewController: ShadeViewController
|
||||
@Mock private lateinit var statusBarKeyguardViewManager: StatusBarKeyguardViewManager
|
||||
@Mock private lateinit var activityLaunchAnimator: ActivityLaunchAnimator
|
||||
@Mock private lateinit var lockScreenUserManager: NotificationLockscreenUserManager
|
||||
@@ -91,6 +93,7 @@ class ActivityStarterImplTest : SysuiTestCase() {
|
||||
Lazy { biometricUnlockController },
|
||||
Lazy { keyguardViewMediator },
|
||||
Lazy { shadeController },
|
||||
Lazy { shadeViewController },
|
||||
Lazy { statusBarKeyguardViewManager },
|
||||
Lazy { notifShadeWindowController },
|
||||
activityLaunchAnimator,
|
||||
|
||||
@@ -140,8 +140,6 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
|
||||
@Test
|
||||
fun handleTouchEventFromStatusBar_viewNotEnabled_returnsTrueAndNoViewEvent() {
|
||||
`when`(centralSurfacesImpl.commandQueuePanelsEnabled).thenReturn(true)
|
||||
`when`(centralSurfacesImpl.shadeViewController)
|
||||
.thenReturn(shadeViewController)
|
||||
`when`(shadeViewController.isViewEnabled).thenReturn(false)
|
||||
val returnVal = view.onTouchEvent(
|
||||
MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_DOWN, 0f, 0f, 0))
|
||||
@@ -152,8 +150,6 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
|
||||
@Test
|
||||
fun handleTouchEventFromStatusBar_viewNotEnabledButIsMoveEvent_viewReceivesEvent() {
|
||||
`when`(centralSurfacesImpl.commandQueuePanelsEnabled).thenReturn(true)
|
||||
`when`(centralSurfacesImpl.shadeViewController)
|
||||
.thenReturn(shadeViewController)
|
||||
`when`(shadeViewController.isViewEnabled).thenReturn(false)
|
||||
val event = MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_MOVE, 0f, 0f, 0)
|
||||
|
||||
@@ -165,8 +161,6 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
|
||||
@Test
|
||||
fun handleTouchEventFromStatusBar_panelAndViewEnabled_viewReceivesEvent() {
|
||||
`when`(centralSurfacesImpl.commandQueuePanelsEnabled).thenReturn(true)
|
||||
`when`(centralSurfacesImpl.shadeViewController)
|
||||
.thenReturn(shadeViewController)
|
||||
`when`(shadeViewController.isViewEnabled).thenReturn(true)
|
||||
val event = MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_DOWN, 0f, 2f, 0)
|
||||
|
||||
@@ -178,8 +172,6 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() {
|
||||
@Test
|
||||
fun handleTouchEventFromStatusBar_topEdgeTouch_viewNeverReceivesEvent() {
|
||||
`when`(centralSurfacesImpl.commandQueuePanelsEnabled).thenReturn(true)
|
||||
`when`(centralSurfacesImpl.shadeViewController)
|
||||
.thenReturn(shadeViewController)
|
||||
`when`(shadeViewController.isFullyCollapsed).thenReturn(true)
|
||||
val event = MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_DOWN, 0f, 0f, 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user