From b5ee453ee240f5f0aa1d6b862839449c583fcc15 Mon Sep 17 00:00:00 2001 From: Dave Mankoff Date: Thu, 14 Apr 2022 21:45:30 +0000 Subject: [PATCH 1/2] Make CentralSurfaces an Interface. CentralSurfaces is now an interface. It is a very large and ugly one. This allows us to remove the provider in StatusBarPhoneModule, and will make it easier to control how the Optional for CentralSurfaces is setup. It is renamed CentralSurfacesInt temporarily to allow maintenance of the blame and history of CentralSurfaces in CentralSurfacesImpl. Bug: 229228871 Test: atest SystemUITests && manual Change-Id: Iab41b70e0c65d75560010d961dcb52a11fd237f5 --- packages/SystemUI/proguard.flags | 2 +- .../keyguard/KeyguardViewController.java | 4 +- .../systemui/ActivityStarterDelegate.java | 6 +- .../systemui/accessibility/SystemActions.java | 12 +- .../systemui/assist/PhoneStateMonitor.java | 8 +- .../biometrics/AuthRippleController.kt | 4 +- .../systemui/dagger/SystemUIModule.java | 4 +- .../touch/BouncerSwipeTouchHandler.java | 10 +- .../GlobalActionsDialogLite.java | 24 +- .../keyguard/KeyguardViewMediator.java | 4 +- .../systemui/navigationbar/NavBarHelper.java | 6 +- .../systemui/navigationbar/NavigationBar.java | 24 +- .../navigationbar/NavigationBarView.java | 4 +- .../com/android/systemui/power/PowerUI.java | 10 +- .../com/android/systemui/qs/QSTileHost.java | 12 +- .../recents/OverviewProxyRecentsImpl.java | 10 +- .../recents/OverviewProxyService.java | 8 +- .../recents/ScreenPinningRequest.java | 12 +- .../screenshot/ActionProxyReceiver.java | 8 +- .../LockscreenShadeTransitionController.kt | 4 +- .../statusbar/NotificationListener.java | 4 +- .../statusbar/NotificationMediaManager.java | 14 +- .../NotificationRemoteInputManager.java | 6 +- .../statusbar/QsFrameTranslateController.java | 6 +- .../statusbar/QsFrameTranslateImpl.java | 4 +- .../SysuiStatusBarStateController.java | 6 +- .../CentralSurfacesDependenciesModule.java | 9 +- .../dagger/StartCentralSurfacesModule.kt | 7 +- .../notification/NotificationClicker.java | 8 +- .../collection/TargetSdkResolver.kt | 4 +- ...LegacyNotificationPresenterExtensions.java | 2 +- .../dagger/NotificationsModule.java | 4 +- .../init/NotificationsControllerImpl.kt | 4 +- .../row/ExpandableNotificationRow.java | 4 +- .../row/NotificationContentInflater.java | 4 +- .../row/NotificationGutsManager.java | 18 +- .../ExpandableNotificationRowComponent.java | 4 +- .../stack/NotificationStackScrollLayout.java | 6 +- ...tificationStackScrollLayoutController.java | 6 +- .../phone/BiometricUnlockController.java | 2 +- .../CentralSurfacesCommandQueueCallbacks.java | 50 +- ...Surfaces.java => CentralSurfacesImpl.java} | 416 +++++++------ .../statusbar/phone/CentralSurfacesInt.java | 587 ++++++++++++++++++ .../statusbar/phone/DozeServiceHost.java | 4 +- .../phone/KeyguardBottomAreaView.java | 4 +- .../phone/KeyguardEnvironmentImpl.java | 4 +- .../NotificationPanelViewController.java | 4 +- ...NotificationShadeWindowControllerImpl.java | 2 +- .../phone/NotificationShadeWindowView.java | 2 +- ...NotificationShadeWindowViewController.java | 6 +- .../systemui/statusbar/phone/PanelView.java | 2 +- .../statusbar/phone/PanelViewController.java | 2 +- .../phone/ScreenOffAnimationController.kt | 4 +- .../statusbar/phone/ScrimController.java | 2 +- .../systemui/statusbar/phone/ScrimState.java | 2 +- .../statusbar/phone/ShadeController.java | 4 +- .../statusbar/phone/ShadeControllerImpl.java | 6 +- .../phone/StatusBarHeadsUpChangeListener.java | 2 +- .../phone/StatusBarKeyguardViewManager.java | 6 +- .../StatusBarLaunchAnimatorController.kt | 2 +- .../StatusBarNotificationActivityStarter.java | 6 +- .../phone/StatusBarNotificationPresenter.java | 10 +- .../StatusBarTouchableRegionManager.java | 4 +- .../UnlockedScreenOffAnimationController.kt | 4 +- .../dagger/CentralSurfacesComponent.java | 3 +- .../phone/dagger/StatusBarPhoneModule.java | 307 +-------- .../dagger/StatusBarFragmentComponent.java | 2 - .../window/StatusBarWindowStateController.kt | 6 +- .../unfold/FoldAodAnimationController.kt | 6 +- .../biometrics/AuthRippleControllerTest.kt | 4 +- .../touch/BouncerSwipeTouchHandlerTest.java | 4 +- .../GlobalActionsDialogLiteTest.java | 4 +- .../navigationbar/NavBarHelperTest.java | 4 +- .../navigationbar/NavigationBarTest.java | 4 +- .../android/systemui/power/PowerUITest.java | 6 +- .../android/systemui/qs/QSFragmentTest.java | 4 +- .../android/systemui/qs/QSTileHostTest.java | 6 +- .../qs/external/TileServicesTest.java | 4 +- .../screenshot/ActionProxyReceiverTest.java | 6 +- ...LockscreenShadeTransitionControllerTest.kt | 4 +- .../NotificationRemoteInputManagerTest.java | 6 +- .../statusbar/SmartReplyControllerTest.java | 4 +- .../row/NotificationGutsManagerTest.java | 4 +- ...cationStackScrollLayoutControllerTest.java | 4 +- .../NotificationStackScrollLayoutTest.java | 4 +- ...tralSurfacesCommandQueueCallbacksTest.java | 2 +- ...Test.java => CentralSurfacesImplTest.java} | 10 +- .../statusbar/phone/DozeServiceHostTest.java | 2 +- .../statusbar/phone/KeyguardBottomAreaTest.kt | 2 +- .../NotificationPanelViewControllerTest.java | 2 +- ...tificationShadeWindowViewControllerTest.kt | 2 +- .../NotificationShadeWindowViewTest.java | 2 +- .../StatusBarKeyguardViewManagerTest.java | 2 +- ...tusBarNotificationActivityStarterTest.java | 2 +- .../StatusBarNotificationPresenterTest.java | 2 +- ...nlockedScreenOffAnimationControllerTest.kt | 2 +- 96 files changed, 1083 insertions(+), 776 deletions(-) rename packages/SystemUI/src/com/android/systemui/statusbar/phone/{CentralSurfaces.java => CentralSurfacesImpl.java} (95%) create mode 100644 packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesInt.java rename packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/{CentralSurfacesTest.java => CentralSurfacesImplTest.java} (99%) diff --git a/packages/SystemUI/proguard.flags b/packages/SystemUI/proguard.flags index e74b6c78ec804..0dc6c69acfeab 100644 --- a/packages/SystemUI/proguard.flags +++ b/packages/SystemUI/proguard.flags @@ -3,7 +3,7 @@ -keep class com.android.systemui.recents.OverviewProxyRecentsImpl -keep class com.android.systemui.statusbar.car.CarStatusBar --keep class com.android.systemui.statusbar.phone.CentralSurfaces +-keep class com.android.systemui.statusbar.phone.CentralSurfacesInt -keep class com.android.systemui.statusbar.tv.TvStatusBar -keep class com.android.systemui.car.CarSystemUIFactory -keep class com.android.systemui.SystemUIFactory diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java index ca8728aecb4cb..ad614625e85b6 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java @@ -24,7 +24,7 @@ import androidx.annotation.Nullable; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.statusbar.phone.BiometricUnlockController; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManager; @@ -183,7 +183,7 @@ public interface KeyguardViewController { /** * Registers the CentralSurfaces to which this Keyguard View is mounted. */ - void registerCentralSurfaces(CentralSurfaces centralSurfaces, + void registerCentralSurfaces(CentralSurfacesInt centralSurfaces, NotificationPanelViewController notificationPanelViewController, @Nullable PanelExpansionStateManager panelExpansionStateManager, BiometricUnlockController biometricUnlockController, diff --git a/packages/SystemUI/src/com/android/systemui/ActivityStarterDelegate.java b/packages/SystemUI/src/com/android/systemui/ActivityStarterDelegate.java index 7af6f6677f3f5..02216467ed286 100644 --- a/packages/SystemUI/src/com/android/systemui/ActivityStarterDelegate.java +++ b/packages/SystemUI/src/com/android/systemui/ActivityStarterDelegate.java @@ -24,7 +24,7 @@ import androidx.annotation.Nullable; import com.android.systemui.animation.ActivityLaunchAnimator; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.plugins.ActivityStarter; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import java.util.Optional; @@ -40,10 +40,10 @@ import dagger.Lazy; @SysUISingleton public class ActivityStarterDelegate implements ActivityStarter { - private Lazy> mActualStarterOptionalLazy; + private Lazy> mActualStarterOptionalLazy; @Inject - public ActivityStarterDelegate(Lazy> centralSurfacesOptionalLazy) { + public ActivityStarterDelegate(Lazy> centralSurfacesOptionalLazy) { mActualStarterOptionalLazy = centralSurfacesOptionalLazy; } diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java index bd8e44ceab803..8c29b0cd6615f 100644 --- a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java +++ b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java @@ -54,7 +54,7 @@ import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.recents.Recents; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.NotificationShadeWindowController; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.StatusBarWindowCallback; import com.android.systemui.util.Assert; @@ -180,7 +180,7 @@ public class SystemActions extends CoreStartable { private final Optional mRecentsOptional; private Locale mLocale; private final AccessibilityManager mA11yManager; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final NotificationShadeWindowController mNotificationShadeController; private final StatusBarWindowCallback mNotificationShadeCallback; private boolean mDismissNotificationShadeActionRegistered; @@ -188,7 +188,7 @@ public class SystemActions extends CoreStartable { @Inject public SystemActions(Context context, NotificationShadeWindowController notificationShadeController, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, Optional recentsOptional) { super(context); mRecentsOptional = recentsOptional; @@ -311,9 +311,9 @@ public class SystemActions extends CoreStartable { // Saving state in instance variable since this callback is called quite often to avoid // binder calls - final Optional centralSurfacesOptional = + final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); - if (centralSurfacesOptional.map(CentralSurfaces::isPanelExpanded).orElse(false) + if (centralSurfacesOptional.map(CentralSurfacesInt::isPanelExpanded).orElse(false) && !centralSurfacesOptional.get().isKeyguardShowing()) { if (!mDismissNotificationShadeActionRegistered) { mA11yManager.registerSystemAction( @@ -467,7 +467,7 @@ public class SystemActions extends CoreStartable { } private void handleNotifications() { - mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::animateExpandNotificationsPanel); + mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::animateExpandNotificationsPanel); } private void handleQuickSettings() { diff --git a/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java b/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java index dfff00b90ef2d..6a7a938ffdf4f 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java +++ b/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java @@ -36,7 +36,7 @@ import com.android.systemui.shared.system.PackageManagerWrapper; import com.android.systemui.shared.system.TaskStackChangeListener; import com.android.systemui.shared.system.TaskStackChangeListeners; import com.android.systemui.statusbar.StatusBarState; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import java.util.ArrayList; import java.util.List; @@ -69,7 +69,7 @@ public final class PhoneStateMonitor { }; private final Context mContext; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final StatusBarStateController mStatusBarStateController; private boolean mLauncherShowing; @@ -77,7 +77,7 @@ public final class PhoneStateMonitor { @Inject PhoneStateMonitor(Context context, BroadcastDispatcher broadcastDispatcher, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, BootCompleteCache bootCompleteCache, StatusBarStateController statusBarStateController) { mContext = context; @@ -182,7 +182,7 @@ public final class PhoneStateMonitor { private boolean isBouncerShowing() { return mCentralSurfacesOptionalLazy.get() - .map(CentralSurfaces::isBouncerShowing).orElse(false); + .map(CentralSurfacesInt::isBouncerShowing).orElse(false); } private boolean isKeyguardLocked() { diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt index 76c1dbcaf20c7..9e1951cff5070 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt @@ -40,7 +40,7 @@ import com.android.systemui.statusbar.NotificationShadeWindowController import com.android.systemui.statusbar.commandline.Command import com.android.systemui.statusbar.commandline.CommandRegistry import com.android.systemui.statusbar.phone.BiometricUnlockController -import com.android.systemui.statusbar.phone.CentralSurfaces +import com.android.systemui.statusbar.phone.CentralSurfacesInt import com.android.systemui.statusbar.phone.KeyguardBypassController import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent.CentralSurfacesScope import com.android.systemui.statusbar.policy.ConfigurationController @@ -61,7 +61,7 @@ import javax.inject.Provider */ @CentralSurfacesScope class AuthRippleController @Inject constructor( - private val centralSurfaces: CentralSurfaces, + private val centralSurfaces: CentralSurfacesInt, private val sysuiContext: Context, private val authController: AuthController, private val configurationController: ConfigurationController, diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java index bbeb66c5af522..72a0f2f0ee61a 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java @@ -67,7 +67,7 @@ import com.android.systemui.statusbar.notification.people.PeopleHubModule; import com.android.systemui.statusbar.notification.row.dagger.ExpandableNotificationRowComponent; import com.android.systemui.statusbar.notification.row.dagger.NotificationRowComponent; import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfComponent; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent; import com.android.systemui.statusbar.policy.ConfigurationController; @@ -178,7 +178,7 @@ public abstract class SystemUIModule { abstract Recents optionalRecents(); @BindsOptionalOf - abstract CentralSurfaces optionalCentralSurfaces(); + abstract CentralSurfacesInt optionalCentralSurfaces(); @BindsOptionalOf abstract UdfpsHbmProvider optionalUdfpsHbmProvider(); diff --git a/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java b/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java index f5575a25aec30..c8834f269fea2 100644 --- a/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java +++ b/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java @@ -37,7 +37,7 @@ import androidx.annotation.VisibleForTesting; import com.android.internal.logging.UiEvent; import com.android.internal.logging.UiEventLogger; import com.android.systemui.statusbar.NotificationShadeWindowController; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.KeyguardBouncer; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.panelstate.PanelExpansionChangeEvent; @@ -79,7 +79,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler { private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private float mCurrentExpansion; - private final Optional mCentralSurfaces; + private final Optional mCentralSurfaces; private VelocityTracker mVelocityTracker; @@ -110,7 +110,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler { // scrolls. mCapture = Math.abs(distanceY) > Math.abs(distanceX); mBouncerInitiallyShowing = mCentralSurfaces - .map(CentralSurfaces::isBouncerShowing) + .map(CentralSurfacesInt::isBouncerShowing) .orElse(false); if (mCapture) { @@ -189,7 +189,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler { public BouncerSwipeTouchHandler( DisplayMetrics displayMetrics, StatusBarKeyguardViewManager statusBarKeyguardViewManager, - Optional centralSurfaces, + Optional centralSurfaces, NotificationShadeWindowController notificationShadeWindowController, ValueAnimatorCreator valueAnimatorCreator, VelocityTrackerFactory velocityTrackerFactory, @@ -213,7 +213,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler { @Override public void getTouchInitiationRegion(Region region) { - if (mCentralSurfaces.map(CentralSurfaces::isBouncerShowing).orElse(false)) { + if (mCentralSurfaces.map(CentralSurfacesInt::isBouncerShowing).orElse(false)) { region.op(new Rect(0, 0, mDisplayMetrics.widthPixels, Math.round( mDisplayMetrics.heightPixels * mBouncerZoneScreenPercentage)), diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java index acb080a2eaaab..a244d4bddeb5d 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java @@ -121,7 +121,7 @@ import com.android.systemui.plugins.GlobalActionsPanelPlugin; import com.android.systemui.scrim.ScrimDrawable; import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.VibratorHelper; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.SystemUIDialog; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.KeyguardStateController; @@ -236,7 +236,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene private int mDialogPressDelay = DIALOG_PRESS_DELAY; // ms protected Handler mMainHandler; private int mSmallestScreenWidthDp; - private final Optional mCentralSurfacesOptional; + private final Optional mCentralSurfacesOptional; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final DialogLaunchAnimator mDialogLaunchAnimator; @@ -344,7 +344,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene RingerModeTracker ringerModeTracker, @Main Handler handler, PackageManager packageManager, - Optional centralSurfacesOptional, + Optional centralSurfacesOptional, KeyguardUpdateMonitor keyguardUpdateMonitor, DialogLaunchAnimator dialogLaunchAnimator) { mContext = context; @@ -426,7 +426,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene return mUiEventLogger; } - protected Optional getCentralSurfaces() { + protected Optional getCentralSurfaces() { return mCentralSurfacesOptional; } @@ -874,7 +874,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene mUiEventLogger.log(GlobalActionsEvent.GA_EMERGENCY_DIALER_PRESS); if (mTelecomManager != null) { // Close shade so user sees the activity - mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShade); + mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::collapseShade); Intent intent = mTelecomManager.createLaunchEmergencyDialerIntent( null /* number */); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK @@ -1006,7 +1006,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene mIActivityManager.requestInteractiveBugReport(); } // Close shade so user sees the activity - mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShade); + mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::collapseShade); } catch (RemoteException e) { } } @@ -1026,7 +1026,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene mUiEventLogger.log(GlobalActionsEvent.GA_BUGREPORT_LONG_PRESS); mIActivityManager.requestFullBugReport(); // Close shade so user sees the activity - mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShade); + mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::collapseShade); } catch (RemoteException e) { } return false; @@ -2162,7 +2162,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene protected final Runnable mOnRefreshCallback; private UiEventLogger mUiEventLogger; private GestureDetector mGestureDetector; - private Optional mCentralSurfacesOptional; + private Optional mCentralSurfacesOptional; private KeyguardUpdateMonitor mKeyguardUpdateMonitor; private LockPatternUtils mLockPatternUtils; private float mWindowDimAmount; @@ -2191,7 +2191,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene float distanceY) { if (distanceY < 0 && distanceY > distanceX && e1.getY() <= mCentralSurfacesOptional.map( - CentralSurfaces::getStatusBarHeight).orElse(0)) { + CentralSurfacesInt::getStatusBarHeight).orElse(0)) { // Downwards scroll from top openShadeAndDismiss(); return true; @@ -2204,7 +2204,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene float velocityY) { if (velocityY > 0 && Math.abs(velocityY) > Math.abs(velocityX) && e1.getY() <= mCentralSurfacesOptional.map( - CentralSurfaces::getStatusBarHeight).orElse(0)) { + CentralSurfacesInt::getStatusBarHeight).orElse(0)) { // Downwards fling from top openShadeAndDismiss(); return true; @@ -2219,7 +2219,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene NotificationShadeWindowController notificationShadeWindowController, Runnable onRefreshCallback, boolean keyguardShowing, MyPowerOptionsAdapter powerAdapter, UiEventLogger uiEventLogger, - Optional centralSurfacesOptional, + Optional centralSurfacesOptional, KeyguardUpdateMonitor keyguardUpdateMonitor, LockPatternUtils lockPatternUtils) { // We set dismissOnDeviceLock to false because we have a custom broadcast receiver to @@ -2265,7 +2265,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene private void openShadeAndDismiss() { mUiEventLogger.log(GlobalActionsEvent.GA_CLOSE_TAP_OUTSIDE); - if (mCentralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing).orElse(false)) { + if (mCentralSurfacesOptional.map(CentralSurfacesInt::isKeyguardShowing).orElse(false)) { // match existing lockscreen behavior to open QS when swiping from status bar mCentralSurfacesOptional.ifPresent( centralSurfaces -> centralSurfaces.animateExpandSettingsPanel(null)); diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index bcb440b1297e0..d7eff29bc8136 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -126,7 +126,7 @@ import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.phone.BiometricUnlockController; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.DozeParameters; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.NotificationPanelViewController; @@ -2804,7 +2804,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, * @param bypassController * @return the View Controller for the Keyguard View this class is mediating. */ - public KeyguardViewController registerCentralSurfaces(CentralSurfaces centralSurfaces, + public KeyguardViewController registerCentralSurfaces(CentralSurfacesInt centralSurfaces, NotificationPanelViewController panelView, @Nullable PanelExpansionStateManager panelExpansionStateManager, BiometricUnlockController biometricUnlockController, diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java index 779292c433408..7bdd7ae6f6e1d 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java @@ -50,7 +50,7 @@ import com.android.systemui.dump.DumpManager; import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.system.QuickStepContract; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import java.io.PrintWriter; import java.util.ArrayList; @@ -79,7 +79,7 @@ public final class NavBarHelper implements Dumpable { private final AccessibilityManager mAccessibilityManager; private final Lazy mAssistManagerLazy; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final UserTracker mUserTracker; private final SystemActions mSystemActions; private final AccessibilityButtonModeObserver mAccessibilityButtonModeObserver; @@ -113,7 +113,7 @@ public final class NavBarHelper implements SystemActions systemActions, OverviewProxyService overviewProxyService, Lazy assistManagerLazy, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, NavigationModeController navigationModeController, UserTracker userTracker, DumpManager dumpManager) { diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java index 357ff3834fcb2..f39b92b798a84 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java @@ -54,8 +54,8 @@ import static com.android.systemui.statusbar.phone.BarTransitions.MODE_OPAQUE; import static com.android.systemui.statusbar.phone.BarTransitions.MODE_SEMI_TRANSPARENT; import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSPARENT; import static com.android.systemui.statusbar.phone.BarTransitions.TransitionMode; -import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG_WINDOW_STATE; -import static com.android.systemui.statusbar.phone.CentralSurfaces.dumpBarTransitions; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.DEBUG_WINDOW_STATE; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.dumpBarTransitions; import android.annotation.IdRes; import android.app.ActivityTaskManager; @@ -140,7 +140,7 @@ import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.notification.stack.StackStateAnimator; import com.android.systemui.statusbar.phone.AutoHideController; import com.android.systemui.statusbar.phone.BarTransitions; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.LightBarController; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; @@ -187,7 +187,7 @@ public class NavigationBar extends ViewController implements private final Lazy mAssistManagerLazy; private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private final SysUiState mSysUiFlagsContainer; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final ShadeController mShadeController; private final NotificationRemoteInputManager mNotificationRemoteInputManager; private final OverviewProxyService mOverviewProxyService; @@ -499,7 +499,7 @@ public class NavigationBar extends ViewController implements CommandQueue commandQueue, Optional pipOptional, Optional recentsOptional, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, ShadeController shadeController, NotificationRemoteInputManager notificationRemoteInputManager, NotificationShadeDepthController notificationShadeDepthController, @@ -1189,13 +1189,13 @@ public class NavigationBar extends ViewController implements // If an incoming call is ringing, HOME is totally disabled. // (The user is already on the InCallUI at this point, // and their ONLY options are to answer or reject the call.) - final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); + final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: mHomeBlockedThisTouch = false; if (mTelecomManagerOptional.isPresent() && mTelecomManagerOptional.get().isRinging()) { - if (centralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing) + if (centralSurfacesOptional.map(CentralSurfacesInt::isKeyguardShowing) .orElse(false)) { Log.i(TAG, "Ignoring HOME; there's a ringing incoming call. " + "No heads up"); @@ -1212,7 +1212,7 @@ public class NavigationBar extends ViewController implements case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: mHandler.removeCallbacks(mOnVariableDurationHomeLongClick); - centralSurfacesOptional.ifPresent(CentralSurfaces::awakenDreams); + centralSurfacesOptional.ifPresent(CentralSurfacesInt::awakenDreams); break; } return false; @@ -1246,7 +1246,7 @@ public class NavigationBar extends ViewController implements AssistManager.INVOCATION_TYPE_KEY, AssistManager.INVOCATION_TYPE_HOME_BUTTON_LONG_PRESS); mAssistManagerLazy.get().startAssist(args); - mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::awakenDreams); + mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::awakenDreams); mView.abortCurrentGesture(); return true; } @@ -1272,7 +1272,7 @@ public class NavigationBar extends ViewController implements LatencyTracker.getInstance(mContext).onActionStart( LatencyTracker.ACTION_TOGGLE_RECENTS); } - mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::awakenDreams); + mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::awakenDreams); mCommandQueue.toggleRecentApps(); } @@ -1454,7 +1454,7 @@ public class NavigationBar extends ViewController implements private void checkBarModes() { // We only have status bar on default display now. if (mIsOnDefaultDisplay) { - mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::checkBarModes); + mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::checkBarModes); } else { checkNavBarModes(); } @@ -1473,7 +1473,7 @@ public class NavigationBar extends ViewController implements */ public void checkNavBarModes() { final boolean anim = - mCentralSurfacesOptionalLazy.get().map(CentralSurfaces::isDeviceInteractive) + mCentralSurfacesOptionalLazy.get().map(CentralSurfacesInt::isDeviceInteractive) .orElse(false) && mNavigationBarWindowState != WINDOW_STATE_HIDDEN; getBarTransitions().transitionTo(mTransitionMode, anim); diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java index f3a3f1018a9fe..9a15e1f132f14 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java @@ -86,7 +86,7 @@ import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.WindowManagerWrapper; import com.android.systemui.statusbar.phone.AutoHideController; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.LightBarTransitionsController; import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.wm.shell.back.BackAnimation; @@ -1331,7 +1331,7 @@ public class NavigationBarView extends FrameLayout { getContextDisplay().getRealSize(size); pw.println("NavigationBarView:"); - pw.println(String.format(" this: " + CentralSurfaces.viewInfo(this) + pw.println(String.format(" this: " + CentralSurfacesInt.viewInfo(this) + " " + visibilityToString(getVisibility()))); getWindowVisibleDisplayFrame(r); diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java index 623bb12be5b02..5f1131856cbd9 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java @@ -47,7 +47,7 @@ import com.android.systemui.R; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.statusbar.CommandQueue; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import java.io.PrintWriter; import java.util.Arrays; @@ -105,11 +105,11 @@ public class PowerUI extends CoreStartable implements CommandQueue.Callbacks { private IThermalEventListener mUsbThermalEventListener; private final BroadcastDispatcher mBroadcastDispatcher; private final CommandQueue mCommandQueue; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; @Inject public PowerUI(Context context, BroadcastDispatcher broadcastDispatcher, - CommandQueue commandQueue, Lazy> centralSurfacesOptionalLazy, + CommandQueue commandQueue, Lazy> centralSurfacesOptionalLazy, WarningsUI warningsUI, EnhancedEstimates enhancedEstimates, PowerManager powerManager) { super(context); @@ -701,9 +701,9 @@ public class PowerUI extends CoreStartable implements CommandQueue.Callbacks { int status = temp.getStatus(); if (status >= Temperature.THROTTLING_EMERGENCY) { - final Optional centralSurfacesOptional = + final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); - if (!centralSurfacesOptional.map(CentralSurfaces::isDeviceInVrMode) + if (!centralSurfacesOptional.map(CentralSurfacesInt::isDeviceInVrMode) .orElse(false)) { mWarnings.showHighTemperatureWarning(); Slog.d(TAG, "SkinThermalEventListener: notifyThrottling was called " diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java index fbdabc74aba48..32b54f12e235f 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java @@ -53,7 +53,7 @@ import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.statusbar.phone.AutoTileManager; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.tuner.TunerService; import com.android.systemui.tuner.TunerService.Tunable; @@ -101,7 +101,7 @@ public class QSTileHost implements QSHost, Tunable, PluginListener, D private final StatusBarIconController mIconController; private final ArrayList mQsFactories = new ArrayList<>(); private int mCurrentUser; - private final Optional mCentralSurfacesOptional; + private final Optional mCentralSurfacesOptional; private Context mUserContext; private UserTracker mUserTracker; private SecureSettings mSecureSettings; @@ -120,7 +120,7 @@ public class QSTileHost implements QSHost, Tunable, PluginListener, D Provider autoTiles, DumpManager dumpManager, BroadcastDispatcher broadcastDispatcher, - Optional centralSurfacesOptional, + Optional centralSurfacesOptional, QSLogger qsLogger, UiEventLogger uiEventLogger, UserTracker userTracker, @@ -226,17 +226,17 @@ public class QSTileHost implements QSHost, Tunable, PluginListener, D @Override public void collapsePanels() { - mCentralSurfacesOptional.ifPresent(CentralSurfaces::postAnimateCollapsePanels); + mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::postAnimateCollapsePanels); } @Override public void forceCollapsePanels() { - mCentralSurfacesOptional.ifPresent(CentralSurfaces::postAnimateForceCollapsePanels); + mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::postAnimateForceCollapsePanels); } @Override public void openPanels() { - mCentralSurfacesOptional.ifPresent(CentralSurfaces::postAnimateOpenPanels); + mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::postAnimateOpenPanels); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java index f389df097d7d2..1940be8be8e32 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java @@ -26,7 +26,7 @@ import android.util.Log; import com.android.systemui.Dependency; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.shared.recents.IOverviewProxy; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import java.util.Optional; @@ -42,7 +42,7 @@ public class OverviewProxyRecentsImpl implements RecentsImplementation { private final static String TAG = "OverviewProxyRecentsImpl"; @Nullable - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private Context mContext; private Handler mHandler; @@ -51,7 +51,7 @@ public class OverviewProxyRecentsImpl implements RecentsImplementation { @SuppressWarnings("OptionalUsedAsFieldOrParameterType") @Inject - public OverviewProxyRecentsImpl(Lazy> centralSurfacesOptionalLazy) { + public OverviewProxyRecentsImpl(Lazy> centralSurfacesOptionalLazy) { mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy; } @@ -109,9 +109,9 @@ public class OverviewProxyRecentsImpl implements RecentsImplementation { } }; // Preload only if device for current user is unlocked - final Optional centralSurfacesOptional = + final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); - if (centralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing).orElse(false)) { + if (centralSurfacesOptional.map(CentralSurfacesInt::isKeyguardShowing).orElse(false)) { centralSurfacesOptional.get().executeRunnableDismissingKeyguard(() -> { mHandler.post(toggleRecents); }, null, true /* dismissShade */, false /* afterKeyguardGone */, diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java index c723fbb9a6e1a..d8323c5c8652e 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java @@ -101,7 +101,7 @@ import com.android.systemui.shared.system.ActivityManagerWrapper; 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.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.StatusBarWindowCallback; import com.android.systemui.statusbar.policy.CallbackController; @@ -145,7 +145,7 @@ public class OverviewProxyService extends CurrentUserTracker implements private final Context mContext; private final Optional mPipOptional; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final Optional mSplitScreenOptional; private SysUiState mSysUiState; private final Handler mHandler; @@ -400,7 +400,7 @@ public class OverviewProxyService extends CurrentUserTracker implements @Override public void toggleNotificationPanel() { verifyCallerAndClearCallingIdentityPostMain("toggleNotificationPanel", () -> - mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::togglePanel)); + mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::togglePanel)); } @@ -555,7 +555,7 @@ public class OverviewProxyService extends CurrentUserTracker implements @Inject public OverviewProxyService(Context context, CommandQueue commandQueue, Lazy navBarControllerLazy, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, NavigationModeController navModeController, NotificationShadeWindowController statusBarWinController, SysUiState sysUiState, Optional pipOptional, diff --git a/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java b/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java index c272602e33879..1ed6a3a27c7b3 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java +++ b/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java @@ -56,7 +56,7 @@ import com.android.systemui.navigationbar.NavigationBarView; import com.android.systemui.navigationbar.NavigationModeController; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.WindowManagerWrapper; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.util.leak.RotationUtils; import java.util.ArrayList; @@ -70,7 +70,7 @@ public class ScreenPinningRequest implements View.OnClickListener, NavigationModeController.ModeChangedListener { private final Context mContext; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final AccessibilityManager mAccessibilityService; private final WindowManager mWindowManager; @@ -85,7 +85,7 @@ public class ScreenPinningRequest implements View.OnClickListener, @Inject public ScreenPinningRequest( Context context, - Lazy> centralSurfacesOptionalLazy) { + Lazy> centralSurfacesOptionalLazy) { mContext = context; mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy; mAccessibilityService = (AccessibilityManager) @@ -269,10 +269,10 @@ public class ScreenPinningRequest implements View.OnClickListener, .setVisibility(View.INVISIBLE); } - final Optional centralSurfacesOptional = + final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); boolean recentsVisible = - centralSurfacesOptional.map(CentralSurfaces::isOverviewEnabled).orElse(false); + centralSurfacesOptional.map(CentralSurfacesInt::isOverviewEnabled).orElse(false); boolean touchExplorationEnabled = mAccessibilityService.isTouchExplorationEnabled(); int descriptionStringResId; if (QuickStepContract.isGesturalMode(mNavBarMode)) { @@ -294,7 +294,7 @@ public class ScreenPinningRequest implements View.OnClickListener, } NavigationBarView navigationBarView = - centralSurfacesOptional.map(CentralSurfaces::getNavigationBarView).orElse(null); + centralSurfacesOptional.map(CentralSurfacesInt::getNavigationBarView).orElse(null); if (navigationBarView != null) { ((ImageView) mLayout.findViewById(R.id.screen_pinning_back_icon)) .setImageDrawable(navigationBarView.getBackDrawable()); diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java b/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java index daaa897374cba..c45782965c4f3 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java @@ -24,7 +24,7 @@ import static com.android.systemui.screenshot.ScreenshotController.EXTRA_ACTION_ import static com.android.systemui.screenshot.ScreenshotController.EXTRA_DISALLOW_ENTER_PIP; import static com.android.systemui.screenshot.ScreenshotController.EXTRA_ID; import static com.android.systemui.screenshot.ScreenshotController.EXTRA_SMART_ACTIONS_ENABLED; -import static com.android.systemui.statusbar.phone.CentralSurfaces.SYSTEM_DIALOG_REASON_SCREENSHOT; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.SYSTEM_DIALOG_REASON_SCREENSHOT; import android.app.ActivityOptions; import android.app.PendingIntent; @@ -36,7 +36,7 @@ import android.view.RemoteAnimationAdapter; import android.view.WindowManagerGlobal; import com.android.systemui.shared.system.ActivityManagerWrapper; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import java.util.Optional; @@ -49,12 +49,12 @@ import javax.inject.Inject; public class ActionProxyReceiver extends BroadcastReceiver { private static final String TAG = "ActionProxyReceiver"; - private final CentralSurfaces mCentralSurfaces; + private final CentralSurfacesInt mCentralSurfaces; private final ActivityManagerWrapper mActivityManagerWrapper; private final ScreenshotSmartActions mScreenshotSmartActions; @Inject - public ActionProxyReceiver(Optional centralSurfacesOptional, + public ActionProxyReceiver(Optional centralSurfacesOptional, ActivityManagerWrapper activityManagerWrapper, ScreenshotSmartActions screenshotSmartActions) { mCentralSurfaces = centralSurfacesOptional.orElse(null); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt index c1ea6bf7cec87..f913332a0d711 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt @@ -34,7 +34,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.statusbar.notification.row.ExpandableView import com.android.systemui.statusbar.notification.stack.AmbientState import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController -import com.android.systemui.statusbar.phone.CentralSurfaces +import com.android.systemui.statusbar.phone.CentralSurfacesInt import com.android.systemui.statusbar.phone.KeyguardBypassController import com.android.systemui.statusbar.phone.LSShadeTransitionLogger import com.android.systemui.statusbar.phone.NotificationPanelViewController @@ -78,7 +78,7 @@ class LockscreenShadeTransitionController @Inject constructor( private var useSplitShade: Boolean = false private lateinit var nsslController: NotificationStackScrollLayoutController lateinit var notificationPanelController: NotificationPanelViewController - lateinit var centralSurfaces: CentralSurfaces + lateinit var centralSurfaces: CentralSurfacesInt lateinit var qS: QS /** diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java index 68d35f9679ed1..db6709a322528 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java @@ -34,7 +34,7 @@ import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.statusbar.dagger.CentralSurfacesModule; import com.android.systemui.statusbar.notification.collection.NotifCollection; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.NotificationListenerWithPlugins; import com.android.systemui.util.time.SystemClock; @@ -54,7 +54,7 @@ import javax.inject.Inject; @SuppressLint("OverrideAbstract") public class NotificationListener extends NotificationListenerWithPlugins { private static final String TAG = "NotificationListener"; - private static final boolean DEBUG = CentralSurfaces.DEBUG; + private static final boolean DEBUG = CentralSurfacesInt.DEBUG; private static final long MAX_RANKING_DELAY_MILLIS = 500L; private final Context mContext; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java index 76f9db44af664..37a5d74a9cde4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java @@ -16,9 +16,9 @@ package com.android.systemui.statusbar; import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; -import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG_MEDIA_FAKE_ARTWORK; -import static com.android.systemui.statusbar.phone.CentralSurfaces.ENABLE_LOCKSCREEN_WALLPAPER; -import static com.android.systemui.statusbar.phone.CentralSurfaces.SHOW_LOCKSCREEN_MEDIA_ARTWORK; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.DEBUG_MEDIA_FAKE_ARTWORK; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.ENABLE_LOCKSCREEN_WALLPAPER; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.SHOW_LOCKSCREEN_MEDIA_ARTWORK; import android.annotation.MainThread; import android.annotation.NonNull; @@ -66,7 +66,7 @@ import com.android.systemui.statusbar.notification.collection.notifcollection.Di import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.phone.BiometricUnlockController; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.LockscreenWallpaper; import com.android.systemui.statusbar.phone.ScrimController; @@ -132,7 +132,7 @@ public class NotificationMediaManager implements Dumpable { private final Context mContext; private final ArrayList mMediaListeners; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final MediaArtworkProcessor mMediaArtworkProcessor; private final Set> mProcessArtworkTasks = new ArraySet<>(); @@ -177,7 +177,7 @@ public class NotificationMediaManager implements Dumpable { */ public NotificationMediaManager( Context context, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, Lazy notificationShadeWindowController, NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, @@ -663,7 +663,7 @@ public class NotificationMediaManager implements Dumpable { mNotificationShadeWindowController.get(); boolean hideBecauseOccluded = mCentralSurfacesOptionalLazy.get() - .map(CentralSurfaces::isOccluded).orElse(false); + .map(CentralSurfacesInt::isOccluded).orElse(false); final boolean hasArtwork = artworkDrawable != null; mColorExtractor.setHasMediaArtwork(hasMediaArtwork); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java index d71dec8ff3968..8eac2a843c8cc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java @@ -64,7 +64,7 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry. import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.notification.logging.NotificationLogger; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.android.systemui.statusbar.policy.RemoteInputView; import com.android.systemui.util.DumpUtilsKt; @@ -102,7 +102,7 @@ public class NotificationRemoteInputManager implements Dumpable { private final Handler mMainHandler; private final ActionClickLogger mLogger; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; protected final Context mContext; protected final NotifPipelineFlags mNotifPipelineFlags; @@ -262,7 +262,7 @@ public class NotificationRemoteInputManager implements Dumpable { NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, RemoteInputNotificationRebuilder rebuilder, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, StatusBarStateController statusBarStateController, @Main Handler mainHandler, RemoteInputUriController remoteInputUriController, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateController.java b/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateController.java index 78077386179aa..96829a009f1ff 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateController.java @@ -20,16 +20,16 @@ import android.view.View; import com.android.systemui.plugins.qs.QS; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; /** * Calculates and moves the QS frame vertically. */ public abstract class QsFrameTranslateController { - protected CentralSurfaces mCentralSurfaces; + protected CentralSurfacesInt mCentralSurfaces; - public QsFrameTranslateController(CentralSurfaces centralSurfaces) { + public QsFrameTranslateController(CentralSurfacesInt centralSurfaces) { mCentralSurfaces = centralSurfaces; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateImpl.java index 33e224579bef3..dfdaa3c9e4499 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateImpl.java @@ -21,7 +21,7 @@ import android.view.View; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.plugins.qs.QS; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import javax.inject.Inject; @@ -32,7 +32,7 @@ import javax.inject.Inject; public class QsFrameTranslateImpl extends QsFrameTranslateController { @Inject - public QsFrameTranslateImpl(CentralSurfaces centralSurfaces) { + public QsFrameTranslateImpl(CentralSurfacesInt centralSurfaces) { super(centralSurfaces); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java b/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java index 2b3190159ecd1..3432fe6a06c81 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java @@ -25,7 +25,7 @@ import android.view.WindowInsetsController.Appearance; import android.view.WindowInsetsController.Behavior; import com.android.systemui.plugins.statusbar.StatusBarStateController; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import java.lang.annotation.Retention; @@ -92,7 +92,7 @@ public interface SysuiStatusBarStateController extends StatusBarStateController int getCurrentOrUpcomingState(); /** - * Update the dozing state from {@link CentralSurfaces}'s perspective + * Update the dozing state from {@link CentralSurfacesInt}'s perspective * @param isDozing well, are we dozing? * @return {@code true} if the state changed, else {@code false} */ @@ -117,7 +117,7 @@ public interface SysuiStatusBarStateController extends StatusBarStateController void setAndInstrumentDozeAmount(View view, float dozeAmount, boolean animated); /** - * Update the expanded state from {@link CentralSurfaces}'s perspective + * Update the expanded state from {@link CentralSurfacesInt}'s perspective * @param expanded are we expanded? * @return {@code true} if the state changed, else {@code false} */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java index 83290af24f2ad..fda5b18957593 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java @@ -60,7 +60,8 @@ import com.android.systemui.statusbar.notification.collection.legacy.Notificatio import com.android.systemui.statusbar.notification.collection.legacy.VisualStabilityManager; import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfacesImpl; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.ManagedProfileController; import com.android.systemui.statusbar.phone.ManagedProfileControllerImpl; @@ -87,7 +88,7 @@ import dagger.Module; import dagger.Provides; /** - * This module provides instances needed to construct {@link CentralSurfaces}. These are moved to + * This module provides instances needed to construct {@link CentralSurfacesImpl}. These are moved to * this separate from {@link CentralSurfacesModule} module so that components that wish to build * their own version of CentralSurfaces can include just dependencies, without injecting * CentralSurfaces itself. @@ -105,7 +106,7 @@ public interface CentralSurfacesDependenciesModule { NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, RemoteInputNotificationRebuilder rebuilder, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, StatusBarStateController statusBarStateController, Handler mainHandler, RemoteInputUriController remoteInputUriController, @@ -134,7 +135,7 @@ public interface CentralSurfacesDependenciesModule { @Provides static NotificationMediaManager provideNotificationMediaManager( Context context, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, Lazy notificationShadeWindowController, NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StartCentralSurfacesModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StartCentralSurfacesModule.kt index fe55dea7333a9..bf404af96005c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StartCentralSurfacesModule.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StartCentralSurfacesModule.kt @@ -17,7 +17,8 @@ package com.android.systemui.statusbar.dagger import com.android.systemui.CoreStartable -import com.android.systemui.statusbar.phone.CentralSurfaces +import com.android.systemui.statusbar.phone.CentralSurfacesInt +import com.android.systemui.statusbar.phone.CentralSurfacesImpl import dagger.Binds import dagger.Module import dagger.multibindings.ClassKey @@ -28,6 +29,6 @@ interface StartCentralSurfacesModule { /** Start the CentralSurfaces */ @Binds @IntoMap - @ClassKey(CentralSurfaces::class) - abstract fun bindsCentralSurfaces(centralSurfaces: CentralSurfaces): CoreStartable + @ClassKey(CentralSurfacesInt::class) + abstract fun bindsCentralSurfaces(centralSurfaces: CentralSurfacesImpl): CoreStartable } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java index 392145ad306a1..633f5c5c8b6b6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java @@ -24,7 +24,7 @@ import android.view.View; import com.android.systemui.DejankUtils; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.wm.shell.bubbles.Bubbles; import java.util.Optional; @@ -39,7 +39,7 @@ public final class NotificationClicker implements View.OnClickListener { private static final String TAG = "NotificationClicker"; private final NotificationClickerLogger mLogger; - private final Optional mCentralSurfacesOptional; + private final Optional mCentralSurfacesOptional; private final Optional mBubblesOptional; private final NotificationActivityStarter mNotificationActivityStarter; @@ -53,7 +53,7 @@ public final class NotificationClicker implements View.OnClickListener { private NotificationClicker( NotificationClickerLogger logger, - Optional centralSurfacesOptional, + Optional centralSurfacesOptional, Optional bubblesOptional, NotificationActivityStarter notificationActivityStarter) { mLogger = logger; @@ -137,7 +137,7 @@ public final class NotificationClicker implements View.OnClickListener { /** Builds an instance. */ public NotificationClicker build( - Optional centralSurfacesOptional, + Optional centralSurfacesOptional, Optional bubblesOptional, NotificationActivityStarter notificationActivityStarter ) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/TargetSdkResolver.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/TargetSdkResolver.kt index c71eade79cdff..2401ffd12c7d2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/TargetSdkResolver.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/TargetSdkResolver.kt @@ -23,7 +23,7 @@ import android.util.Log import com.android.systemui.dagger.SysUISingleton import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener -import com.android.systemui.statusbar.phone.CentralSurfaces +import com.android.systemui.statusbar.phone.CentralSurfacesInt import javax.inject.Inject @SysUISingleton @@ -39,7 +39,7 @@ class TargetSdkResolver @Inject constructor( } private fun resolveNotificationSdk(sbn: StatusBarNotification): Int { - val pmUser = CentralSurfaces.getPackageManagerForUser(context, sbn.user.identifier) + val pmUser = CentralSurfacesInt.getPackageManagerForUser(context, sbn.user.identifier) var targetSdk = 0 // Extract target SDK version. try { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/LegacyNotificationPresenterExtensions.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/LegacyNotificationPresenterExtensions.java index bdbb0eb48e8a4..cf1e97de6d925 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/LegacyNotificationPresenterExtensions.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/LegacyNotificationPresenterExtensions.java @@ -16,7 +16,7 @@ package com.android.systemui.statusbar.notification.collection.legacy; -import static com.android.systemui.statusbar.phone.CentralSurfaces.SPEW; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.SPEW; import android.service.notification.StatusBarNotification; import android.util.Log; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java index 34c8044ef0d3f..02d6740338e7f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java @@ -84,7 +84,7 @@ import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.OnUserInteractionCallback; import com.android.systemui.statusbar.notification.stack.NotificationSectionsManager; import com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.NotifActivityLaunchEventsModule; import com.android.systemui.statusbar.phone.NotifPanelEventsModule; @@ -153,7 +153,7 @@ public interface NotificationsModule { @Provides static NotificationGutsManager provideNotificationGutsManager( Context context, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, @Main Handler mainHandler, @Background Handler bgHandler, AccessibilityManager accessibilityManager, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt index 11ffde6257984..7e2470fd1e2cf 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt @@ -43,7 +43,7 @@ import com.android.systemui.statusbar.notification.interruption.HeadsUpControlle import com.android.systemui.statusbar.notification.interruption.HeadsUpViewBinder import com.android.systemui.statusbar.notification.row.NotifBindPipelineInitializer import com.android.systemui.statusbar.notification.stack.NotificationListContainer -import com.android.systemui.statusbar.phone.CentralSurfaces +import com.android.systemui.statusbar.phone.CentralSurfacesInt import com.android.systemui.statusbar.phone.NotificationGroupAlertTransferHelper import com.android.systemui.statusbar.policy.DeviceProvisionedController import com.android.systemui.statusbar.policy.HeadsUpManager @@ -63,7 +63,7 @@ import javax.inject.Inject */ @SysUISingleton class NotificationsControllerImpl @Inject constructor( - private val centralSurfaces: Lazy, + private val centralSurfaces: Lazy, private val notifPipelineFlags: NotifPipelineFlags, private val notificationListener: NotificationListener, private val entryManager: NotificationEntryManager, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index 0ae365352df05..cbe6c271a4ad3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -112,7 +112,7 @@ import com.android.systemui.statusbar.notification.stack.ExpandableViewState; import com.android.systemui.statusbar.notification.stack.NotificationChildrenContainer; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout; import com.android.systemui.statusbar.notification.stack.SwipeableView; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.InflatedSmartReplyState; @@ -398,7 +398,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView return isSystem; } else { - PackageManager packageManager = CentralSurfaces.getPackageManagerForUser( + PackageManager packageManager = CentralSurfacesInt.getPackageManagerForUser( context, sbn.getUser().getIdentifier()); Boolean isSystemNotification = null; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java index 4c693045bc881..2e7febe22040f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java @@ -47,7 +47,7 @@ import com.android.systemui.statusbar.notification.ConversationNotificationProce import com.android.systemui.statusbar.notification.InflationException; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.wrapper.NotificationViewWrapper; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.policy.InflatedSmartReplyState; import com.android.systemui.statusbar.policy.InflatedSmartReplyViewHolder; import com.android.systemui.statusbar.policy.SmartReplyStateInflater; @@ -841,7 +841,7 @@ public class NotificationContentInflater implements NotificationRowContentBinder StatusBarNotification sbn = mEntry.getSbn(); final String ident = sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()); - Log.e(CentralSurfaces.TAG, "couldn't inflate view for notification " + ident, e); + Log.e(CentralSurfacesInt.TAG, "couldn't inflate view for notification " + ident, e); if (mCallback != null) { mCallback.handleInflationException(mRow.getEntry(), new InflationException("Couldn't inflate contentViews" + e)); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java index 8a7155ac72d0e..917e84a94d24d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java @@ -70,7 +70,7 @@ import com.android.systemui.statusbar.notification.collection.render.NotifGutsVi import com.android.systemui.statusbar.notification.dagger.NotificationsModule; import com.android.systemui.statusbar.notification.row.NotificationInfo.CheckSaveListener; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.wmshell.BubblesManager; @@ -119,7 +119,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx @VisibleForTesting protected String mKeyToRemoveOnGutsClosed; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final Handler mMainHandler; private final Handler mBgHandler; private final Optional mBubblesManagerOptional; @@ -138,7 +138,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx * Injected constructor. See {@link NotificationsModule}. */ public NotificationGutsManager(Context context, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, @Main Handler mainHandler, @Background Handler bgHandler, AccessibilityManager accessibilityManager, @@ -341,7 +341,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx } StatusBarNotification sbn = row.getEntry().getSbn(); UserHandle userHandle = sbn.getUser(); - PackageManager pmUser = CentralSurfaces.getPackageManagerForUser(mContext, + PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser(mContext, userHandle.getIdentifier()); feedbackInfo.bindGuts(pmUser, sbn, row.getEntry(), row, mAssistantFeedbackController); @@ -362,7 +362,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx // Settings link is only valid for notifications that specify a non-system user NotificationInfo.OnSettingsClickListener onSettingsClick = null; UserHandle userHandle = sbn.getUser(); - PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( + PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser( mContext, userHandle.getIdentifier()); final NotificationInfo.OnAppSettingsClickListener onAppSettingsClick = (View v, Intent intent) -> { @@ -415,7 +415,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx // Settings link is only valid for notifications that specify a non-system user NotificationInfo.OnSettingsClickListener onSettingsClick = null; UserHandle userHandle = sbn.getUser(); - PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( + PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser( mContext, userHandle.getIdentifier()); if (!userHandle.equals(UserHandle.ALL) @@ -457,7 +457,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx // Settings link is only valid for notifications that specify a non-system user NotificationConversationInfo.OnSettingsClickListener onSettingsClick = null; UserHandle userHandle = sbn.getUser(); - PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( + PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser( mContext, userHandle.getIdentifier()); final NotificationConversationInfo.OnAppSettingsClickListener onAppSettingsClick = (View v, Intent intent) -> { @@ -570,7 +570,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx .setLeaveOpenOnKeyguardHide(true); } - Optional centralSurfacesOptional = + Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); if (centralSurfacesOptional.isPresent()) { Runnable r = () -> mMainHandler.post( @@ -584,7 +584,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx return true; } /** - * When {@link CentralSurfaces} doesn't exist, falling through to call + * When {@link CentralSurfacesInt} doesn't exist, falling through to call * {@link #openGutsInternal(View,int,int,NotificationMenuRowPlugin.MenuItem)}. */ } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/dagger/ExpandableNotificationRowComponent.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/dagger/ExpandableNotificationRowComponent.java index 1a7417a781865..c871c4bd5103d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/dagger/ExpandableNotificationRowComponent.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/dagger/ExpandableNotificationRowComponent.java @@ -26,7 +26,7 @@ import com.android.systemui.statusbar.notification.row.ActivatableNotificationVi import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRowController; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import dagger.Binds; import dagger.BindsInstance; @@ -100,7 +100,7 @@ public interface ExpandableNotificationRowComponent { // but since this field is used in the guts, it must be accurate. // Therefore we will only show the application label, or, failing that, the // package name. No substitutions. - PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( + PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser( context, statusBarNotification.getUser().getIdentifier()); final String pkg = statusBarNotification.getPackageName(); try { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index bf27550b331be..eb4d3c7161d18 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -100,7 +100,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.statusbar.notification.row.ExpandableView; import com.android.systemui.statusbar.notification.row.FooterView; import com.android.systemui.statusbar.notification.row.StackScrollerDecorView; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.HeadsUpAppearanceController; import com.android.systemui.statusbar.phone.HeadsUpTouchHelper; import com.android.systemui.statusbar.phone.ScreenOffAnimationController; @@ -305,7 +305,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } }; private NotificationStackScrollLogger mLogger; - private CentralSurfaces mCentralSurfaces; + private CentralSurfacesInt mCentralSurfaces; private int[] mTempInt2 = new int[2]; private boolean mGenerateChildOrderChangedEvent; private HashSet mAnimationFinishedRunnables = new HashSet<>(); @@ -4579,7 +4579,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) - public void setCentralSurfaces(CentralSurfaces centralSurfaces) { + public void setCentralSurfaces(CentralSurfacesInt centralSurfaces) { this.mCentralSurfaces = centralSurfaces; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java index ae1fd2b180e5c..ea4ea3264cfa8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java @@ -109,7 +109,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableView; import com.android.systemui.statusbar.notification.row.NotificationGuts; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.NotificationSnooze; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.HeadsUpAppearanceController; import com.android.systemui.statusbar.phone.HeadsUpManagerPhone; import com.android.systemui.statusbar.phone.HeadsUpTouchHelper; @@ -175,7 +175,7 @@ public class NotificationStackScrollLayoutController { private final KeyguardBypassController mKeyguardBypassController; private final NotificationLockscreenUserManager mLockscreenUserManager; // TODO: CentralSurfaces should be encapsulated behind a Controller - private final CentralSurfaces mCentralSurfaces; + private final CentralSurfacesInt mCentralSurfaces; private final SectionHeaderController mSilentHeaderController; private final LockscreenShadeTransitionController mLockscreenShadeTransitionController; private final InteractionJankMonitor mJankMonitor; @@ -637,7 +637,7 @@ public class NotificationStackScrollLayoutController { FalsingManager falsingManager, @Main Resources resources, NotificationSwipeHelper.Builder notificationSwipeHelperBuilder, - CentralSurfaces centralSurfaces, + CentralSurfacesInt centralSurfaces, ScrimController scrimController, NotificationGroupManagerLegacy legacyGroupManager, GroupExpansionManager groupManager, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java index c1869e0575ed6..c722b2d9a73b9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java @@ -699,7 +699,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp public void run() { mNotificationShadeWindowController.setForceDozeBrightness(false); } - }, CentralSurfaces.FADE_KEYGUARD_DURATION_PULSING); + }, CentralSurfacesInt.FADE_KEYGUARD_DURATION_PULSING); } public void finishKeyguardFadingAway() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java index 9060d5f67913a..04242fc7c9c28 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java @@ -72,7 +72,7 @@ import javax.inject.Inject; /** */ @CentralSurfacesComponent.CentralSurfacesScope public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callbacks { - private final CentralSurfaces mCentralSurfaces; + private final CentralSurfacesInt mCentralSurfaces; private final Context mContext; private final ShadeController mShadeController; private final CommandQueue mCommandQueue; @@ -106,7 +106,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba @Inject CentralSurfacesCommandQueueCallbacks( - CentralSurfaces centralSurfaces, + CentralSurfacesInt centralSurfaces, Context context, @Main Resources resources, ShadeController shadeController, @@ -207,8 +207,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba @Override public void animateExpandNotificationsPanel() { - if (CentralSurfaces.SPEW) { - Log.d(CentralSurfaces.TAG, + if (CentralSurfacesInt.SPEW) { + Log.d(CentralSurfacesInt.TAG, "animateExpand: mExpandedVisible=" + mCentralSurfaces.isExpandedVisible()); } if (!mCommandQueue.panelsEnabled()) { @@ -220,8 +220,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba @Override public void animateExpandSettingsPanel(@Nullable String subPanel) { - if (CentralSurfaces.SPEW) { - Log.d(CentralSurfaces.TAG, + if (CentralSurfacesInt.SPEW) { + Log.d(CentralSurfacesInt.TAG, "animateExpand: mExpandedVisible=" + mCentralSurfaces.isExpandedVisible()); } if (!mCommandQueue.panelsEnabled()) { @@ -244,7 +244,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba @Override public void dismissKeyboardShortcutsMenu() { - mCentralSurfaces.resendMessage(CentralSurfaces.MSG_DISMISS_KEYBOARD_SHORTCUTS_MENU); + mCentralSurfaces.resendMessage(CentralSurfacesInt.MSG_DISMISS_KEYBOARD_SHORTCUTS_MENU); } /** * State is one or more of the DISABLE constants from StatusBarManager. @@ -257,7 +257,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba int state2BeforeAdjustment = state2; state2 = mRemoteInputQuickSettingsDisabler.adjustDisableFlags(state2); - Log.d(CentralSurfaces.TAG, + Log.d(CentralSurfacesInt.TAG, mDisableFlagsLogger.getDisableFlagsString( /* old= */ new DisableFlagsLogger.DisableState( mCentralSurfaces.getDisabled1(), mCentralSurfaces.getDisabled2()), @@ -306,8 +306,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba */ @Override public void handleSystemKey(int key) { - if (CentralSurfaces.SPEW) { - Log.d(CentralSurfaces.TAG, "handleNavigationKey: " + key); + if (CentralSurfacesInt.SPEW) { + Log.d(CentralSurfacesInt.TAG, "handleNavigationKey: " + key); } if (!mCommandQueue.panelsEnabled() || !mKeyguardUpdateMonitor.isDeviceInteractive() || mKeyguardStateController.isShowing() && !mKeyguardStateController.isOccluded()) { @@ -345,15 +345,15 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba public void onCameraLaunchGestureDetected(int source) { mCentralSurfaces.setLastCameraLaunchSource(source); if (mCentralSurfaces.isGoingToSleep()) { - if (CentralSurfaces.DEBUG_CAMERA_LIFT) { - Slog.d(CentralSurfaces.TAG, "Finish going to sleep before launching camera"); + if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) { + Slog.d(CentralSurfacesInt.TAG, "Finish going to sleep before launching camera"); } mCentralSurfaces.setLaunchCameraOnFinishedGoingToSleep(true); return; } if (!mNotificationPanelViewController.canCameraGestureBeLaunched()) { - if (CentralSurfaces.DEBUG_CAMERA_LIFT) { - Slog.d(CentralSurfaces.TAG, "Can't launch camera right now"); + if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) { + Slog.d(CentralSurfacesInt.TAG, "Can't launch camera right now"); } return; } @@ -364,7 +364,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba vibrateForCameraGesture(); if (source == StatusBarManager.CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP) { - Log.v(CentralSurfaces.TAG, "Camera launch"); + Log.v(CentralSurfacesInt.TAG, "Camera launch"); mKeyguardUpdateMonitor.onCameraLaunched(); } @@ -379,11 +379,11 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba // Avoid flickering of the scrim when we instant launch the camera and the bouncer // comes on. mCentralSurfaces.acquireGestureWakeLock( - CentralSurfaces.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L); + CentralSurfacesInt.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L); } if (isWakingUpOrAwake()) { - if (CentralSurfaces.DEBUG_CAMERA_LIFT) { - Slog.d(CentralSurfaces.TAG, "Launching camera"); + if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) { + Slog.d(CentralSurfacesInt.TAG, "Launching camera"); } if (mStatusBarKeyguardViewManager.isBouncerShowing()) { mStatusBarKeyguardViewManager.reset(true /* hide */); @@ -396,8 +396,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba // we will dismiss us too early since we are waiting on an activity to be drawn and // incorrectly get notified because of the screen on event (which resumes and pauses // some activities) - if (CentralSurfaces.DEBUG_CAMERA_LIFT) { - Slog.d(CentralSurfaces.TAG, "Deferring until screen turns on"); + if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) { + Slog.d(CentralSurfacesInt.TAG, "Deferring until screen turns on"); } mCentralSurfaces.setLaunchCameraOnFinishedWaking(true); } @@ -409,7 +409,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba Intent emergencyIntent = mCentralSurfaces.getEmergencyActionIntent(); if (emergencyIntent == null) { - Log.wtf(CentralSurfaces.TAG, "Couldn't find an app to process the emergency intent."); + Log.wtf(CentralSurfacesInt.TAG, "Couldn't find an app to process the emergency intent."); return; } @@ -438,7 +438,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba // Avoid flickering of the scrim when we instant launch the camera and the bouncer // comes on. mCentralSurfaces.acquireGestureWakeLock( - CentralSurfaces.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L); + CentralSurfacesInt.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L); } if (isWakingUpOrAwake()) { @@ -492,7 +492,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba @Override public void toggleKeyboardShortcutsMenu(int deviceId) { - mCentralSurfaces.resendMessage(new CentralSurfaces.KeyboardShortcutsMessage(deviceId)); + mCentralSurfaces.resendMessage(new CentralSurfacesInt.KeyboardShortcutsMessage(deviceId)); } @Override @@ -580,8 +580,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba // Make sure to pass -1 for repeat so VibratorManagerService doesn't stop us when going // to sleep. return VibrationEffect.createWaveform( - CentralSurfaces.CAMERA_LAUNCH_GESTURE_VIBRATION_TIMINGS, - CentralSurfaces.CAMERA_LAUNCH_GESTURE_VIBRATION_AMPLITUDES, + CentralSurfacesInt.CAMERA_LAUNCH_GESTURE_VIBRATION_TIMINGS, + CentralSurfacesInt.CAMERA_LAUNCH_GESTURE_VIBRATION_AMPLITUDES, /* repeat= */ -1); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java similarity index 95% rename from packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java rename to packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index 2d18bc22102ae..306ac0c7afa67 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -40,7 +40,6 @@ import static com.android.systemui.statusbar.phone.BarTransitions.MODE_OPAQUE; import static com.android.systemui.statusbar.phone.BarTransitions.MODE_SEMI_TRANSPARENT; import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSPARENT; import static com.android.systemui.statusbar.phone.BarTransitions.TransitionMode; -import static com.android.wm.shell.transition.Transitions.ENABLE_SHELL_TRANSITIONS; import android.annotation.Nullable; import android.app.ActivityManager; @@ -65,7 +64,6 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; -import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.ResolveInfo; import android.content.res.Configuration; import android.graphics.Point; @@ -100,7 +98,6 @@ import android.view.IRemoteAnimationRunner; import android.view.IWindowManager; import android.view.KeyEvent; import android.view.MotionEvent; -import android.view.RemoteAnimationAdapter; import android.view.ThreadedRenderer; import android.view.View; import android.view.ViewGroup; @@ -113,7 +110,6 @@ import android.window.SplashScreen; import androidx.annotation.NonNull; import androidx.lifecycle.Lifecycle; -import androidx.lifecycle.LifecycleOwner; import androidx.lifecycle.LifecycleRegistry; import com.android.internal.annotations.VisibleForTesting; @@ -140,7 +136,6 @@ import com.android.systemui.R; import com.android.systemui.accessibility.floatingmenu.AccessibilityFloatingMenuController; import com.android.systemui.animation.ActivityLaunchAnimator; import com.android.systemui.animation.DelegateLaunchAnimatorController; -import com.android.systemui.animation.RemoteTransitionAdapter; import com.android.systemui.assist.AssistManager; import com.android.systemui.biometrics.AuthRippleController; import com.android.systemui.broadcast.BroadcastDispatcher; @@ -148,6 +143,7 @@ import com.android.systemui.camera.CameraIntents; import com.android.systemui.charging.WirelessChargingAnimation; import com.android.systemui.classifier.FalsingCollector; import com.android.systemui.colorextraction.SysuiColorExtractor; +import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dagger.qualifiers.UiBackground; import com.android.systemui.demomode.DemoMode; @@ -166,7 +162,6 @@ import com.android.systemui.keyguard.ScreenLifecycle; import com.android.systemui.keyguard.WakefulnessLifecycle; import com.android.systemui.navigationbar.NavigationBarController; import com.android.systemui.navigationbar.NavigationBarView; -import com.android.systemui.plugins.ActivityStarter; import com.android.systemui.plugins.DarkIconDispatcher; import com.android.systemui.plugins.FalsingManager; import com.android.systemui.plugins.OverlayPlugin; @@ -256,6 +251,7 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.Executor; +import javax.inject.Inject; import javax.inject.Named; import dagger.Lazy; @@ -273,63 +269,24 @@ import dagger.Lazy; * to break up this class into many small classes, and any code added here will slow down that goal. * */ -public class CentralSurfaces extends CoreStartable implements - ActivityStarter, - LifecycleOwner { - public static final boolean MULTIUSER_DEBUG = false; - - protected static final int MSG_DISMISS_KEYBOARD_SHORTCUTS_MENU = 1027; - - // Should match the values in PhoneWindowManager - public static final String SYSTEM_DIALOG_REASON_KEY = "reason"; - public static final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps"; - public static final String SYSTEM_DIALOG_REASON_DREAM = "dream"; - static public final String SYSTEM_DIALOG_REASON_SCREENSHOT = "screenshot"; +@SysUISingleton +public class CentralSurfacesImpl extends CoreStartable implements + CentralSurfacesInt { private static final String BANNER_ACTION_CANCEL = "com.android.systemui.statusbar.banner_action_cancel"; private static final String BANNER_ACTION_SETUP = "com.android.systemui.statusbar.banner_action_setup"; - public static final String TAG = "CentralSurfaces"; - public static final boolean DEBUG = false; - public static final boolean SPEW = false; - public static final boolean DUMPTRUCK = true; // extra dumpsys info - public static final boolean DEBUG_GESTURES = false; - public static final boolean DEBUG_MEDIA_FAKE_ARTWORK = false; - public static final boolean DEBUG_CAMERA_LIFT = false; - - public static final boolean DEBUG_WINDOW_STATE = false; - - // additional instrumentation for testing purposes; intended to be left on during development - public static final boolean CHATTY = DEBUG; - - public static final boolean SHOW_LOCKSCREEN_MEDIA_ARTWORK = true; - - public static final String ACTION_FAKE_ARTWORK = "fake_artwork"; private static final int MSG_OPEN_SETTINGS_PANEL = 1002; private static final int MSG_LAUNCH_TRANSITION_TIMEOUT = 1003; // 1020-1040 reserved for BaseStatusBar - // Time after we abort the launch transition. - static final long LAUNCH_TRANSITION_TIMEOUT_MS = 5000; - - protected static final boolean CLOSE_PANEL_WHEN_EMPTIED = true; - /** * The delay to reset the hint text when the hint animation is finished running. */ private static final int HINT_RESET_DELAY_MS = 1200; - public static final int FADE_KEYGUARD_START_DELAY = 100; - public static final int FADE_KEYGUARD_DURATION = 300; - public static final int FADE_KEYGUARD_DURATION_PULSING = 96; - - public static final long[] CAMERA_LAUNCH_GESTURE_VIBRATION_TIMINGS = - new long[]{20, 20, 20, 20, 100, 20}; - public static final int[] CAMERA_LAUNCH_GESTURE_VIBRATION_AMPLITUDES = - new int[]{39, 82, 139, 213, 0, 127}; - /** If true, the lockscreen will show a distinct wallpaper */ public static final boolean ENABLE_LOCKSCREEN_WALLPAPER = true; @@ -356,11 +313,13 @@ public class CentralSurfaces extends CoreStartable implements mStatusBarWindowState = state; } - void acquireGestureWakeLock(long time) { + @Override + public void acquireGestureWakeLock(long time) { mGestureWakeLock.acquire(time); } - boolean setAppearance(int appearance) { + @Override + public boolean setAppearance(int appearance) { if (mAppearance != appearance) { mAppearance = appearance; return updateBarMode(barMode(isTransientShown(), appearance)); @@ -369,80 +328,98 @@ public class CentralSurfaces extends CoreStartable implements return false; } - int getBarMode() { + @Override + public int getBarMode() { return mStatusBarMode; } - void resendMessage(int msg) { + @Override + public void resendMessage(int msg) { mMessageRouter.cancelMessages(msg); mMessageRouter.sendMessage(msg); } - void resendMessage(Object msg) { + @Override + public void resendMessage(Object msg) { mMessageRouter.cancelMessages(msg.getClass()); mMessageRouter.sendMessage(msg); } - int getDisabled1() { + @Override + public int getDisabled1() { return mDisabled1; } - void setDisabled1(int disabled) { + @Override + public void setDisabled1(int disabled) { mDisabled1 = disabled; } - int getDisabled2() { + @Override + public int getDisabled2() { return mDisabled2; } - void setDisabled2(int disabled) { + @Override + public void setDisabled2(int disabled) { mDisabled2 = disabled; } - void setLastCameraLaunchSource(int source) { + @Override + public void setLastCameraLaunchSource(int source) { mLastCameraLaunchSource = source; } - void setLaunchCameraOnFinishedGoingToSleep(boolean launch) { + @Override + public void setLaunchCameraOnFinishedGoingToSleep(boolean launch) { mLaunchCameraOnFinishedGoingToSleep = launch; } - void setLaunchCameraOnFinishedWaking(boolean launch) { + @Override + public void setLaunchCameraOnFinishedWaking(boolean launch) { mLaunchCameraWhenFinishedWaking = launch; } - void setLaunchEmergencyActionOnFinishedGoingToSleep(boolean launch) { + @Override + public void setLaunchEmergencyActionOnFinishedGoingToSleep(boolean launch) { mLaunchEmergencyActionOnFinishedGoingToSleep = launch; } - void setLaunchEmergencyActionOnFinishedWaking(boolean launch) { + @Override + public void setLaunchEmergencyActionOnFinishedWaking(boolean launch) { mLaunchEmergencyActionWhenFinishedWaking = launch; } - void setTopHidesStatusBar(boolean hides) { + @Override + public void setTopHidesStatusBar(boolean hides) { mTopHidesStatusBar = hides; } - QSPanelController getQSPanelController() { + @Override + public QSPanelController getQSPanelController() { return mQSPanelController; } /** */ + @Override public void animateExpandNotificationsPanel() { mCommandQueueCallbacks.animateExpandNotificationsPanel(); } /** */ + @Override public void animateExpandSettingsPanel(@Nullable String subpanel) { mCommandQueueCallbacks.animateExpandSettingsPanel(subpanel); } /** */ + @Override public void animateCollapsePanels(int flags, boolean force) { mCommandQueueCallbacks.animateCollapsePanels(flags, force); } /** */ + @Override public void togglePanel() { mCommandQueueCallbacks.togglePanel(); } @@ -693,7 +670,8 @@ public class CentralSurfaces extends CoreStartable implements * Instead, an @Provide method is included. See {@link StatusBarPhoneModule}. */ @SuppressWarnings("OptionalUsedAsFieldOrParameterType") - public CentralSurfaces( + @Inject + public CentralSurfacesImpl( Context context, NotificationsController notificationsController, FragmentService fragmentService, @@ -1471,6 +1449,7 @@ public class CentralSurfaces extends CoreStartable implements * @param where the view requesting the wakeup * @param why the reason for the wake up */ + @Override public void wakeUpIfDozing(long time, View where, String why) { if (mDozing && mScreenOffAnimationController.allowWakeUpIfDozing()) { mPowerManager.wakeUp( @@ -1578,7 +1557,7 @@ public class CentralSurfaces extends CoreStartable implements @Override public void notifyBiometricAuthModeChanged() { - CentralSurfaces.this.notifyBiometricAuthModeChanged(); + CentralSurfacesImpl.this.notifyBiometricAuthModeChanged(); } private void setWakeAndUnlocking(boolean wakeAndUnlocking) { @@ -1607,22 +1586,27 @@ public class CentralSurfaces extends CoreStartable implements Trace.endSection(); } + @Override public NotificationShadeWindowView getNotificationShadeWindowView() { return mNotificationShadeWindowView; } + @Override public NotificationShadeWindowViewController getNotificationShadeWindowViewController() { return mNotificationShadeWindowViewController; } + @Override public NotificationPanelViewController getNotificationPanelViewController() { return mNotificationPanelViewController; } + @Override public ViewGroup getBouncerContainer() { return mNotificationShadeWindowViewController.getBouncerContainer(); } + @Override public int getStatusBarHeight() { return mStatusBarWindowController.getStatusBarHeight(); } @@ -1632,7 +1616,8 @@ public class CentralSurfaces extends CoreStartable implements * If the user switcher is simple then disable QS during setup because * the user intends to use the lock screen user switcher, QS in not needed. */ - void updateQsExpansionEnabled() { + @Override + public void updateQsExpansionEnabled() { final boolean expandEnabled = mDeviceProvisionedController.isDeviceProvisioned() && (mUserSetup || mUserSwitcherController == null || !mUserSwitcherController.isSimpleUserSwitcher()) @@ -1643,6 +1628,7 @@ public class CentralSurfaces extends CoreStartable implements Log.d(TAG, "updateQsExpansionEnabled - QS Expand enabled: " + expandEnabled); } + @Override public boolean isShadeDisabled() { return (mDisabled2 & StatusBarManager.DISABLE2_NOTIFICATION_SHADE) != 0; } @@ -1651,6 +1637,7 @@ public class CentralSurfaces extends CoreStartable implements * Request a notification update * @param reason why we're requesting a notification update */ + @Override public void requestNotificationUpdate(String reason) { mNotificationsController.requestNotificationUpdate(reason); } @@ -1658,6 +1645,7 @@ public class CentralSurfaces extends CoreStartable implements /** * Asks {@link KeyguardUpdateMonitor} to run face auth. */ + @Override public void requestFaceAuth(boolean userInitiatedRequest) { if (!mKeyguardStateController.canDismissLockScreen()) { mKeyguardUpdateMonitor.requestFaceAuth(userInitiatedRequest); @@ -1672,7 +1660,8 @@ public class CentralSurfaces extends CoreStartable implements && mFalsingCollector.isReportingEnabled() ? View.VISIBLE : View.INVISIBLE); } - boolean areNotificationAlertsDisabled() { + @Override + public boolean areNotificationAlertsDisabled() { return (mDisabled1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0; } @@ -1724,7 +1713,7 @@ public class CentralSurfaces extends CoreStartable implements getDelegate().onIntentStarted(willAnimate); if (willAnimate) { - CentralSurfaces.this.mIsLaunchingActivityOverLockscreen = true; + CentralSurfacesImpl.this.mIsLaunchingActivityOverLockscreen = true; } } @@ -1734,7 +1723,7 @@ public class CentralSurfaces extends CoreStartable implements // animation so that we can assume that mIsLaunchingActivityOverLockscreen // being true means that we will collapse the shade (or at least run the // post collapse runnables) later on. - CentralSurfaces.this.mIsLaunchingActivityOverLockscreen = false; + CentralSurfacesImpl.this.mIsLaunchingActivityOverLockscreen = false; getDelegate().onLaunchAnimationEnd(isExpandingFullyAbove); } @@ -1744,7 +1733,7 @@ public class CentralSurfaces extends CoreStartable implements // animation so that we can assume that mIsLaunchingActivityOverLockscreen // being true means that we will collapse the shade (or at least run the // post collapse runnables) later on. - CentralSurfaces.this.mIsLaunchingActivityOverLockscreen = false; + CentralSurfacesImpl.this.mIsLaunchingActivityOverLockscreen = false; getDelegate().onLaunchAnimationCancelled(); } }; @@ -1758,7 +1747,8 @@ public class CentralSurfaces extends CoreStartable implements intent.getPackage(), showOverLockscreenWhenLocked, (adapter) -> TaskStackBuilder .create(mContext) .addNextIntent(intent) - .startActivities(getActivityOptions(getDisplayId(), adapter), + .startActivities( + CentralSurfacesInt.getActivityOptions(getDisplayId(), adapter), userHandle)); } @@ -1766,6 +1756,7 @@ public class CentralSurfaces extends CoreStartable implements * Whether we are currently animating an activity launch above the lockscreen (occluding * activity). */ + @Override public boolean isLaunchingActivityOverLockscreen() { return mIsLaunchingActivityOverLockscreen; } @@ -1782,6 +1773,7 @@ public class CentralSurfaces extends CoreStartable implements null /* animationController */, getActivityUserHandle(intent)); } + @Override public void setQsExpanded(boolean expanded) { mNotificationShadeWindowController.setQsExpanded(expanded); mNotificationPanelViewController.setStatusAccessibilityImportance(expanded @@ -1793,10 +1785,12 @@ public class CentralSurfaces extends CoreStartable implements } } + @Override public boolean isWakeUpComingFromTouch() { return mWakeUpComingFromTouch; } + @Override public boolean isFalsingThresholdNeeded() { return true; } @@ -1804,10 +1798,12 @@ public class CentralSurfaces extends CoreStartable implements /** * To be called when there's a state change in StatusBarKeyguardViewManager. */ + @Override public void onKeyguardViewManagerStatesUpdated() { logStateToEventlog(); } + @Override public void setPanelExpanded(boolean isExpanded) { if (mPanelExpanded != isExpanded) { mNotificationLogger.onPanelExpandedChanged(isExpanded); @@ -1828,15 +1824,18 @@ public class CentralSurfaces extends CoreStartable implements } } + @Override public ViewGroup getNotificationScrollLayout() { return mStackScroller; } + @Override public boolean isPulsing() { return mDozeServiceHost.isPulsing(); } - @Nullable + @androidx.annotation.Nullable + @Override public View getAmbientIndicationContainer() { return mAmbientIndicationContainer; } @@ -1847,12 +1846,14 @@ public class CentralSurfaces extends CoreStartable implements * * @return whether the keyguard is currently occluded */ + @Override public boolean isOccluded() { return mKeyguardStateController.isOccluded(); } /** A launch animation was cancelled. */ //TODO: These can / should probably be moved to NotificationPresenter or ShadeController + @Override public void onLaunchAnimationCancelled(boolean isLaunchForActivity) { if (mPresenter.isPresenterFullyCollapsed() && !mPresenter.isCollapsing() && isLaunchForActivity) { @@ -1863,6 +1864,7 @@ public class CentralSurfaces extends CoreStartable implements } /** A launch animation ended. */ + @Override public void onLaunchAnimationEnd(boolean launchIsFullScreen) { if (!mPresenter.isCollapsing()) { onClosingFinished(); @@ -1877,6 +1879,7 @@ public class CentralSurfaces extends CoreStartable implements * * Note: This method must be called *before* dismissing the keyguard. */ + @Override public boolean shouldAnimateLaunch(boolean isActivityIntent, boolean showOverLockscreen) { // TODO(b/184121838): Support launch animations when occluded. if (isOccluded()) { @@ -1897,31 +1900,27 @@ public class CentralSurfaces extends CoreStartable implements } /** Whether we should animate an activity launch. */ + @Override public boolean shouldAnimateLaunch(boolean isActivityIntent) { return shouldAnimateLaunch(isActivityIntent, false /* showOverLockscreen */); } + @Override public boolean isDeviceInVrMode() { return mPresenter.isDeviceInVrMode(); } + @Override public NotificationPresenter getPresenter() { return mPresenter; } @VisibleForTesting - void setBarStateForTest(int state) { + @Override + public void setBarStateForTest(int state) { mState = state; } - static class KeyboardShortcutsMessage { - final int mDeviceId; - - KeyboardShortcutsMessage(int deviceId) { - mDeviceId = deviceId; - } - } - static class AnimateExpandSettingsPanelMessage { final String mSubpanel; @@ -1951,7 +1950,8 @@ public class CentralSurfaces extends CoreStartable implements mHeadsUpManager.releaseAllImmediately(); } - void wakeUpForFullScreenIntent() { + @Override + public void wakeUpForFullScreenIntent() { if (isGoingToSleep() || mDozing) { mPowerManager.wakeUp( SystemClock.uptimeMillis(), @@ -1962,7 +1962,8 @@ public class CentralSurfaces extends CoreStartable implements } } - void makeExpandedVisible(boolean force) { + @Override + public void makeExpandedVisible(boolean force) { if (SPEW) Log.d(TAG, "Make expanded visible: expanded visible=" + mExpandedVisible); if (!force && (mExpandedVisible || !mCommandQueue.panelsEnabled())) { return; @@ -1979,24 +1980,29 @@ public class CentralSurfaces extends CoreStartable implements setInteracting(StatusBarManager.WINDOW_STATUS_BAR, true); } + @Override public void postAnimateCollapsePanels() { mMainExecutor.execute(mShadeController::animateCollapsePanels); } + @Override public void postAnimateForceCollapsePanels() { mMainExecutor.execute( () -> mShadeController.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */)); } + @Override public void postAnimateOpenPanels() { mMessageRouter.sendMessage(MSG_OPEN_SETTINGS_PANEL); } + @Override public boolean isExpandedVisible() { return mExpandedVisible; } + @Override public boolean isPanelExpanded() { return mPanelExpanded; } @@ -2004,6 +2010,7 @@ public class CentralSurfaces extends CoreStartable implements /** * Called when another window is about to transfer it's input focus. */ + @Override public void onInputFocusTransfer(boolean start, boolean cancel, float velocity) { if (!mCommandQueue.panelsEnabled()) { return; @@ -2016,6 +2023,7 @@ public class CentralSurfaces extends CoreStartable implements } } + @Override public void animateCollapseQuickSettings() { if (mState == StatusBarState.SHADE) { mNotificationPanelViewController.collapsePanel( @@ -2067,6 +2075,7 @@ public class CentralSurfaces extends CoreStartable implements } /** Called when a touch event occurred on {@link PhoneStatusBarView}. */ + @Override public void onTouchEvent(MotionEvent event) { // TODO(b/202981994): Move this touch debugging to a central location. (Right now, it's // split between NotificationPanelViewController and here.) @@ -2103,15 +2112,18 @@ public class CentralSurfaces extends CoreStartable implements } } + @Override public GestureRecorder getGestureRecorder() { return mGestureRec; } + @Override public BiometricUnlockController getBiometricUnlockController() { return mBiometricUnlockController; } - void showTransientUnchecked() { + @Override + public void showTransientUnchecked() { if (!mTransientShown) { mTransientShown = true; mNoAnimationOnNextBarModeChange = true; @@ -2119,8 +2131,8 @@ public class CentralSurfaces extends CoreStartable implements } } - - void clearTransient() { + @Override + public void clearTransient() { if (mTransientShown) { mTransientShown = false; maybeUpdateBarMode(); @@ -2164,7 +2176,8 @@ public class CentralSurfaces extends CoreStartable implements } } - protected void showWirelessChargingAnimation(int batteryLevel) { + @Override + public void showWirelessChargingAnimation(int batteryLevel) { showChargingAnimation(batteryLevel, UNKNOWN_BATTERY_LEVEL, 0); } @@ -2185,6 +2198,7 @@ public class CentralSurfaces extends CoreStartable implements }, false, sUiEventLogger).show(animationDelay); } + @Override public void checkBarModes() { if (mDemoModeController.isInDemoMode()) return; if (mStatusBarTransitions != null) { @@ -2195,12 +2209,14 @@ public class CentralSurfaces extends CoreStartable implements } // Called by NavigationBarFragment + @Override public void setQsScrimEnabled(boolean scrimEnabled) { mNotificationPanelViewController.setQsScrimEnabled(scrimEnabled); } /** Temporarily hides Bubbles if the status bar is hidden. */ - void updateBubblesVisibility() { + @Override + public void updateBubblesVisibility() { mBubblesOptional.ifPresent(bubbles -> bubbles.onStatusBarVisibilityChanged( mStatusBarMode != MODE_LIGHTS_OUT && mStatusBarMode != MODE_LIGHTS_OUT_TRANSPARENT @@ -2223,6 +2239,7 @@ public class CentralSurfaces extends CoreStartable implements private final Runnable mCheckBarModes = this::checkBarModes; + @Override public void setInteracting(int barWindow, boolean interacting) { mInteractingWindows = interacting ? (mInteractingWindows | barWindow) @@ -2241,11 +2258,6 @@ public class CentralSurfaces extends CoreStartable implements } } - public static String viewInfo(View v) { - return "[(" + v.getLeft() + "," + v.getTop() + ")(" + v.getRight() + "," + v.getBottom() - + ") " + v.getWidth() + "x" + v.getHeight() + "]"; - } - @Override public void dump(PrintWriter pwOriginal, String[] args) { IndentingPrintWriter pw = DumpUtilsKt.asIndenting(pwOriginal); @@ -2253,8 +2265,8 @@ public class CentralSurfaces extends CoreStartable implements pw.println("Current Status Bar state:"); pw.println(" mExpandedVisible=" + mExpandedVisible); pw.println(" mDisplayMetrics=" + mDisplayMetrics); - pw.println(" mStackScroller: " + viewInfo(mStackScroller)); - pw.println(" mStackScroller: " + viewInfo(mStackScroller) + pw.println(" mStackScroller: " + CentralSurfacesInt.viewInfo(mStackScroller)); + pw.println(" mStackScroller: " + CentralSurfacesInt.viewInfo(mStackScroller) + " scroll " + mStackScroller.getScrollX() + "," + mStackScroller.getScrollY()); } @@ -2270,7 +2282,8 @@ public class CentralSurfaces extends CoreStartable implements pw.println(" ShadeWindowView: "); if (mNotificationShadeWindowViewController != null) { mNotificationShadeWindowViewController.dump(pw, args); - dumpBarTransitions(pw, "PhoneStatusBarTransitions", mStatusBarTransitions); + CentralSurfacesInt.dumpBarTransitions( + pw, "PhoneStatusBarTransitions", mStatusBarTransitions); } pw.println(" mMediaManager: "); @@ -2359,16 +2372,7 @@ public class CentralSurfaces extends CoreStartable implements + CameraIntents.getOverrideCameraPackage(mContext)); } - public static void dumpBarTransitions( - PrintWriter pw, String var, @Nullable BarTransitions transitions) { - pw.print(" "); pw.print(var); pw.print(".BarTransitions.mMode="); - if (transitions != null) { - pw.println(BarTransitions.modeToString(transitions.getMode())); - } else { - pw.println("Unknown"); - } - } - + @Override public void createAndAddWindows(@Nullable RegisterStatusBarResult result) { makeStatusBarView(result); mNotificationShadeWindowController.attach(); @@ -2385,26 +2389,32 @@ public class CentralSurfaces extends CoreStartable implements } } - float getDisplayDensity() { + @Override + public float getDisplayDensity() { return mDisplayMetrics.density; } + @Override public float getDisplayWidth() { return mDisplayMetrics.widthPixels; } + @Override public float getDisplayHeight() { return mDisplayMetrics.heightPixels; } - int getRotation() { + @Override + public int getRotation() { return mDisplay.getRotation(); } - int getDisplayId() { + @Override + public int getDisplayId() { return mDisplayId; } + @Override public void startActivityDismissingKeyguard(final Intent intent, boolean onlyProvisioned, boolean dismissShade, int flags) { startActivityDismissingKeyguard(intent, onlyProvisioned, dismissShade, @@ -2412,12 +2422,14 @@ public class CentralSurfaces extends CoreStartable implements flags, null /* animationController */, getActivityUserHandle(intent)); } + @Override public void startActivityDismissingKeyguard(final Intent intent, boolean onlyProvisioned, boolean dismissShade) { startActivityDismissingKeyguard(intent, onlyProvisioned, dismissShade, 0); } - void startActivityDismissingKeyguard(final Intent intent, boolean onlyProvisioned, + @Override + public void startActivityDismissingKeyguard(final Intent intent, boolean onlyProvisioned, final boolean dismissShade, final boolean disallowEnterPictureInPictureWhileLaunching, final Callback callback, int flags, @Nullable ActivityLaunchAnimator.Controller animationController, @@ -2449,7 +2461,7 @@ public class CentralSurfaces extends CoreStartable implements mActivityLaunchAnimator.startIntentWithAnimation(animController, animate, intent.getPackage(), (adapter) -> { ActivityOptions options = new ActivityOptions( - getActivityOptions(mDisplayId, adapter)); + CentralSurfacesInt.getActivityOptions(mDisplayId, adapter)); options.setDisallowEnterPictureInPictureWhileLaunching( disallowEnterPictureInPictureWhileLaunching); if (CameraIntents.isInsecureCameraIntent(intent)) { @@ -2522,10 +2534,12 @@ public class CentralSurfaces extends CoreStartable implements return animationController; } + @Override public void readyForKeyguardDone() { mStatusBarKeyguardViewManager.readyForKeyguardDone(); } + @Override public void executeRunnableDismissingKeyguard(final Runnable runnable, final Runnable cancelAction, final boolean dismissShade, @@ -2535,6 +2549,7 @@ public class CentralSurfaces extends CoreStartable implements deferred, false /* willAnimateOnKeyguard */); } + @Override public void executeRunnableDismissingKeyguard(final Runnable runnable, final Runnable cancelAction, final boolean dismissShade, @@ -2563,7 +2578,7 @@ public class CentralSurfaces extends CoreStartable implements // ordering. mMainExecutor.execute(mShadeController::runPostCollapseRunnables); } - } else if (CentralSurfaces.this.isInLaunchTransition() + } else if (CentralSurfacesImpl.this.isInLaunchTransition() && mNotificationPanelViewController.isLaunchTransitionFinished()) { // We are not dismissing the shade, but the launch transition is already @@ -2633,6 +2648,7 @@ public class CentralSurfaces extends CoreStartable implements } }; + @Override public void resetUserExpandedStates() { mNotificationsController.resetUserExpandedStates(); } @@ -2674,6 +2690,7 @@ public class CentralSurfaces extends CoreStartable implements * * @param newUserId userId of the new user */ + @Override public void setLockscreenUser(int newUserId) { if (mLockscreenWallpaper != null) { mLockscreenWallpaper.setCurrentUser(newUserId); @@ -2856,6 +2873,7 @@ public class CentralSurfaces extends CoreStartable implements delay); } + @Override public void showKeyguard() { mStatusBarStateController.setKeyguardRequested(true); mStatusBarStateController.setLeaveOpenOnKeyguardHide(false); @@ -2863,16 +2881,19 @@ public class CentralSurfaces extends CoreStartable implements mAssistManagerLazy.get().onLockscreenShown(); } + @Override public boolean hideKeyguard() { mStatusBarStateController.setKeyguardRequested(false); return updateIsKeyguard(); } - boolean updateIsKeyguard() { + @Override + public boolean updateIsKeyguard() { return updateIsKeyguard(false /* forceStateChange */); } - boolean updateIsKeyguard(boolean forceStateChange) { + @Override + public boolean updateIsKeyguard(boolean forceStateChange) { boolean wakeAndUnlocking = mBiometricUnlockController.isWakeAndUnlock(); // For dozing, keyguard needs to be shown whenever the device is non-interactive. Otherwise @@ -2913,6 +2934,7 @@ public class CentralSurfaces extends CoreStartable implements return false; } + @Override public void showKeyguardImpl() { Trace.beginSection("CentralSurfaces#showKeyguard"); // In case we're locking while a smartspace transition is in progress, reset it. @@ -2945,6 +2967,7 @@ public class CentralSurfaces extends CoreStartable implements mPresenter.updateMediaMetaData(true /* metaDataChanged */, true); } + @Override public boolean isInLaunchTransition() { return mNotificationPanelViewController.isLaunchTransitionRunning() || mNotificationPanelViewController.isLaunchTransitionFinished(); @@ -2959,6 +2982,7 @@ public class CentralSurfaces extends CoreStartable implements * if the transition is cancelled, instead cancelRunnable will run * @param cancelRunnable the runnable to be run if the transition is cancelled */ + @Override public void fadeKeyguardAfterLaunchTransition(final Runnable beforeFading, Runnable endRunnable, Runnable cancelRunnable) { mMessageRouter.cancelMessages(MSG_LAUNCH_TRANSITION_TIMEOUT); @@ -2998,6 +3022,7 @@ public class CentralSurfaces extends CoreStartable implements * Fades the content of the Keyguard while we are dozing and makes it invisible when finished * fading. */ + @Override public void fadeKeyguardWhilePulsing() { mNotificationPanelViewController.fadeOut(0, FADE_KEYGUARD_DURATION_PULSING, ()-> { @@ -3009,6 +3034,7 @@ public class CentralSurfaces extends CoreStartable implements /** * Plays the animation when an activity that was occluding Keyguard goes away. */ + @Override public void animateKeyguardUnoccluding() { mNotificationPanelViewController.setExpandedFraction(0f); mCommandQueueCallbacks.animateExpandNotificationsPanel(); @@ -3020,6 +3046,7 @@ public class CentralSurfaces extends CoreStartable implements * Keyguard goes away via fadeKeyguardAfterLaunchTransition, however, that might not happen * because the launched app crashed or something else went wrong. */ + @Override public void startLaunchTransitionTimeout() { mMessageRouter.sendMessageDelayed( MSG_LAUNCH_TRANSITION_TIMEOUT, LAUNCH_TRANSITION_TIMEOUT_MS); @@ -3047,6 +3074,7 @@ public class CentralSurfaces extends CoreStartable implements /** * @return true if we would like to stay in the shade, false if it should go away entirely */ + @Override public boolean hideKeyguardImpl(boolean forceStateChange) { Trace.beginSection("CentralSurfaces#hideKeyguard"); boolean staying = mStatusBarStateController.leaveOpenOnKeyguardHide(); @@ -3098,6 +3126,7 @@ public class CentralSurfaces extends CoreStartable implements /** * Notifies the status bar that Keyguard is going away very soon. */ + @Override public void keyguardGoingAway() { // Treat Keyguard exit animation as an app transition to achieve nice transition for status // bar. @@ -3113,6 +3142,7 @@ public class CentralSurfaces extends CoreStartable implements * @param fadeoutDuration the duration of the exit animation, in milliseconds * @param isBypassFading is this a fading away animation while bypassing */ + @Override public void setKeyguardFadingAway(long startTime, long delay, long fadeoutDuration, boolean isBypassFading) { mCommandQueue.appTransitionStarting(mDisplayId, startTime + fadeoutDuration @@ -3128,6 +3158,7 @@ public class CentralSurfaces extends CoreStartable implements /** * Notifies that the Keyguard fading away animation is done. */ + @Override public void finishKeyguardFadingAway() { mKeyguardStateController.notifyKeyguardDoneFading(); mScrimController.setExpansionAffectsAlpha(true); @@ -3188,12 +3219,14 @@ public class CentralSurfaces extends CoreStartable implements Trace.endSection(); } + @Override public void userActivity() { if (mState == StatusBarState.KEYGUARD) { mKeyguardViewMediatorCallback.userActivity(); } } + @Override public boolean interceptMediaKey(KeyEvent event) { return mState == StatusBarState.KEYGUARD && mStatusBarKeyguardViewManager.interceptMediaKey(event); @@ -3205,6 +3238,7 @@ public class CentralSurfaces extends CoreStartable implements * should be handled before routing to IME, in order to prevent the user having to hit back * twice to exit bouncer. */ + @Override public boolean dispatchKeyEventPreIme(KeyEvent event) { switch (event.getKeyCode()) { case KeyEvent.KEYCODE_BACK: @@ -3221,6 +3255,7 @@ public class CentralSurfaces extends CoreStartable implements && mStatusBarKeyguardViewManager.shouldDismissOnMenuPressed(); } + @Override public boolean onMenuPressed() { if (shouldUnlockOnMenuPressed()) { mShadeController.animateCollapsePanels( @@ -3230,11 +3265,13 @@ public class CentralSurfaces extends CoreStartable implements return false; } + @Override public void endAffordanceLaunch() { releaseGestureWakeLock(); mNotificationPanelViewController.onAffordanceLaunchEnded(); } + @Override public boolean onBackPressed() { final boolean isScrimmedBouncer = mScrimController.getState() == ScrimState.BOUNCER_SCRIMMED; @@ -3274,6 +3311,7 @@ public class CentralSurfaces extends CoreStartable implements return false; } + @Override public boolean onSpacePressed() { if (mDeviceInteractive && mState != StatusBarState.SHADE) { mShadeController.animateCollapsePanels( @@ -3306,6 +3344,7 @@ public class CentralSurfaces extends CoreStartable implements * @param performAction the action to perform when the bouncer is dismissed. * @param cancelAction the action to perform when unlock is aborted. */ + @Override public void showBouncerWithDimissAndCancelIfKeyguard(OnDismissAction performAction, Runnable cancelAction) { if ((mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED) @@ -3317,7 +3356,8 @@ public class CentralSurfaces extends CoreStartable implements } } - void instantCollapseNotificationPanel() { + @Override + public void instantCollapseNotificationPanel() { mNotificationPanelViewController.instantCollapse(); mShadeController.runPostCollapseRunnables(); } @@ -3326,7 +3366,8 @@ public class CentralSurfaces extends CoreStartable implements * Collapse the panel directly if we are on the main thread, post the collapsing on the main * thread if we are not. */ - void collapsePanelOnMainThread() { + @Override + public void collapsePanelOnMainThread() { if (Looper.getMainLooper().isCurrentThread()) { mShadeController.collapsePanel(); } else { @@ -3335,7 +3376,8 @@ public class CentralSurfaces extends CoreStartable implements } /** Collapse the panel. The collapsing will be animated for the given {@code duration}. */ - void collapsePanelWithDuration(int duration) { + @Override + public void collapsePanelWithDuration(int duration) { mNotificationPanelViewController.collapseWithDuration(duration); } @@ -3371,14 +3413,17 @@ public class CentralSurfaces extends CoreStartable implements } } + @Override public LightRevealScrim getLightRevealScrim() { return mLightRevealScrim; } + @Override public void onTrackingStarted() { mShadeController.runPostCollapseRunnables(); } + @Override public void onClosingFinished() { mShadeController.runPostCollapseRunnables(); if (!mPresenter.isPresenterFullyCollapsed()) { @@ -3388,31 +3433,37 @@ public class CentralSurfaces extends CoreStartable implements } } + @Override public void onUnlockHintStarted() { mFalsingCollector.onUnlockHintStarted(); mKeyguardIndicationController.showActionToUnlock(); } + @Override public void onHintFinished() { // Delay the reset a bit so the user can read the text. mKeyguardIndicationController.hideTransientIndicationDelayed(HINT_RESET_DELAY_MS); } + @Override public void onCameraHintStarted() { mFalsingCollector.onCameraHintStarted(); mKeyguardIndicationController.showTransientIndication(R.string.camera_hint); } + @Override public void onVoiceAssistHintStarted() { mFalsingCollector.onLeftAffordanceHintStarted(); mKeyguardIndicationController.showTransientIndication(R.string.voice_hint); } + @Override public void onPhoneHintStarted() { mFalsingCollector.onLeftAffordanceHintStarted(); mKeyguardIndicationController.showTransientIndication(R.string.phone_hint); } + @Override public void onTrackingStopped(boolean expand) { if (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED) { if (!expand && !mKeyguardStateController.canDismissLockScreen()) { @@ -3422,18 +3473,22 @@ public class CentralSurfaces extends CoreStartable implements } // TODO: Figure out way to remove these. + @Override public NavigationBarView getNavigationBarView() { return mNavigationBarController.getNavigationBarView(mDisplayId); } + @Override public boolean isOverviewEnabled() { return mNavigationBarController.isOverviewEnabled(mDisplayId); } + @Override public void showPinningEnterExitToast(boolean entering) { mNavigationBarController.showPinningEnterExitToast(mDisplayId, entering); } + @Override public void showPinningEscapeToast() { mNavigationBarController.showPinningEscapeToast(mDisplayId); } @@ -3442,6 +3497,7 @@ public class CentralSurfaces extends CoreStartable implements * TODO: Remove this method. Views should not be passed forward. Will cause theme issues. * @return bottom area view */ + @Override public KeyguardBottomAreaView getKeyguardBottomAreaView() { return mNotificationPanelViewController.getKeyguardBottomAreaView(); } @@ -3449,6 +3505,7 @@ public class CentralSurfaces extends CoreStartable implements /** * Propagation of the bouncer state, indicating that it's fully visible. */ + @Override public void setBouncerShowing(boolean bouncerShowing) { mBouncerShowing = bouncerShowing; mKeyguardBypassController.setBouncerShowing(bouncerShowing); @@ -3468,6 +3525,7 @@ public class CentralSurfaces extends CoreStartable implements * {@link #setBouncerShowing(boolean)} leads to unintended side effects from states modified * behind the dream. */ + @Override public void setBouncerShowingOverDream(boolean bouncerShowingOverDream) { mBouncerShowingOverDream = bouncerShowingOverDream; } @@ -3492,6 +3550,7 @@ public class CentralSurfaces extends CoreStartable implements /** * Collapses the notification shade if it is tracking or expanded. */ + @Override public void collapseShade() { if (mNotificationPanelViewController.isTracking()) { mNotificationShadeWindowViewController.cancelCurrentTouch(); @@ -3614,7 +3673,8 @@ public class CentralSurfaces extends CoreStartable implements * collapse the panel after we expanded it, and thus we would end up with a blank * Keyguard. */ - void updateNotificationPanelTouchState() { + @Override + public void updateNotificationPanelTouchState() { boolean goingToSleepWithoutAnimation = isGoingToSleep() && !mDozeParameters.shouldControlScreenOff(); boolean disabled = (!mDeviceInteractive && !mDozeServiceHost.isPulsing()) @@ -3649,6 +3709,7 @@ public class CentralSurfaces extends CoreStartable implements } }; + @Override public int getWakefulnessState() { return mWakefulnessLifecycle.getWakefulness(); } @@ -3657,15 +3718,19 @@ public class CentralSurfaces extends CoreStartable implements * @return true if the screen is currently fully off, i.e. has finished turning off and has * since not started turning on. */ + @Override public boolean isScreenFullyOff() { return mScreenLifecycle.getScreenState() == ScreenLifecycle.SCREEN_OFF; } + @Override public void showScreenPinningRequest(int taskId, boolean allowCancel) { mScreenPinningRequest.showPrompt(taskId, allowCancel); } - @Nullable Intent getEmergencyActionIntent() { + @Nullable + @Override + public Intent getEmergencyActionIntent() { Intent emergencyIntent = new Intent(EmergencyGesture.ACTION_LAUNCH_EMERGENCY); PackageManager pm = mContext.getPackageManager(); List emergencyActivities = pm.queryIntentActivities(emergencyIntent, @@ -3709,7 +3774,8 @@ public class CentralSurfaces extends CoreStartable implements return emergencyActivities.get(0); } - boolean isCameraAllowedByAdmin() { + @Override + public boolean isCameraAllowedByAdmin() { if (mDevicePolicyManager.getCameraDisabled(null, mLockscreenUserManager.getCurrentUserId())) { return false; @@ -3723,7 +3789,8 @@ public class CentralSurfaces extends CoreStartable implements return true; } - boolean isGoingToSleep() { + @Override + public boolean isGoingToSleep() { return mWakefulnessLifecycle.getWakefulness() == WakefulnessLifecycle.WAKEFULNESS_GOING_TO_SLEEP; } @@ -3733,6 +3800,7 @@ public class CentralSurfaces extends CoreStartable implements || mWakefulnessLifecycle.getWakefulness() == WakefulnessLifecycle.WAKEFULNESS_AWAKE; } + @Override public void notifyBiometricAuthModeChanged() { mDozeServiceHost.updateDozing(); updateScrimController(); @@ -3743,6 +3811,7 @@ public class CentralSurfaces extends CoreStartable implements * 0.0f means we're not transitioning yet, while 1 means we're all the way in the full * shade. */ + @Override public void setTransitionToFullShadeProgress(float transitionToFullShadeProgress) { mTransitionToFullShadeProgress = transitionToFullShadeProgress; } @@ -3751,10 +3820,12 @@ public class CentralSurfaces extends CoreStartable implements * Sets the amount of progress to the bouncer being fully hidden/visible. 1 means the bouncer * is fully hidden, while 0 means the bouncer is visible. */ + @Override public void setBouncerHiddenFraction(float expansion) { mScrimController.setBouncerHiddenFraction(expansion); } + @Override @VisibleForTesting public void updateScrimController() { Trace.beginSection("CentralSurfaces#updateScrimController"); @@ -3817,6 +3888,7 @@ public class CentralSurfaces extends CoreStartable implements Trace.endSection(); } + @Override public boolean isKeyguardShowing() { if (mStatusBarKeyguardViewManager == null) { Slog.i(TAG, "isKeyguardShowing() called before startKeyguard(), returning true"); @@ -3825,6 +3897,7 @@ public class CentralSurfaces extends CoreStartable implements return mStatusBarKeyguardViewManager.isShowing(); } + @Override public boolean shouldIgnoreTouch() { return (mStatusBarStateController.isDozing() && mDozeServiceHost.getIgnoreTouchWhilePulsing()) @@ -3874,6 +3947,7 @@ public class CentralSurfaces extends CoreStartable implements private final Lazy mAssistManagerLazy; + @Override public boolean isDeviceInteractive() { return mDeviceInteractive; } @@ -3902,11 +3976,13 @@ public class CentralSurfaces extends CoreStartable implements } }; + @Override public void setNotificationSnoozed(StatusBarNotification sbn, SnoozeOption snoozeOption) { mNotificationsController.setNotificationSnoozed(sbn, snoozeOption); } + @Override public void awakenDreams() { mUiBgExecutor.execute(() -> { try { @@ -4016,7 +4092,8 @@ public class CentralSurfaces extends CoreStartable implements controller, animate, intent.getCreatorPackage(), (animationAdapter) -> { ActivityOptions options = new ActivityOptions( - getActivityOptions(mDisplayId, animationAdapter)); + CentralSurfacesInt.getActivityOptions( + mDisplayId, animationAdapter)); // TODO b/221255671: restrict this to only be set for notifications options.setEligibleForLegacyPermissionPrompt(true); return intent.sendAndReturnResult(null, 0, null, null, null, @@ -4045,62 +4122,8 @@ public class CentralSurfaces extends CoreStartable implements mMainExecutor.execute(runnable); } - /** - * Returns an ActivityOptions bundle created using the given parameters. - * - * @param displayId The ID of the display to launch the activity in. Typically this would be the - * display the status bar is on. - * @param animationAdapter The animation adapter used to start this activity, or {@code null} - * for the default animation. - */ - public static Bundle getActivityOptions(int displayId, - @Nullable RemoteAnimationAdapter animationAdapter) { - ActivityOptions options = getDefaultActivityOptions(animationAdapter); - options.setLaunchDisplayId(displayId); - options.setCallerDisplayId(displayId); - return options.toBundle(); - } - - /** - * Returns an ActivityOptions bundle created using the given parameters. - * - * @param displayId The ID of the display to launch the activity in. Typically this would be the - * display the status bar is on. - * @param animationAdapter The animation adapter used to start this activity, or {@code null} - * for the default animation. - * @param isKeyguardShowing Whether keyguard is currently showing. - * @param eventTime The event time in milliseconds since boot, not including sleep. See - * {@link ActivityOptions#setSourceInfo}. - */ - public static Bundle getActivityOptions(int displayId, - @Nullable RemoteAnimationAdapter animationAdapter, boolean isKeyguardShowing, - long eventTime) { - ActivityOptions options = getDefaultActivityOptions(animationAdapter); - options.setSourceInfo(isKeyguardShowing ? ActivityOptions.SourceInfo.TYPE_LOCKSCREEN - : ActivityOptions.SourceInfo.TYPE_NOTIFICATION, eventTime); - options.setLaunchDisplayId(displayId); - options.setCallerDisplayId(displayId); - return options.toBundle(); - } - - public static ActivityOptions getDefaultActivityOptions( - @Nullable RemoteAnimationAdapter animationAdapter) { - ActivityOptions options; - if (animationAdapter != null) { - if (ENABLE_SHELL_TRANSITIONS) { - options = ActivityOptions.makeRemoteTransition( - RemoteTransitionAdapter.adaptRemoteAnimation(animationAdapter)); - } else { - options = ActivityOptions.makeRemoteAnimation(animationAdapter); - } - } else { - options = ActivityOptions.makeBasic(); - } - options.setSplashScreenStyle(SplashScreen.SPLASH_SCREEN_STYLE_SOLID_COLOR); - return options; - } - - void visibilityChanged(boolean visible) { + @Override + public void visibilityChanged(boolean visible) { if (mVisible != visible) { mVisible = visible; if (!visible) { @@ -4123,6 +4146,7 @@ public class CentralSurfaces extends CoreStartable implements /** * Clear Buzz/Beep/Blink. */ + @Override public void clearNotificationEffects() { try { mBarService.clearNotificationEffects(); @@ -4134,6 +4158,7 @@ public class CentralSurfaces extends CoreStartable implements /** * @return Whether the security bouncer from Keyguard is showing. */ + @Override public boolean isBouncerShowing() { return mBouncerShowing; } @@ -4141,10 +4166,12 @@ public class CentralSurfaces extends CoreStartable implements /** * @return Whether the security bouncer from Keyguard is showing. */ + @Override public boolean isBouncerShowingScrimmed() { return isBouncerShowing() && mStatusBarKeyguardViewManager.bouncerNeedsScrimming(); } + @Override public boolean isBouncerShowingOverDream() { return mBouncerShowingOverDream; } @@ -4152,33 +4179,13 @@ public class CentralSurfaces extends CoreStartable implements /** * When {@link KeyguardBouncer} starts to be dismissed, playing its animation. */ + @Override public void onBouncerPreHideAnimation() { mNotificationPanelViewController.onBouncerPreHideAnimation(); } - /** - * @return a PackageManger for userId or if userId is < 0 (USER_ALL etc) then - * return PackageManager for mContext - */ - public static PackageManager getPackageManagerForUser(Context context, int userId) { - Context contextForUser = context; - // UserHandle defines special userId as negative values, e.g. USER_ALL - if (userId >= 0) { - try { - // Create a context for the correct user so if a package isn't installed - // for user 0 we can still load information about the package. - contextForUser = - context.createPackageContextAsUser(context.getPackageName(), - Context.CONTEXT_RESTRICTED, - new UserHandle(userId)); - } catch (NameNotFoundException e) { - // Shouldn't fail to find the package name for system ui. - } - } - return contextForUser.getPackageManager(); - } - + @Override public boolean isKeyguardSecure() { if (mStatusBarKeyguardViewManager == null) { // startKeyguard() hasn't been called yet, so we don't know. @@ -4190,11 +4197,13 @@ public class CentralSurfaces extends CoreStartable implements } return mStatusBarKeyguardViewManager.isSecure(); } + @Override public NotificationPanelViewController getPanelController() { return mNotificationPanelViewController; } // End Extra BaseStatusBarMethods. + @Override public NotificationGutsManager getGutsManager() { return mGutsManager; } @@ -4212,6 +4221,11 @@ public class CentralSurfaces extends CoreStartable implements mLightRevealScrim.setAlpha(mScrimController.getState().getMaxLightRevealScrimAlpha()); } + @Override + public void extendDozePulse(){ + mDozeScrimController.extendPulse(); + } + private final KeyguardUpdateMonitorCallback mUpdateCallback = new KeyguardUpdateMonitorCallback() { @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesInt.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesInt.java new file mode 100644 index 0000000000000..ccce0ef8df8c4 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesInt.java @@ -0,0 +1,587 @@ +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.statusbar.phone; + +import static com.android.wm.shell.transition.Transitions.ENABLE_SHELL_TRANSITIONS; + +import android.annotation.Nullable; +import android.app.ActivityOptions; +import android.app.PendingIntent; +import android.content.Context; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.os.Bundle; +import android.os.UserHandle; +import android.service.notification.StatusBarNotification; +import android.view.KeyEvent; +import android.view.MotionEvent; +import android.view.RemoteAnimationAdapter; +import android.view.View; +import android.view.ViewGroup; +import android.window.SplashScreen; + +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; +import androidx.lifecycle.LifecycleOwner; + +import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.statusbar.RegisterStatusBarResult; +import com.android.systemui.Dumpable; +import com.android.systemui.animation.ActivityLaunchAnimator; +import com.android.systemui.animation.RemoteTransitionAdapter; +import com.android.systemui.navigationbar.NavigationBarView; +import com.android.systemui.plugins.ActivityStarter; +import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper; +import com.android.systemui.qs.QSPanelController; +import com.android.systemui.statusbar.GestureRecorder; +import com.android.systemui.statusbar.LightRevealScrim; +import com.android.systemui.statusbar.NotificationPresenter; +import com.android.systemui.statusbar.notification.row.NotificationGutsManager; + +import java.io.PrintWriter; + +public interface CentralSurfacesInt extends Dumpable, ActivityStarter, LifecycleOwner { + boolean MULTIUSER_DEBUG = false; + // Should match the values in PhoneWindowManager + String SYSTEM_DIALOG_REASON_KEY = "reason"; + String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps"; + String SYSTEM_DIALOG_REASON_DREAM = "dream"; + String SYSTEM_DIALOG_REASON_SCREENSHOT = "screenshot"; + String TAG = "CentralSurfaces"; + boolean DEBUG = false; + boolean SPEW = false; + boolean DUMPTRUCK = true; // extra dumpsys info + boolean DEBUG_GESTURES = false; + boolean DEBUG_MEDIA_FAKE_ARTWORK = false; + boolean DEBUG_CAMERA_LIFT = false; + boolean DEBUG_WINDOW_STATE = false; + // additional instrumentation for testing purposes; intended to be left on during development + boolean CHATTY = DEBUG; + boolean SHOW_LOCKSCREEN_MEDIA_ARTWORK = true; + String ACTION_FAKE_ARTWORK = "fake_artwork"; + int FADE_KEYGUARD_START_DELAY = 100; + int FADE_KEYGUARD_DURATION = 300; + int FADE_KEYGUARD_DURATION_PULSING = 96; + long[] CAMERA_LAUNCH_GESTURE_VIBRATION_TIMINGS = + new long[]{20, 20, 20, 20, 100, 20}; + int[] CAMERA_LAUNCH_GESTURE_VIBRATION_AMPLITUDES = + new int[]{39, 82, 139, 213, 0, 127}; + + /** If true, the lockscreen will show a distinct wallpaper */ + boolean ENABLE_LOCKSCREEN_WALLPAPER = true; + // Time after we abort the launch transition. + long LAUNCH_TRANSITION_TIMEOUT_MS = 5000; + int MSG_DISMISS_KEYBOARD_SHORTCUTS_MENU = 1027; + + static final boolean CLOSE_PANEL_WHEN_EMPTIED = true; + + static String viewInfo(View v) { + return "[(" + v.getLeft() + "," + v.getTop() + ")(" + v.getRight() + "," + v.getBottom() + + ") " + v.getWidth() + "x" + v.getHeight() + "]"; + } + + static void dumpBarTransitions( + PrintWriter pw, String var, @Nullable BarTransitions transitions) { + pw.print(" "); + pw.print(var); + pw.print(".BarTransitions.mMode="); + if (transitions != null) { + pw.println(BarTransitions.modeToString(transitions.getMode())); + } else { + pw.println("Unknown"); + } + } + + /** + * Returns an ActivityOptions bundle created using the given parameters. + * + * @param displayId The ID of the display to launch the activity in. Typically this would + * be the display the status bar is on. + * @param animationAdapter The animation adapter used to start this activity, or {@code null} + * for the default animation. + */ + static Bundle getActivityOptions(int displayId, + @Nullable RemoteAnimationAdapter animationAdapter) { + ActivityOptions options = getDefaultActivityOptions(animationAdapter); + options.setLaunchDisplayId(displayId); + options.setCallerDisplayId(displayId); + return options.toBundle(); + } + + /** + * Returns an ActivityOptions bundle created using the given parameters. + * + * @param displayId The ID of the display to launch the activity in. Typically this + * would be the + * display the status bar is on. + * @param animationAdapter The animation adapter used to start this activity, or {@code null} + * for the default animation. + * @param isKeyguardShowing Whether keyguard is currently showing. + * @param eventTime The event time in milliseconds since boot, not including sleep. See + * {@link ActivityOptions#setSourceInfo}. + */ + static Bundle getActivityOptions(int displayId, + @Nullable RemoteAnimationAdapter animationAdapter, boolean isKeyguardShowing, + long eventTime) { + ActivityOptions options = getDefaultActivityOptions(animationAdapter); + options.setSourceInfo(isKeyguardShowing ? ActivityOptions.SourceInfo.TYPE_LOCKSCREEN + : ActivityOptions.SourceInfo.TYPE_NOTIFICATION, eventTime); + options.setLaunchDisplayId(displayId); + options.setCallerDisplayId(displayId); + return options.toBundle(); + } + + static ActivityOptions getDefaultActivityOptions( + @Nullable RemoteAnimationAdapter animationAdapter) { + ActivityOptions options; + if (animationAdapter != null) { + if (ENABLE_SHELL_TRANSITIONS) { + options = ActivityOptions.makeRemoteTransition( + RemoteTransitionAdapter.adaptRemoteAnimation(animationAdapter)); + } else { + options = ActivityOptions.makeRemoteAnimation(animationAdapter); + } + } else { + options = ActivityOptions.makeBasic(); + } + options.setSplashScreenStyle(SplashScreen.SPLASH_SCREEN_STYLE_SOLID_COLOR); + return options; + } + + /** + * @return a PackageManager for userId or if userId is < 0 (USER_ALL etc) then + * return PackageManager for mContext + */ + static PackageManager getPackageManagerForUser(Context context, int userId) { + Context contextForUser = context; + // UserHandle defines special userId as negative values, e.g. USER_ALL + if (userId >= 0) { + try { + // Create a context for the correct user so if a package isn't installed + // for user 0 we can still load information about the package. + contextForUser = + context.createPackageContextAsUser(context.getPackageName(), + Context.CONTEXT_RESTRICTED, + new UserHandle(userId)); + } catch (PackageManager.NameNotFoundException e) { + // Shouldn't fail to find the package name for system ui. + } + } + return contextForUser.getPackageManager(); + } + + void animateExpandNotificationsPanel(); + + void animateExpandSettingsPanel(@Nullable String subpanel); + + void animateCollapsePanels(int flags, boolean force); + + void collapsePanelOnMainThread(); + + void collapsePanelWithDuration(int duration); + + void togglePanel(); + + void start(); + + boolean updateIsKeyguard(); + + boolean updateIsKeyguard(boolean forceStateChange); + + @NonNull + @Override + Lifecycle getLifecycle(); + + void wakeUpIfDozing(long time, View where, String why); + + NotificationShadeWindowView getNotificationShadeWindowView(); + + NotificationShadeWindowViewController getNotificationShadeWindowViewController(); + + NotificationPanelViewController getNotificationPanelViewController(); + + ViewGroup getBouncerContainer(); + + int getStatusBarHeight(); + + void updateQsExpansionEnabled(); + + boolean isShadeDisabled(); + + void requestNotificationUpdate(String reason); + + void requestFaceAuth(boolean userInitiatedRequest); + + @Override + void startActivity(Intent intent, boolean onlyProvisioned, boolean dismissShade, + int flags); + + @Override + void startActivity(Intent intent, boolean dismissShade); + + @Override + void startActivity(Intent intent, boolean dismissShade, + @Nullable ActivityLaunchAnimator.Controller animationController, + boolean showOverLockscreenWhenLocked); + + @Override + void startActivity(Intent intent, boolean dismissShade, + @Nullable ActivityLaunchAnimator.Controller animationController, + boolean showOverLockscreenWhenLocked, UserHandle userHandle); + + boolean isLaunchingActivityOverLockscreen(); + + @Override + void startActivity(Intent intent, boolean onlyProvisioned, boolean dismissShade); + + @Override + void startActivity(Intent intent, boolean dismissShade, Callback callback); + + void setQsExpanded(boolean expanded); + + boolean isWakeUpComingFromTouch(); + + boolean isFalsingThresholdNeeded(); + + void onKeyguardViewManagerStatesUpdated(); + + void setPanelExpanded(boolean isExpanded); + + ViewGroup getNotificationScrollLayout(); + + boolean isPulsing(); + + @Nullable + View getAmbientIndicationContainer(); + + boolean isOccluded(); + + //TODO: These can / should probably be moved to NotificationPresenter or ShadeController + void onLaunchAnimationCancelled(boolean isLaunchForActivity); + + void onLaunchAnimationEnd(boolean launchIsFullScreen); + + boolean shouldAnimateLaunch(boolean isActivityIntent, boolean showOverLockscreen); + + boolean shouldAnimateLaunch(boolean isActivityIntent); + + boolean isDeviceInVrMode(); + + NotificationPresenter getPresenter(); + + void postAnimateCollapsePanels(); + + void postAnimateForceCollapsePanels(); + + void postAnimateOpenPanels(); + + boolean isExpandedVisible(); + + boolean isPanelExpanded(); + + void onInputFocusTransfer(boolean start, boolean cancel, float velocity); + + void animateCollapseQuickSettings(); + + void onTouchEvent(MotionEvent event); + + GestureRecorder getGestureRecorder(); + + BiometricUnlockController getBiometricUnlockController(); + + void showWirelessChargingAnimation(int batteryLevel); + + void checkBarModes(); + + // Called by NavigationBarFragment + void setQsScrimEnabled(boolean scrimEnabled); + + void updateBubblesVisibility(); + + void setInteracting(int barWindow, boolean interacting); + + @Override + void dump(PrintWriter pwOriginal, String[] args); + + void createAndAddWindows(@Nullable RegisterStatusBarResult result); + + float getDisplayWidth(); + + float getDisplayHeight(); + + void startActivityDismissingKeyguard(Intent intent, boolean onlyProvisioned, + boolean dismissShade, int flags); + + void startActivityDismissingKeyguard(Intent intent, boolean onlyProvisioned, + boolean dismissShade); + + void startActivityDismissingKeyguard(Intent intent, boolean onlyProvisioned, + boolean dismissShade, boolean disallowEnterPictureInPictureWhileLaunching, + Callback callback, int flags, + @Nullable ActivityLaunchAnimator.Controller animationController, + UserHandle userHandle); + + void readyForKeyguardDone(); + + void executeRunnableDismissingKeyguard(Runnable runnable, + Runnable cancelAction, + boolean dismissShade, + boolean afterKeyguardGone, + boolean deferred); + + void executeRunnableDismissingKeyguard(Runnable runnable, + Runnable cancelAction, + boolean dismissShade, + boolean afterKeyguardGone, + boolean deferred, + boolean willAnimateOnKeyguard); + + void resetUserExpandedStates(); + + @Override + void dismissKeyguardThenExecute(OnDismissAction action, Runnable cancelAction, + boolean afterKeyguardGone); + + void setLockscreenUser(int newUserId); + + @Override + void postQSRunnableDismissingKeyguard(Runnable runnable); + + @Override + void postStartActivityDismissingKeyguard(PendingIntent intent); + + @Override + void postStartActivityDismissingKeyguard(PendingIntent intent, + @Nullable ActivityLaunchAnimator.Controller animationController); + + @Override + void postStartActivityDismissingKeyguard(Intent intent, int delay); + + @Override + void postStartActivityDismissingKeyguard(Intent intent, int delay, + @Nullable ActivityLaunchAnimator.Controller animationController); + + void showKeyguard(); + + boolean hideKeyguard(); + + void showKeyguardImpl(); + + boolean isInLaunchTransition(); + + void fadeKeyguardAfterLaunchTransition(Runnable beforeFading, + Runnable endRunnable, Runnable cancelRunnable); + + void fadeKeyguardWhilePulsing(); + + void animateKeyguardUnoccluding(); + + void startLaunchTransitionTimeout(); + + boolean hideKeyguardImpl(boolean forceStateChange); + + void keyguardGoingAway(); + + void setKeyguardFadingAway(long startTime, long delay, long fadeoutDuration, + boolean isBypassFading); + + void finishKeyguardFadingAway(); + + void userActivity(); + + boolean interceptMediaKey(KeyEvent event); + + boolean dispatchKeyEventPreIme(KeyEvent event); + + boolean onMenuPressed(); + + void endAffordanceLaunch(); + + boolean onBackPressed(); + + boolean onSpacePressed(); + + void showBouncerWithDimissAndCancelIfKeyguard(OnDismissAction performAction, + Runnable cancelAction); + + LightRevealScrim getLightRevealScrim(); + + void onTrackingStarted(); + + void onClosingFinished(); + + void onUnlockHintStarted(); + + void onHintFinished(); + + void onCameraHintStarted(); + + void onVoiceAssistHintStarted(); + + void onPhoneHintStarted(); + + void onTrackingStopped(boolean expand); + + // TODO: Figure out way to remove these. + NavigationBarView getNavigationBarView(); + + boolean isOverviewEnabled(); + + void showPinningEnterExitToast(boolean entering); + + void showPinningEscapeToast(); + + KeyguardBottomAreaView getKeyguardBottomAreaView(); + + void setBouncerShowing(boolean bouncerShowing); + + void setBouncerShowingOverDream(boolean bouncerShowingOverDream); + + void collapseShade(); + + int getWakefulnessState(); + + boolean isScreenFullyOff(); + + void showScreenPinningRequest(int taskId, boolean allowCancel); + + @Nullable + Intent getEmergencyActionIntent(); + + boolean isCameraAllowedByAdmin(); + + boolean isGoingToSleep(); + + void notifyBiometricAuthModeChanged(); + + void setTransitionToFullShadeProgress(float transitionToFullShadeProgress); + + void setBouncerHiddenFraction(float expansion); + + @VisibleForTesting + void updateScrimController(); + + boolean isKeyguardShowing(); + + boolean shouldIgnoreTouch(); + + boolean isDeviceInteractive(); + + void setNotificationSnoozed(StatusBarNotification sbn, + NotificationSwipeActionHelper.SnoozeOption snoozeOption); + + void awakenDreams(); + + @Override + void startPendingIntentDismissingKeyguard(PendingIntent intent); + + @Override + void startPendingIntentDismissingKeyguard( + PendingIntent intent, @Nullable Runnable intentSentUiThreadCallback); + + @Override + void startPendingIntentDismissingKeyguard(PendingIntent intent, + Runnable intentSentUiThreadCallback, View associatedView); + + @Override + void startPendingIntentDismissingKeyguard( + PendingIntent intent, @Nullable Runnable intentSentUiThreadCallback, + @Nullable ActivityLaunchAnimator.Controller animationController); + + void clearNotificationEffects(); + + boolean isBouncerShowing(); + + boolean isBouncerShowingScrimmed(); + + boolean isBouncerShowingOverDream(); + + void onBouncerPreHideAnimation(); + + boolean isKeyguardSecure(); + + NotificationPanelViewController getPanelController(); + + NotificationGutsManager getGutsManager(); + + void updateNotificationPanelTouchState(); + + void makeExpandedVisible(boolean force); + + void instantCollapseNotificationPanel(); + + void visibilityChanged(boolean visible); + + int getDisplayId(); + + int getRotation(); + + @VisibleForTesting + void setBarStateForTest(int state); + + void wakeUpForFullScreenIntent(); + + void showTransientUnchecked(); + + void clearTransient(); + + void acquireGestureWakeLock(long time); + + boolean setAppearance(int appearance); + + int getBarMode(); + + void resendMessage(int msg); + + void resendMessage(Object msg); + + int getDisabled1(); + + void setDisabled1(int disabled); + + int getDisabled2(); + + void setDisabled2(int disabled); + + void setLastCameraLaunchSource(int source); + + void setLaunchCameraOnFinishedGoingToSleep(boolean launch); + + void setLaunchCameraOnFinishedWaking(boolean launch); + + void setLaunchEmergencyActionOnFinishedGoingToSleep(boolean launch); + + void setLaunchEmergencyActionOnFinishedWaking(boolean launch); + + void setTopHidesStatusBar(boolean hides); + + QSPanelController getQSPanelController(); + + boolean areNotificationAlertsDisabled(); + + float getDisplayDensity(); + + void extendDozePulse(); + + public static class KeyboardShortcutsMessage { + final int mDeviceId; + + KeyboardShortcutsMessage(int deviceId) { + mDeviceId = deviceId; + } + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java index 55b310ff986da..b28d125974505 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java @@ -97,7 +97,7 @@ public final class DozeServiceHost implements DozeHost { private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private NotificationPanelViewController mNotificationPanel; private View mAmbientIndicationContainer; - private CentralSurfaces mCentralSurfaces; + private CentralSurfacesInt mCentralSurfaces; private boolean mAlwaysOnSuppressed; @Inject @@ -146,7 +146,7 @@ public final class DozeServiceHost implements DozeHost { * Initialize instance with objects only available later during execution. */ public void initialize( - CentralSurfaces centralSurfaces, + CentralSurfacesInt centralSurfaces, StatusBarKeyguardViewManager statusBarKeyguardViewManager, NotificationShadeWindowViewController notificationShadeWindowViewController, NotificationPanelViewController notificationPanel, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java index 347e05cc7f75c..a3563ac36f320 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java @@ -168,7 +168,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL private FlashlightController mFlashlightController; private PreviewInflater mPreviewInflater; private AccessibilityController mAccessibilityController; - private CentralSurfaces mCentralSurfaces; + private CentralSurfacesInt mCentralSurfaces; private KeyguardAffordanceHelper mAffordanceHelper; private FalsingManager mFalsingManager; private boolean mUserSetupComplete; @@ -472,7 +472,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL mRightAffordanceView.setContentDescription(state.contentDescription); } - public void setCentralSurfaces(CentralSurfaces centralSurfaces) { + public void setCentralSurfaces(CentralSurfacesInt centralSurfaces) { mCentralSurfaces = centralSurfaces; updateCameraVisibility(); // in case onFinishInflate() was called too early } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardEnvironmentImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardEnvironmentImpl.java index 2c4fc6c6f7349..1368bfc8f7bab 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardEnvironmentImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardEnvironmentImpl.java @@ -14,8 +14,8 @@ package com.android.systemui.statusbar.phone; -import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG; -import static com.android.systemui.statusbar.phone.CentralSurfaces.MULTIUSER_DEBUG; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.DEBUG; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.MULTIUSER_DEBUG; import android.service.notification.StatusBarNotification; import android.util.Log; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index adf70a255b4ff..6f1b0ef0b5cbe 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -1070,7 +1070,7 @@ public class NotificationPanelViewController extends PanelViewController { return mKeyguardStatusViewController.hasCustomClock(); } - private void setCentralSurfaces(CentralSurfaces centralSurfaces) { + private void setCentralSurfaces(CentralSurfacesInt centralSurfaces) { // TODO: this can be injected. mCentralSurfaces = centralSurfaces; mKeyguardBottomArea.setCentralSurfaces(mCentralSurfaces); @@ -3906,7 +3906,7 @@ public class NotificationPanelViewController extends PanelViewController { * @param hideExpandedRunnable a runnable to run when we need to hide the expanded panel. */ public void initDependencies( - CentralSurfaces centralSurfaces, + CentralSurfacesInt centralSurfaces, Runnable hideExpandedRunnable, NotificationShelfController notificationShelfController) { setCentralSurfaces(centralSurfaces); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java index 24660b261c519..285ddb3bb4d33 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java @@ -850,7 +850,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW Set mComponentsForcingTopUi = new HashSet<>(); /** - * The status bar state from {@link CentralSurfaces}. + * The status bar state from {@link CentralSurfacesInt}. */ int mStatusBarState; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java index 1e3a02b0606b9..195fe15980dab 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java @@ -58,7 +58,7 @@ import com.android.systemui.R; */ public class NotificationShadeWindowView extends FrameLayout { public static final String TAG = "NotificationShadeWindowView"; - public static final boolean DEBUG = CentralSurfaces.DEBUG; + public static final boolean DEBUG = CentralSurfacesInt.DEBUG; private int mRightInset = 0; private int mLeftInset = 0; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java index 2f11b16f93832..558368ba22db9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java @@ -82,7 +82,7 @@ public class NotificationShadeWindowViewController { private boolean mExpandAnimationRunning; private NotificationStackScrollLayout mStackScrollLayout; private PhoneStatusBarViewController mStatusBarViewController; - private final CentralSurfaces mService; + private final CentralSurfacesInt mService; private final NotificationShadeWindowController mNotificationShadeWindowController; private DragDownHelper mDragDownHelper; private boolean mDoubleTapEnabled; @@ -111,7 +111,7 @@ public class NotificationShadeWindowViewController { StatusBarWindowStateController statusBarWindowStateController, LockIconViewController lockIconViewController, Optional lowLightClockController, - CentralSurfaces centralSurfaces, + CentralSurfacesInt centralSurfaces, NotificationShadeWindowController controller, KeyguardUnlockAnimationController keyguardUnlockAnimationController, AmbientState ambientState) { @@ -252,7 +252,7 @@ public class NotificationShadeWindowViewController { } if (mStatusBarStateController.isDozing()) { - mService.mDozeScrimController.extendPulse(); + mService.extendDozePulse(); } mLockIconViewController.onTouchEvent( ev, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java index 45dc943de2f87..711582085d624 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -27,7 +27,7 @@ public abstract class PanelView extends FrameLayout { public static final String TAG = PanelView.class.getSimpleName(); private PanelViewController.TouchHandler mTouchHandler; - protected CentralSurfaces mCentralSurfaces; + protected CentralSurfacesInt mCentralSurfaces; protected HeadsUpManagerPhone mHeadsUpManager; protected KeyguardBottomAreaView mKeyguardBottomArea; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java index bdbc670d7335a..727ad796e7992 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java @@ -112,7 +112,7 @@ public abstract class PanelViewController { Log.v(TAG, (mViewName != null ? (mViewName + ": ") : "") + String.format(fmt, args)); } - protected CentralSurfaces mCentralSurfaces; + protected CentralSurfacesInt mCentralSurfaces; protected HeadsUpManagerPhone mHeadsUpManager; protected final StatusBarTouchableRegionManager mStatusBarTouchableRegionManager; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScreenOffAnimationController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScreenOffAnimationController.kt index c8174669cc653..392228cd26717 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScreenOffAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScreenOffAnimationController.kt @@ -37,7 +37,7 @@ class ScreenOffAnimationController @Inject constructor( private val animations: List = listOfNotNull(foldToAodAnimation, unlockedScreenOffAnimation) - fun initialize(centralSurfaces: CentralSurfaces, lightRevealScrim: LightRevealScrim) { + fun initialize(centralSurfaces: CentralSurfacesInt, lightRevealScrim: LightRevealScrim) { animations.forEach { it.initialize(centralSurfaces, lightRevealScrim) } wakefulnessLifecycle.addObserver(this) } @@ -197,7 +197,7 @@ class ScreenOffAnimationController @Inject constructor( } interface ScreenOffAnimation { - fun initialize(centralSurfaces: CentralSurfaces, lightRevealScrim: LightRevealScrim) {} + fun initialize(centralSurfaces: CentralSurfacesInt, lightRevealScrim: LightRevealScrim) {} /** * Called when started going to sleep, should return true if the animation will be played diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java index f9e17da9773f5..72c0b9a37d297 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -437,7 +437,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump } if (mKeyguardUpdateMonitor.needsSlowUnlockTransition() && mState == ScrimState.UNLOCKED) { - mAnimationDelay = CentralSurfaces.FADE_KEYGUARD_START_DELAY; + mAnimationDelay = CentralSurfacesInt.FADE_KEYGUARD_START_DELAY; scheduleUpdate(); } else if (((oldState == ScrimState.AOD || oldState == ScrimState.PULSING) // leaving doze && (!mDozeParameters.getAlwaysOn() || mState == ScrimState.UNLOCKED)) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java index 47b705845fceb..27fde94f6b9b1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java @@ -238,7 +238,7 @@ public enum ScrimState { mAnimationDuration = mKeyguardFadingAway ? mKeyguardFadingAwayDuration - : CentralSurfaces.FADE_KEYGUARD_DURATION; + : CentralSurfacesInt.FADE_KEYGUARD_DURATION; boolean fromAod = previousState == AOD || previousState == PULSING; mAnimateChange = !mLaunchingAffordanceWithPreview && !fromAod; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeController.java index 83ee125f84c27..705360ceb0ade 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeController.java @@ -18,7 +18,7 @@ import com.android.systemui.statusbar.StatusBarState; /** * {@link ShadeController} is an abstraction of the work that used to be hard-coded in - * {@link CentralSurfaces}. The shade itself represents the concept of the status bar window state, + * {@link CentralSurfacesInt}. The shade itself represents the concept of the status bar window state, * and can be in multiple states: dozing, locked, showing the bouncer, occluded, etc. All/some of * these are coordinated with {@link StatusBarKeyguardViewManager} via * {@link com.android.systemui.keyguard.KeyguardViewMediator} and others. @@ -38,7 +38,7 @@ public interface ShadeController { /** * Collapse the shade animated, showing the bouncer when on {@link StatusBarState#KEYGUARD} or - * dismissing {@link CentralSurfaces} when on {@link StatusBarState#SHADE}. + * dismissing {@link CentralSurfacesInt} when on {@link StatusBarState#SHADE}. */ void animateCollapsePanels(int flags, boolean force); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeControllerImpl.java index cee8b335f380d..ce33c57c8f751 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeControllerImpl.java @@ -47,7 +47,7 @@ public class ShadeControllerImpl implements ShadeController { protected final NotificationShadeWindowController mNotificationShadeWindowController; private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private final int mDisplayId; - protected final Lazy> mCentralSurfacesOptionalLazy; + protected final Lazy> mCentralSurfacesOptionalLazy; private final Lazy mAssistManagerLazy; private final ArrayList mPostCollapseRunnables = new ArrayList<>(); @@ -59,7 +59,7 @@ public class ShadeControllerImpl implements ShadeController { NotificationShadeWindowController notificationShadeWindowController, StatusBarKeyguardViewManager statusBarKeyguardViewManager, WindowManager windowManager, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, Lazy assistManagerLazy ) { mCommandQueue = commandQueue; @@ -208,7 +208,7 @@ public class ShadeControllerImpl implements ShadeController { } } - private CentralSurfaces getCentralSurfaces() { + private CentralSurfacesInt getCentralSurfaces() { return mCentralSurfacesOptionalLazy.get().get(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeadsUpChangeListener.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeadsUpChangeListener.java index 50f21691b0447..10a21426ff210 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeadsUpChangeListener.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeadsUpChangeListener.java @@ -29,7 +29,7 @@ import com.android.systemui.statusbar.window.StatusBarWindowController; import javax.inject.Inject; /** - * Ties the {@link CentralSurfaces} to {@link com.android.systemui.statusbar.policy.HeadsUpManager}. + * Ties the {@link CentralSurfacesInt} to {@link com.android.systemui.statusbar.policy.HeadsUpManager}. */ @CentralSurfacesComponent.CentralSurfacesScope public class StatusBarHeadsUpChangeListener implements OnHeadsUpChangedListener { 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 052a4f7c5f7cf..77eacb67b5d0a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -187,7 +187,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb protected LockPatternUtils mLockPatternUtils; protected ViewMediatorCallback mViewMediatorCallback; - protected CentralSurfaces mCentralSurfaces; + protected CentralSurfacesInt mCentralSurfaces; private NotificationPanelViewController mNotificationPanelViewController; private BiometricUnlockController mBiometricUnlockController; @@ -289,7 +289,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } @Override - public void registerCentralSurfaces(CentralSurfaces centralSurfaces, + public void registerCentralSurfaces(CentralSurfacesInt centralSurfaces, NotificationPanelViewController notificationPanelViewController, PanelExpansionStateManager panelExpansionStateManager, BiometricUnlockController biometricUnlockController, @@ -667,7 +667,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } /** - * If {@link CentralSurfaces} is pulsing. + * If {@link CentralSurfacesInt} is pulsing. */ public void setPulsing(boolean pulsing) { if (mPulsing != pulsing) { 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 56b6dfc42ee35..a44d08afc3d29 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt @@ -10,7 +10,7 @@ import com.android.systemui.animation.LaunchAnimator */ class StatusBarLaunchAnimatorController( private val delegate: ActivityLaunchAnimator.Controller, - private val centralSurfaces: CentralSurfaces, + private val centralSurfaces: CentralSurfacesInt, 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 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 87ca942edff2c..bddc2df3fb619 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java @@ -18,7 +18,7 @@ package com.android.systemui.statusbar.phone; import static android.service.notification.NotificationListenerService.REASON_CLICK; -import static com.android.systemui.statusbar.phone.CentralSurfaces.getActivityOptions; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.getActivityOptions; import android.app.ActivityManager; import android.app.KeyguardManager; @@ -125,7 +125,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte private final MetricsLogger mMetricsLogger; private final StatusBarNotificationActivityStarterLogger mLogger; - private final CentralSurfaces mCentralSurfaces; + private final CentralSurfacesInt mCentralSurfaces; private final NotificationPresenter mPresenter; private final NotificationPanelViewController mNotificationPanel; private final ActivityLaunchAnimator mActivityLaunchAnimator; @@ -166,7 +166,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte MetricsLogger metricsLogger, StatusBarNotificationActivityStarterLogger logger, OnUserInteractionCallback onUserInteractionCallback, - CentralSurfaces centralSurfaces, + CentralSurfacesInt centralSurfaces, NotificationPresenter presenter, NotificationPanelViewController panel, ActivityLaunchAnimator activityLaunchAnimator, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java index aa061d74f6c6b..ddde1fc192aed 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java @@ -14,9 +14,9 @@ package com.android.systemui.statusbar.phone; -import static com.android.systemui.statusbar.phone.CentralSurfaces.CLOSE_PANEL_WHEN_EMPTIED; -import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG; -import static com.android.systemui.statusbar.phone.CentralSurfaces.MULTIUSER_DEBUG; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.CLOSE_PANEL_WHEN_EMPTIED; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.DEBUG; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.MULTIUSER_DEBUG; import android.app.KeyguardManager; import android.content.Context; @@ -104,7 +104,7 @@ class StatusBarNotificationPresenter implements NotificationPresenter, private final DozeScrimController mDozeScrimController; private final ScrimController mScrimController; private final KeyguardIndicationController mKeyguardIndicationController; - private final CentralSurfaces mCentralSurfaces; + private final CentralSurfacesInt mCentralSurfaces; private final ShadeController mShadeController; private final LockscreenShadeTransitionController mShadeTransitionController; private final CommandQueue mCommandQueue; @@ -135,7 +135,7 @@ class StatusBarNotificationPresenter implements NotificationPresenter, DynamicPrivacyController dynamicPrivacyController, KeyguardStateController keyguardStateController, KeyguardIndicationController keyguardIndicationController, - CentralSurfaces centralSurfaces, + CentralSurfacesInt centralSurfaces, ShadeController shadeController, LockscreenShadeTransitionController shadeTransitionController, CommandQueue commandQueue, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java index 4e9090080c991..203f25efdeb24 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java @@ -58,7 +58,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable { private boolean mIsStatusBarExpanded = false; private boolean mShouldAdjustInsets = false; - private CentralSurfaces mCentralSurfaces; + private CentralSurfacesInt mCentralSurfaces; private View mNotificationShadeWindowView; private View mNotificationPanelView; private boolean mForceCollapsedUntilLayout = false; @@ -118,7 +118,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable { } protected void setup( - @NonNull CentralSurfaces centralSurfaces, + @NonNull CentralSurfacesInt centralSurfaces, @NonNull View notificationShadeWindowView) { mCentralSurfaces = centralSurfaces; mNotificationShadeWindowView = notificationShadeWindowView; 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 935f87dc82218..fa7e7c932b2f9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt @@ -60,7 +60,7 @@ class UnlockedScreenOffAnimationController @Inject constructor( private val powerManager: PowerManager, private val handler: Handler = Handler() ) : WakefulnessLifecycle.Observer, ScreenOffAnimation { - private lateinit var mCentralSurfaces: CentralSurfaces + private lateinit var mCentralSurfaces: CentralSurfacesInt /** * Whether or not [initialize] has been called to provide us with the StatusBar, * NotificationPanelViewController, and LightRevealSrim so that we can run the unlocked screen @@ -122,7 +122,7 @@ class UnlockedScreenOffAnimationController @Inject constructor( } override fun initialize( - centralSurfaces: CentralSurfaces, + centralSurfaces: CentralSurfacesInt, lightRevealScrim: LightRevealScrim ) { this.initialized = true diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java index 5d38eea157230..c5e5297ae6ba5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java @@ -31,6 +31,7 @@ import com.android.systemui.statusbar.notification.stack.NotificationListContain import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutListContainerModule; import com.android.systemui.statusbar.phone.CentralSurfacesCommandQueueCallbacks; +import com.android.systemui.statusbar.phone.CentralSurfacesImpl; import com.android.systemui.statusbar.phone.LargeScreenShadeHeaderController; import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.NotificationShadeWindowView; @@ -51,7 +52,7 @@ import dagger.Subcomponent; /** * Dagger subcomponent for classes (semi-)related to the status bar. The component is created once - * inside {@link com.android.systemui.statusbar.phone.CentralSurfaces} and never re-created. + * inside {@link CentralSurfacesImpl} and never re-created. * * TODO(b/197137564): This should likely be re-factored a bit. It includes classes that aren't * directly related to status bar functionality, like multiple notification classes. And, the fact diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java index c024c7245c450..6af94f374aa3a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java @@ -16,317 +16,22 @@ package com.android.systemui.statusbar.phone.dagger; -import static com.android.systemui.Dependency.TIME_TICK_HANDLER_NAME; - -import android.app.WallpaperManager; -import android.content.Context; -import android.hardware.devicestate.DeviceStateManager; -import android.os.Handler; -import android.os.PowerManager; -import android.util.DisplayMetrics; - -import com.android.internal.jank.InteractionJankMonitor; -import com.android.internal.logging.MetricsLogger; -import com.android.keyguard.KeyguardUpdateMonitor; -import com.android.keyguard.ViewMediatorCallback; -import com.android.systemui.InitController; -import com.android.systemui.accessibility.floatingmenu.AccessibilityFloatingMenuController; -import com.android.systemui.animation.ActivityLaunchAnimator; -import com.android.systemui.assist.AssistManager; -import com.android.systemui.broadcast.BroadcastDispatcher; -import com.android.systemui.classifier.FalsingCollector; -import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.dagger.SysUISingleton; -import com.android.systemui.dagger.qualifiers.Main; -import com.android.systemui.dagger.qualifiers.UiBackground; -import com.android.systemui.demomode.DemoModeController; -import com.android.systemui.dreams.DreamOverlayStateController; -import com.android.systemui.flags.FeatureFlags; -import com.android.systemui.fragments.FragmentService; -import com.android.systemui.keyguard.KeyguardUnlockAnimationController; -import com.android.systemui.keyguard.KeyguardViewMediator; -import com.android.systemui.keyguard.ScreenLifecycle; -import com.android.systemui.keyguard.WakefulnessLifecycle; -import com.android.systemui.navigationbar.NavigationBarController; -import com.android.systemui.plugins.FalsingManager; -import com.android.systemui.plugins.PluginDependencyProvider; -import com.android.systemui.recents.ScreenPinningRequest; -import com.android.systemui.settings.brightness.BrightnessSliderController; -import com.android.systemui.shared.plugins.PluginManager; -import com.android.systemui.statusbar.CommandQueue; -import com.android.systemui.statusbar.KeyguardIndicationController; -import com.android.systemui.statusbar.LockscreenShadeTransitionController; -import com.android.systemui.statusbar.NotificationLockscreenUserManager; -import com.android.systemui.statusbar.NotificationMediaManager; -import com.android.systemui.statusbar.NotificationRemoteInputManager; -import com.android.systemui.statusbar.NotificationShadeDepthController; -import com.android.systemui.statusbar.NotificationShadeWindowController; -import com.android.systemui.statusbar.NotificationViewHierarchyManager; -import com.android.systemui.statusbar.PulseExpansionHandler; -import com.android.systemui.statusbar.SysuiStatusBarStateController; -import com.android.systemui.statusbar.charging.WiredChargingRippleController; -import com.android.systemui.statusbar.connectivity.NetworkController; -import com.android.systemui.statusbar.notification.DynamicPrivacyController; -import com.android.systemui.statusbar.notification.NotifPipelineFlags; -import com.android.systemui.statusbar.notification.NotificationEntryManager; -import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator; -import com.android.systemui.statusbar.notification.collection.legacy.VisualStabilityManager; -import com.android.systemui.statusbar.notification.collection.render.NotifShadeEventSource; -import com.android.systemui.statusbar.notification.init.NotificationsController; -import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider; -import com.android.systemui.statusbar.notification.logging.NotificationLogger; -import com.android.systemui.statusbar.notification.row.NotificationGutsManager; -import com.android.systemui.statusbar.phone.AutoHideController; -import com.android.systemui.statusbar.phone.BiometricUnlockController; -import com.android.systemui.statusbar.phone.DozeParameters; -import com.android.systemui.statusbar.phone.DozeScrimController; -import com.android.systemui.statusbar.phone.DozeServiceHost; -import com.android.systemui.statusbar.phone.HeadsUpManagerPhone; -import com.android.systemui.statusbar.phone.KeyguardBypassController; -import com.android.systemui.statusbar.phone.KeyguardDismissUtil; -import com.android.systemui.statusbar.phone.LightBarController; -import com.android.systemui.statusbar.phone.LockscreenGestureLogger; -import com.android.systemui.statusbar.phone.LockscreenWallpaper; -import com.android.systemui.statusbar.phone.NotificationIconAreaController; -import com.android.systemui.statusbar.phone.PhoneStatusBarPolicy; -import com.android.systemui.statusbar.phone.ScreenOffAnimationController; -import com.android.systemui.statusbar.phone.ScrimController; -import com.android.systemui.statusbar.phone.ShadeController; -import com.android.systemui.statusbar.phone.CentralSurfaces; -import com.android.systemui.statusbar.phone.StatusBarHideIconsForBouncerManager; -import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; -import com.android.systemui.statusbar.phone.StatusBarSignalPolicy; -import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager; -import com.android.systemui.statusbar.phone.ongoingcall.OngoingCallController; -import com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManager; -import com.android.systemui.statusbar.policy.BatteryController; -import com.android.systemui.statusbar.policy.ConfigurationController; -import com.android.systemui.statusbar.policy.DeviceProvisionedController; -import com.android.systemui.statusbar.policy.ExtensionController; -import com.android.systemui.statusbar.policy.KeyguardStateController; -import com.android.systemui.statusbar.policy.UserInfoControllerImpl; -import com.android.systemui.statusbar.policy.UserSwitcherController; -import com.android.systemui.statusbar.window.StatusBarWindowController; -import com.android.systemui.statusbar.window.StatusBarWindowStateController; -import com.android.systemui.util.WallpaperController; -import com.android.systemui.util.concurrency.DelayableExecutor; -import com.android.systemui.util.concurrency.MessageRouter; -import com.android.systemui.volume.VolumeComponent; -import com.android.systemui.wmshell.BubblesManager; -import com.android.wm.shell.bubbles.Bubbles; -import com.android.wm.shell.startingsurface.StartingSurface; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfacesImpl; -import java.util.Optional; -import java.util.concurrent.Executor; - -import javax.inject.Named; - -import dagger.Lazy; +import dagger.Binds; import dagger.Module; -import dagger.Provides; /** - * Dagger Module providing {@link CentralSurfaces}. + * Dagger Module providing {@link CentralSurfacesImpl}. */ @Module public interface StatusBarPhoneModule { /** * Provides our instance of CentralSurfaces which is considered optional. */ - @Provides + @Binds @SysUISingleton - static CentralSurfaces provideCentralSurfaces( - Context context, - NotificationsController notificationsController, - FragmentService fragmentService, - LightBarController lightBarController, - AutoHideController autoHideController, - StatusBarWindowController statusBarWindowController, - StatusBarWindowStateController statusBarWindowStateController, - KeyguardUpdateMonitor keyguardUpdateMonitor, - StatusBarSignalPolicy statusBarSignalPolicy, - PulseExpansionHandler pulseExpansionHandler, - NotificationWakeUpCoordinator notificationWakeUpCoordinator, - KeyguardBypassController keyguardBypassController, - KeyguardStateController keyguardStateController, - HeadsUpManagerPhone headsUpManagerPhone, - DynamicPrivacyController dynamicPrivacyController, - FalsingManager falsingManager, - FalsingCollector falsingCollector, - BroadcastDispatcher broadcastDispatcher, - NotifShadeEventSource notifShadeEventSource, - NotificationEntryManager notificationEntryManager, - NotificationGutsManager notificationGutsManager, - NotificationLogger notificationLogger, - NotificationInterruptStateProvider notificationInterruptStateProvider, - NotificationViewHierarchyManager notificationViewHierarchyManager, - PanelExpansionStateManager panelExpansionStateManager, - KeyguardViewMediator keyguardViewMediator, - DisplayMetrics displayMetrics, - MetricsLogger metricsLogger, - @UiBackground Executor uiBgExecutor, - NotificationMediaManager notificationMediaManager, - NotificationLockscreenUserManager lockScreenUserManager, - NotificationRemoteInputManager remoteInputManager, - UserSwitcherController userSwitcherController, - NetworkController networkController, - BatteryController batteryController, - SysuiColorExtractor colorExtractor, - ScreenLifecycle screenLifecycle, - WakefulnessLifecycle wakefulnessLifecycle, - SysuiStatusBarStateController statusBarStateController, - Optional bubblesManagerOptional, - Optional bubblesOptional, - VisualStabilityManager visualStabilityManager, - DeviceProvisionedController deviceProvisionedController, - NavigationBarController navigationBarController, - AccessibilityFloatingMenuController accessibilityFloatingMenuController, - Lazy assistManagerLazy, - ConfigurationController configurationController, - NotificationShadeWindowController notificationShadeWindowController, - DozeParameters dozeParameters, - ScrimController scrimController, - Lazy lockscreenWallpaperLazy, - LockscreenGestureLogger lockscreenGestureLogger, - Lazy biometricUnlockControllerLazy, - DozeServiceHost dozeServiceHost, - PowerManager powerManager, - ScreenPinningRequest screenPinningRequest, - DozeScrimController dozeScrimController, - VolumeComponent volumeComponent, - CommandQueue commandQueue, - CentralSurfacesComponent.Factory statusBarComponentFactory, - PluginManager pluginManager, - ShadeController shadeController, - StatusBarKeyguardViewManager statusBarKeyguardViewManager, - ViewMediatorCallback viewMediatorCallback, - InitController initController, - @Named(TIME_TICK_HANDLER_NAME) Handler timeTickHandler, - PluginDependencyProvider pluginDependencyProvider, - KeyguardDismissUtil keyguardDismissUtil, - ExtensionController extensionController, - UserInfoControllerImpl userInfoControllerImpl, - PhoneStatusBarPolicy phoneStatusBarPolicy, - KeyguardIndicationController keyguardIndicationController, - DemoModeController demoModeController, - Lazy notificationShadeDepthController, - StatusBarTouchableRegionManager statusBarTouchableRegionManager, - NotificationIconAreaController notificationIconAreaController, - BrightnessSliderController.Factory brightnessSliderFactory, - ScreenOffAnimationController screenOffAnimationController, - WallpaperController wallpaperController, - OngoingCallController ongoingCallController, - StatusBarHideIconsForBouncerManager statusBarHideIconsForBouncerManager, - LockscreenShadeTransitionController transitionController, - FeatureFlags featureFlags, - KeyguardUnlockAnimationController keyguardUnlockAnimationController, - @Main Handler mainHandler, - @Main DelayableExecutor delayableExecutor, - @Main MessageRouter messageRouter, - WallpaperManager wallpaperManager, - Optional startingSurfaceOptional, - ActivityLaunchAnimator activityLaunchAnimator, - NotifPipelineFlags notifPipelineFlags, - InteractionJankMonitor jankMonitor, - DeviceStateManager deviceStateManager, - DreamOverlayStateController dreamOverlayStateController, - WiredChargingRippleController wiredChargingRippleController) { - return new CentralSurfaces( - context, - notificationsController, - fragmentService, - lightBarController, - autoHideController, - statusBarWindowController, - statusBarWindowStateController, - keyguardUpdateMonitor, - statusBarSignalPolicy, - pulseExpansionHandler, - notificationWakeUpCoordinator, - keyguardBypassController, - keyguardStateController, - headsUpManagerPhone, - dynamicPrivacyController, - falsingManager, - falsingCollector, - broadcastDispatcher, - notifShadeEventSource, - notificationEntryManager, - notificationGutsManager, - notificationLogger, - notificationInterruptStateProvider, - notificationViewHierarchyManager, - panelExpansionStateManager, - keyguardViewMediator, - displayMetrics, - metricsLogger, - uiBgExecutor, - notificationMediaManager, - lockScreenUserManager, - remoteInputManager, - userSwitcherController, - networkController, - batteryController, - colorExtractor, - screenLifecycle, - wakefulnessLifecycle, - statusBarStateController, - bubblesManagerOptional, - bubblesOptional, - visualStabilityManager, - deviceProvisionedController, - navigationBarController, - accessibilityFloatingMenuController, - assistManagerLazy, - configurationController, - notificationShadeWindowController, - dozeParameters, - scrimController, - lockscreenWallpaperLazy, - lockscreenGestureLogger, - biometricUnlockControllerLazy, - dozeServiceHost, - powerManager, - screenPinningRequest, - dozeScrimController, - volumeComponent, - commandQueue, - statusBarComponentFactory, - pluginManager, - shadeController, - statusBarKeyguardViewManager, - viewMediatorCallback, - initController, - timeTickHandler, - pluginDependencyProvider, - keyguardDismissUtil, - extensionController, - userInfoControllerImpl, - phoneStatusBarPolicy, - keyguardIndicationController, - demoModeController, - notificationShadeDepthController, - statusBarTouchableRegionManager, - notificationIconAreaController, - brightnessSliderFactory, - screenOffAnimationController, - wallpaperController, - ongoingCallController, - statusBarHideIconsForBouncerManager, - transitionController, - featureFlags, - keyguardUnlockAnimationController, - mainHandler, - delayableExecutor, - messageRouter, - wallpaperManager, - startingSurfaceOptional, - activityLaunchAnimator, - notifPipelineFlags, - jankMonitor, - deviceStateManager, - dreamOverlayStateController, - wiredChargingRippleController - ); - } + CentralSurfacesInt bindsCentralSurfaces(CentralSurfacesImpl impl); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/dagger/StatusBarFragmentComponent.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/dagger/StatusBarFragmentComponent.java index 2eba325ff63d8..6717bc768fbba 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/dagger/StatusBarFragmentComponent.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/dagger/StatusBarFragmentComponent.java @@ -18,14 +18,12 @@ package com.android.systemui.statusbar.phone.fragment.dagger; import com.android.systemui.battery.BatteryMeterViewController; import com.android.systemui.dagger.qualifiers.RootView; -import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.HeadsUpAppearanceController; import com.android.systemui.statusbar.phone.LightsOutNotifController; import com.android.systemui.statusbar.phone.PhoneStatusBarTransitions; import com.android.systemui.statusbar.phone.PhoneStatusBarView; import com.android.systemui.statusbar.phone.PhoneStatusBarViewController; import com.android.systemui.statusbar.phone.StatusBarDemoMode; -import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent; import com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment; import dagger.BindsInstance; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowStateController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowStateController.kt index 60f6df66cb5a0..2c5251f22d613 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowStateController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowStateController.kt @@ -25,7 +25,7 @@ import android.util.Log import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.DisplayId import com.android.systemui.statusbar.CommandQueue -import com.android.systemui.statusbar.phone.CentralSurfaces +import com.android.systemui.statusbar.phone.CentralSurfacesInt import javax.inject.Inject /** @@ -80,8 +80,8 @@ class StatusBarWindowStateController @Inject constructor( } windowState = state - if (CentralSurfaces.DEBUG_WINDOW_STATE) { - Log.d(CentralSurfaces.TAG, "Status bar " + windowStateToString(state)) + if (CentralSurfacesInt.DEBUG_WINDOW_STATE) { + Log.d(CentralSurfacesInt.TAG, "Status bar " + windowStateToString(state)) } listeners.forEach { it.onStatusBarWindowStateChanged(state) } } diff --git a/packages/SystemUI/src/com/android/systemui/unfold/FoldAodAnimationController.kt b/packages/SystemUI/src/com/android/systemui/unfold/FoldAodAnimationController.kt index d6dfceac7a63a..010da87083ce2 100644 --- a/packages/SystemUI/src/com/android/systemui/unfold/FoldAodAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/unfold/FoldAodAnimationController.kt @@ -26,7 +26,7 @@ import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.keyguard.WakefulnessLifecycle import com.android.systemui.statusbar.LightRevealScrim import com.android.systemui.statusbar.phone.ScreenOffAnimation -import com.android.systemui.statusbar.phone.CentralSurfaces +import com.android.systemui.statusbar.phone.CentralSurfacesInt import com.android.systemui.statusbar.policy.CallbackController import com.android.systemui.unfold.FoldAodAnimationController.FoldAodAnimationStatus import com.android.systemui.util.settings.GlobalSettings @@ -50,7 +50,7 @@ constructor( private val globalSettings: GlobalSettings ) : CallbackController, ScreenOffAnimation, WakefulnessLifecycle.Observer { - private lateinit var mCentralSurfaces: CentralSurfaces + private lateinit var mCentralSurfaces: CentralSurfacesInt private var isFolded = false private var isFoldHandled = true @@ -72,7 +72,7 @@ constructor( } } - override fun initialize(centralSurfaces: CentralSurfaces, lightRevealScrim: LightRevealScrim) { + override fun initialize(centralSurfaces: CentralSurfacesInt, lightRevealScrim: LightRevealScrim) { this.mCentralSurfaces = centralSurfaces deviceStateManager.registerCallback(executor, FoldListener()) diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt index 7f8656c1ecbc7..842d7eeb42d1f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt @@ -32,7 +32,7 @@ import com.android.systemui.statusbar.NotificationShadeWindowController import com.android.systemui.statusbar.commandline.CommandRegistry import com.android.systemui.statusbar.phone.BiometricUnlockController import com.android.systemui.statusbar.phone.KeyguardBypassController -import com.android.systemui.statusbar.phone.CentralSurfaces +import com.android.systemui.statusbar.phone.CentralSurfacesInt import com.android.systemui.statusbar.policy.ConfigurationController import com.android.systemui.statusbar.policy.KeyguardStateController import com.android.systemui.util.leak.RotationUtils @@ -61,7 +61,7 @@ class AuthRippleControllerTest : SysuiTestCase() { private lateinit var staticMockSession: MockitoSession private lateinit var controller: AuthRippleController - @Mock private lateinit var mCentralSurfaces: CentralSurfaces + @Mock private lateinit var mCentralSurfaces: CentralSurfacesInt @Mock private lateinit var rippleView: AuthRippleView @Mock private lateinit var commandRegistry: CommandRegistry @Mock private lateinit var configurationController: ConfigurationController diff --git a/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java index 442e41c9b8d3d..8d27916dea507 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java @@ -43,7 +43,7 @@ import com.android.internal.logging.UiEventLogger; import com.android.systemui.SysuiTestCase; import com.android.systemui.shared.system.InputChannelCompat; import com.android.systemui.statusbar.NotificationShadeWindowController; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.KeyguardBouncer; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.panelstate.PanelExpansionChangeEvent; @@ -66,7 +66,7 @@ public class BouncerSwipeTouchHandlerTest extends SysuiTestCase { StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; @Mock - CentralSurfaces mCentralSurfaces; + CentralSurfacesInt mCentralSurfaces; @Mock NotificationShadeWindowController mNotificationShadeWindowController; diff --git a/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java b/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java index f00fbe6ac4d7b..ee59ccb371d9b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java @@ -60,7 +60,7 @@ import com.android.systemui.plugins.GlobalActions; import com.android.systemui.settings.UserContextProvider; import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.VibratorHelper; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.telephony.TelephonyListenerManager; @@ -113,7 +113,7 @@ public class GlobalActionsDialogLiteTest extends SysuiTestCase { @Mock private Handler mHandler; @Mock private UserContextProvider mUserContextProvider; @Mock private VibratorHelper mVibratorHelper; - @Mock private CentralSurfaces mCentralSurfaces; + @Mock private CentralSurfacesInt mCentralSurfaces; @Mock private KeyguardUpdateMonitor mKeyguardUpdateMonitor; @Mock private DialogLaunchAnimator mDialogLaunchAnimator; 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 edcf4791e6b18..0dd8d9b7fd91f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java @@ -47,7 +47,7 @@ import com.android.systemui.assist.AssistManager; import com.android.systemui.dump.DumpManager; import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.settings.UserTracker; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import org.junit.Before; import org.junit.Test; @@ -112,7 +112,7 @@ public class NavBarHelperTest extends SysuiTestCase { mNavBarHelper = new NavBarHelper(mContext, mAccessibilityManager, mAccessibilityButtonModeObserver, mAccessibilityButtonTargetObserver, mSystemActions, mOverviewProxyService, mAssistManagerLazy, - () -> Optional.of(mock(CentralSurfaces.class)), + () -> Optional.of(mock(CentralSurfacesInt.class)), mNavigationModeController, mUserTracker, mDumpManager); } 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 4a740f6c55710..b3dd5685d70b8 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java @@ -91,7 +91,7 @@ import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.phone.AutoHideController; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.LightBarController; import com.android.systemui.statusbar.phone.LightBarTransitionsController; import com.android.systemui.statusbar.phone.NotificationShadeWindowView; @@ -186,7 +186,7 @@ public class NavigationBarTest extends SysuiTestCase { @Mock private DeadZone mDeadZone; @Mock - private CentralSurfaces mCentralSurfaces; + private CentralSurfacesInt mCentralSurfaces; private DeviceConfigProxyFake mDeviceConfigProxyFake = new DeviceConfigProxyFake(); @Rule diff --git a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java index 91f8a403f3b59..e1b9e09f0313e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java @@ -48,7 +48,7 @@ import com.android.systemui.SysuiTestCase; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.power.PowerUI.WarningsUI; import com.android.systemui.statusbar.CommandQueue; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import org.junit.Before; import org.junit.Test; @@ -89,8 +89,8 @@ public class PowerUITest extends SysuiTestCase { private IThermalEventListener mSkinThermalEventListener; @Mock private BroadcastDispatcher mBroadcastDispatcher; @Mock private CommandQueue mCommandQueue; - @Mock private Lazy> mCentralSurfacesOptionalLazy; - @Mock private CentralSurfaces mCentralSurfaces; + @Mock private Lazy> mCentralSurfacesOptionalLazy; + @Mock private CentralSurfacesInt mCentralSurfaces; @Before public void setup() { diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java index a518b808688e4..465f1a0533065 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java @@ -62,7 +62,7 @@ import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.phone.AutoTileManager; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.policy.ConfigurationController; @@ -135,7 +135,7 @@ public class QSFragmentTest extends SysuiBaseFragmentTest { () -> mock(AutoTileManager.class), mock(DumpManager.class), mock(BroadcastDispatcher.class), - Optional.of(mock(CentralSurfaces.class)), + Optional.of(mock(CentralSurfacesInt.class)), mock(QSLogger.class), mock(UiEventLogger.class), mock(UserTracker.class), diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java index 8cf3fe274848e..b1b959dbe78e7 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java @@ -65,7 +65,7 @@ import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.statusbar.phone.AutoTileManager; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.tuner.TunerService; import com.android.systemui.util.settings.FakeSettings; @@ -111,7 +111,7 @@ public class QSTileHostTest extends SysuiTestCase { @Mock private QSTile.State mMockState; @Mock - private CentralSurfaces mCentralSurfaces; + private CentralSurfacesInt mCentralSurfaces; @Mock private QSLogger mQSLogger; @Mock @@ -436,7 +436,7 @@ public class QSTileHostTest extends SysuiTestCase { QSFactory defaultFactory, Handler mainHandler, Looper bgLooper, PluginManager pluginManager, TunerService tunerService, Provider autoTiles, DumpManager dumpManager, - BroadcastDispatcher broadcastDispatcher, CentralSurfaces centralSurfaces, + BroadcastDispatcher broadcastDispatcher, CentralSurfacesInt centralSurfaces, QSLogger qsLogger, UiEventLogger uiEventLogger, UserTracker userTracker, SecureSettings secureSettings, CustomTileStatePersister customTileStatePersister, TileServiceRequestController.Builder tileServiceRequestControllerBuilder, diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java index 6b7e5b9335f21..410055e31b43f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java @@ -48,7 +48,7 @@ import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.phone.AutoTileManager; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.policy.BluetoothController; import com.android.systemui.statusbar.policy.KeyguardStateController; @@ -97,7 +97,7 @@ public class TileServicesTest extends SysuiTestCase { @Mock private DumpManager mDumpManager; @Mock - private CentralSurfaces mCentralSurfaces; + private CentralSurfacesInt mCentralSurfaces; @Mock private QSLogger mQSLogger; @Mock diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ActionProxyReceiverTest.java b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ActionProxyReceiverTest.java index 7ab49584f0e39..65da7198b2826 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ActionProxyReceiverTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ActionProxyReceiverTest.java @@ -19,7 +19,7 @@ package com.android.systemui.screenshot; import static com.android.systemui.screenshot.ScreenshotController.ACTION_TYPE_SHARE; import static com.android.systemui.screenshot.ScreenshotController.EXTRA_ID; import static com.android.systemui.screenshot.ScreenshotController.EXTRA_SMART_ACTIONS_ENABLED; -import static com.android.systemui.statusbar.phone.CentralSurfaces.SYSTEM_DIALOG_REASON_SCREENSHOT; +import static com.android.systemui.statusbar.phone.CentralSurfacesInt.SYSTEM_DIALOG_REASON_SCREENSHOT; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; @@ -41,7 +41,7 @@ import androidx.test.filters.SmallTest; import com.android.systemui.SysuiTestCase; import com.android.systemui.shared.system.ActivityManagerWrapper; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import org.junit.Before; import org.junit.Test; @@ -59,7 +59,7 @@ import java.util.concurrent.TimeoutException; public class ActionProxyReceiverTest extends SysuiTestCase { @Mock - private CentralSurfaces mMockCentralSurfaces; + private CentralSurfacesInt mMockCentralSurfaces; @Mock private ActivityManagerWrapper mMockActivityManagerWrapper; @Mock diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt index 562c970178622..1014a734787f5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt @@ -19,7 +19,7 @@ import com.android.systemui.statusbar.notification.row.NotificationTestHelper import com.android.systemui.statusbar.notification.stack.AmbientState import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController -import com.android.systemui.statusbar.phone.CentralSurfaces +import com.android.systemui.statusbar.phone.CentralSurfacesInt import com.android.systemui.statusbar.phone.KeyguardBypassController import com.android.systemui.statusbar.phone.LSShadeTransitionLogger import com.android.systemui.statusbar.phone.NotificationPanelViewController @@ -74,7 +74,7 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() { @Mock lateinit var depthController: NotificationShadeDepthController @Mock lateinit var stackscroller: NotificationStackScrollLayout @Mock lateinit var expandHelperCallback: ExpandHelper.Callback - @Mock lateinit var mCentralSurfaces: CentralSurfaces + @Mock lateinit var mCentralSurfaces: CentralSurfacesInt @Mock lateinit var qS: QS @Mock lateinit var singleShadeOverScroller: SingleShadeLockScreenOverScroller @Mock lateinit var splitShadeOverScroller: SplitShadeLockScreenOverScroller diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java index 2691ff98f4ee4..2073744438e6b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java @@ -49,7 +49,7 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.google.android.collect.Sets; @@ -105,7 +105,7 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase { mVisibilityProvider, mEntryManager, mock(RemoteInputNotificationRebuilder.class), - () -> Optional.of(mock(CentralSurfaces.class)), + () -> Optional.of(mock(CentralSurfacesInt.class)), mStateController, Handler.createAsync(Looper.myLooper()), mRemoteInputUriController, @@ -196,7 +196,7 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase { NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, RemoteInputNotificationRebuilder rebuilder, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, StatusBarStateController statusBarStateController, Handler mainHandler, RemoteInputUriController remoteInputUriController, diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java index 3500e4d5f7012..3e466dd9732b0 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java @@ -45,7 +45,7 @@ import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.policy.RemoteInputUriController; import org.junit.Before; @@ -103,7 +103,7 @@ public class SmartReplyControllerTest extends SysuiTestCase { mVisibilityProvider, mNotificationEntryManager, new RemoteInputNotificationRebuilder(mContext), - () -> Optional.of(mock(CentralSurfaces.class)), + () -> Optional.of(mock(CentralSurfacesInt.class)), mStatusBarStateController, Handler.createAsync(Looper.myLooper()), mRemoteInputUriController, diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java index e9d8f58301311..47eddb906533f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java @@ -82,7 +82,7 @@ import com.android.systemui.statusbar.notification.collection.provider.HighPrior import com.android.systemui.statusbar.notification.people.PeopleNotificationIdentifier; import com.android.systemui.statusbar.notification.row.NotificationGutsManager.OnSettingsClickListener; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.wmshell.BubblesManager; @@ -124,7 +124,7 @@ public class NotificationGutsManagerTest extends SysuiTestCase { @Mock private NotificationInfo.CheckSaveListener mCheckSaveListener; @Mock private OnSettingsClickListener mOnSettingsClickListener; @Mock private DeviceProvisionedController mDeviceProvisionedController; - @Mock private CentralSurfaces mCentralSurfaces; + @Mock private CentralSurfacesInt mCentralSurfaces; @Mock private AccessibilityManager mAccessibilityManager; @Mock private HighPriorityProvider mHighPriorityProvider; @Mock private INotificationManager mINotificationManager; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java index c9de60806b664..d6f933db15f3a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java @@ -69,7 +69,7 @@ import com.android.systemui.statusbar.notification.collection.render.SectionHead import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController.NotificationPanelEvent; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.HeadsUpManagerPhone; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.ScrimController; @@ -116,7 +116,7 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase { @Mock(answer = Answers.RETURNS_SELF) private NotificationSwipeHelper.Builder mNotificationSwipeHelperBuilder; @Mock private NotificationSwipeHelper mNotificationSwipeHelper; - @Mock private CentralSurfaces mCentralSurfaces; + @Mock private CentralSurfacesInt mCentralSurfaces; @Mock private ScrimController mScrimController; @Mock private NotificationGroupManagerLegacy mLegacyGroupManager; @Mock private SectionHeaderController mSilentHeaderController; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java index e8608fa76c062..ffceb62cceb14 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java @@ -66,7 +66,7 @@ import com.android.systemui.statusbar.notification.collection.render.GroupExpans import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.FooterView; -import com.android.systemui.statusbar.phone.CentralSurfaces; +import com.android.systemui.statusbar.phone.CentralSurfacesInt; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; @@ -95,7 +95,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { private AmbientState mAmbientState; @Rule public MockitoRule mockito = MockitoJUnit.rule(); - @Mock private CentralSurfaces mCentralSurfaces; + @Mock private CentralSurfacesInt mCentralSurfaces; @Mock private SysuiStatusBarStateController mBarState; @Mock private NotificationGroupManagerLegacy mGroupMembershipManger; @Mock private NotificationGroupManagerLegacy mGroupExpansionManager; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java index 9bfb2c4ce00c5..058bac380e843 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java @@ -58,7 +58,7 @@ import java.util.Optional; @SmallTest @RunWith(AndroidTestingRunner.class) public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase { - @Mock private CentralSurfaces mCentralSurfaces; + @Mock private CentralSurfacesInt mCentralSurfaces; @Mock private ShadeController mShadeController; @Mock private CommandQueue mCommandQueue; @Mock private NotificationPanelViewController mNotificationPanelViewController; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java similarity index 99% rename from packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesTest.java rename to packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java index 84edabdaa3027..f479a464a10a9 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java @@ -178,12 +178,12 @@ import dagger.Lazy; @SmallTest @RunWith(AndroidTestingRunner.class) @RunWithLooper(setAsMainLooper = true) -public class CentralSurfacesTest extends SysuiTestCase { +public class CentralSurfacesImplTest extends SysuiTestCase { private static final int FOLD_STATE_FOLDED = 0; private static final int FOLD_STATE_UNFOLDED = 1; - private CentralSurfaces mCentralSurfaces; + private CentralSurfacesImpl mCentralSurfaces; private FakeMetricsLogger mMetricsLogger; private PowerManager mPowerManager; private TestableNotificationInterruptStateProviderImpl mNotificationInterruptStateProvider; @@ -383,7 +383,7 @@ public class CentralSurfacesTest extends SysuiTestCase { when(mOperatorNameViewControllerFactory.create(any())) .thenReturn(mOperatorNameViewController); - mCentralSurfaces = new CentralSurfaces( + mCentralSurfaces = new CentralSurfacesImpl( mContext, mNotificationsController, mock(FragmentService.class), @@ -479,7 +479,7 @@ public class CentralSurfacesTest extends SysuiTestCase { mDreamOverlayStateController, mWiredChargingRippleController); when(mKeyguardViewMediator.registerCentralSurfaces( - any(CentralSurfaces.class), + any(CentralSurfacesImpl.class), any(NotificationPanelViewController.class), any(PanelExpansionStateManager.class), any(BiometricUnlockController.class), @@ -791,7 +791,7 @@ public class CentralSurfacesTest extends SysuiTestCase { @Test public void testDumpBarTransitions_DoesNotCrash() { - CentralSurfaces.dumpBarTransitions( + CentralSurfacesInt.dumpBarTransitions( new PrintWriter(new ByteArrayOutputStream()), "var", /* transitions= */ null); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeServiceHostTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeServiceHostTest.java index 26ac70c70e7fd..af3f3bc19bf53 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeServiceHostTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeServiceHostTest.java @@ -82,7 +82,7 @@ public class DozeServiceHostTest extends SysuiTestCase { @Mock private NotificationShadeWindowController mNotificationShadeWindowController; @Mock private PowerManager mPowerManager; @Mock private WakefulnessLifecycle mWakefullnessLifecycle; - @Mock private CentralSurfaces mCentralSurfaces; + @Mock private CentralSurfacesInt mCentralSurfaces; @Mock private NotificationIconAreaController mNotificationIconAreaController; @Mock private NotificationShadeWindowViewController mNotificationShadeWindowViewController; @Mock private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt index 31465f45af42e..a6f7d862a8da7 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt @@ -25,7 +25,7 @@ import java.util.concurrent.Executor class KeyguardBottomAreaTest : SysuiTestCase() { @Mock - private lateinit var mCentralSurfaces: CentralSurfaces + private lateinit var mCentralSurfaces: CentralSurfacesInt private lateinit var mKeyguardBottomArea: KeyguardBottomAreaView @Before diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java index 71f1f0b0f7cf0..48c8584c2132a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java @@ -161,7 +161,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { private static final int NOTIFICATION_SCRIM_TOP_PADDING_IN_SPLIT_SHADE = 50; @Mock - private CentralSurfaces mCentralSurfaces; + private CentralSurfacesInt mCentralSurfaces; @Mock private NotificationStackScrollLayout mNotificationStackScrollLayout; @Mock diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewControllerTest.kt index 7e245fcea22d3..3e354f2ce0c02 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewControllerTest.kt @@ -63,7 +63,7 @@ class NotificationShadeWindowViewControllerTest : SysuiTestCase() { @Mock private lateinit var mStatusBarStateController: SysuiStatusBarStateController @Mock - private lateinit var mCentralSurfaces: CentralSurfaces + private lateinit var mCentralSurfaces: CentralSurfacesInt @Mock private lateinit var mDockManager: DockManager @Mock diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewTest.java index 1d86fb13a1f6e..37e702f2a5c71 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewTest.java @@ -73,7 +73,7 @@ public class NotificationShadeWindowViewTest extends SysuiTestCase { @Mock private DragDownHelper mDragDownHelper; @Mock private SysuiStatusBarStateController mStatusBarStateController; @Mock private ShadeController mShadeController; - @Mock private CentralSurfaces mCentralSurfaces; + @Mock private CentralSurfacesInt mCentralSurfaces; @Mock private DockManager mDockManager; @Mock private NotificationPanelViewController mNotificationPanelViewController; @Mock private NotificationStackScrollLayout mNotificationStackScrollLayout; 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 a94ad0b763aa1..ce1d7f48a853d 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 @@ -77,7 +77,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase { @Mock private ViewMediatorCallback mViewMediatorCallback; @Mock private LockPatternUtils mLockPatternUtils; @Mock private KeyguardStateController mKeyguardStateController; - @Mock private CentralSurfaces mCentralSurfaces; + @Mock private CentralSurfacesInt mCentralSurfaces; @Mock private ViewGroup mContainer; @Mock private NotificationPanelViewController mNotificationPanelView; @Mock private BiometricUnlockController mBiometricUnlockController; 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 fa867e2796f7c..5de5138043de2 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 @@ -115,7 +115,7 @@ public class StatusBarNotificationActivityStarterTest extends SysuiTestCase { @Mock private NotificationRemoteInputManager mRemoteInputManager; @Mock - private CentralSurfaces mCentralSurfaces; + private CentralSurfacesInt mCentralSurfaces; @Mock private KeyguardStateController mKeyguardStateController; @Mock diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java index 1a3dd3a7a2a5b..893ae4a2b761f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java @@ -80,7 +80,7 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase { private CommandQueue mCommandQueue; private FakeMetricsLogger mMetricsLogger; private ShadeController mShadeController = mock(ShadeController.class); - private CentralSurfaces mCentralSurfaces = mock(CentralSurfaces.class); + private CentralSurfacesInt mCentralSurfaces = mock(CentralSurfacesInt.class); private InitController mInitController = new InitController(); @Before 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 0936b773d4b3e..e743defba892c 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 @@ -62,7 +62,7 @@ class UnlockedScreenOffAnimationControllerTest : SysuiTestCase() { @Mock private lateinit var globalSettings: GlobalSettings @Mock - private lateinit var mCentralSurfaces: CentralSurfaces + private lateinit var mCentralSurfaces: CentralSurfacesInt @Mock private lateinit var notificationPanelViewController: NotificationPanelViewController @Mock From ce7918463432c45a47eb10491d3f8d2dbe8312ef Mon Sep 17 00:00:00 2001 From: Dave Mankoff Date: Fri, 22 Apr 2022 15:28:57 +0000 Subject: [PATCH 2/2] Rename CentralSurfacesInt back to CentralSurfaces. Necessary step to retain git history of CentralSurfacesImpl. Bug: 229228871 Test: manual Change-Id: If4152279970090eeb3ea34307dfade5873e9dbf3 --- packages/SystemUI/proguard.flags | 2 +- .../keyguard/KeyguardViewController.java | 4 +- .../systemui/ActivityStarterDelegate.java | 6 +-- .../systemui/accessibility/SystemActions.java | 12 ++--- .../systemui/assist/PhoneStateMonitor.java | 8 +-- .../biometrics/AuthRippleController.kt | 4 +- .../systemui/dagger/SystemUIModule.java | 4 +- .../touch/BouncerSwipeTouchHandler.java | 10 ++-- .../GlobalActionsDialogLite.java | 24 ++++----- .../keyguard/KeyguardViewMediator.java | 4 +- .../systemui/navigationbar/NavBarHelper.java | 6 +-- .../systemui/navigationbar/NavigationBar.java | 24 ++++----- .../navigationbar/NavigationBarView.java | 4 +- .../com/android/systemui/power/PowerUI.java | 10 ++-- .../com/android/systemui/qs/QSTileHost.java | 12 ++--- .../recents/OverviewProxyRecentsImpl.java | 10 ++-- .../recents/OverviewProxyService.java | 8 +-- .../recents/ScreenPinningRequest.java | 12 ++--- .../screenshot/ActionProxyReceiver.java | 8 +-- .../LockscreenShadeTransitionController.kt | 4 +- .../statusbar/NotificationListener.java | 4 +- .../statusbar/NotificationMediaManager.java | 14 +++--- .../NotificationRemoteInputManager.java | 6 +-- .../statusbar/QsFrameTranslateController.java | 6 +-- .../statusbar/QsFrameTranslateImpl.java | 4 +- .../SysuiStatusBarStateController.java | 6 +-- .../CentralSurfacesDependenciesModule.java | 6 +-- .../dagger/StartCentralSurfacesModule.kt | 4 +- .../notification/NotificationClicker.java | 8 +-- .../collection/TargetSdkResolver.kt | 4 +- ...LegacyNotificationPresenterExtensions.java | 2 +- .../dagger/NotificationsModule.java | 4 +- .../init/NotificationsControllerImpl.kt | 4 +- .../row/ExpandableNotificationRow.java | 4 +- .../row/NotificationContentInflater.java | 4 +- .../row/NotificationGutsManager.java | 18 +++---- .../ExpandableNotificationRowComponent.java | 4 +- .../stack/NotificationStackScrollLayout.java | 6 +-- ...tificationStackScrollLayoutController.java | 6 +-- .../phone/BiometricUnlockController.java | 2 +- ...lSurfacesInt.java => CentralSurfaces.java} | 2 +- .../CentralSurfacesCommandQueueCallbacks.java | 50 +++++++++---------- .../statusbar/phone/CentralSurfacesImpl.java | 14 +++--- .../statusbar/phone/DozeServiceHost.java | 4 +- .../phone/KeyguardBottomAreaView.java | 4 +- .../phone/KeyguardEnvironmentImpl.java | 4 +- .../NotificationPanelViewController.java | 4 +- ...NotificationShadeWindowControllerImpl.java | 2 +- .../phone/NotificationShadeWindowView.java | 2 +- ...NotificationShadeWindowViewController.java | 4 +- .../systemui/statusbar/phone/PanelView.java | 2 +- .../statusbar/phone/PanelViewController.java | 2 +- .../phone/ScreenOffAnimationController.kt | 4 +- .../statusbar/phone/ScrimController.java | 2 +- .../systemui/statusbar/phone/ScrimState.java | 2 +- .../statusbar/phone/ShadeController.java | 4 +- .../statusbar/phone/ShadeControllerImpl.java | 6 +-- .../phone/StatusBarHeadsUpChangeListener.java | 2 +- .../phone/StatusBarKeyguardViewManager.java | 6 +-- .../StatusBarLaunchAnimatorController.kt | 2 +- .../StatusBarNotificationActivityStarter.java | 6 +-- .../phone/StatusBarNotificationPresenter.java | 10 ++-- .../StatusBarTouchableRegionManager.java | 4 +- .../UnlockedScreenOffAnimationController.kt | 4 +- .../phone/dagger/StatusBarPhoneModule.java | 4 +- .../window/StatusBarWindowStateController.kt | 6 +-- .../unfold/FoldAodAnimationController.kt | 6 +-- .../biometrics/AuthRippleControllerTest.kt | 4 +- .../touch/BouncerSwipeTouchHandlerTest.java | 4 +- .../GlobalActionsDialogLiteTest.java | 4 +- .../navigationbar/NavBarHelperTest.java | 4 +- .../navigationbar/NavigationBarTest.java | 4 +- .../android/systemui/power/PowerUITest.java | 6 +-- .../android/systemui/qs/QSFragmentTest.java | 4 +- .../android/systemui/qs/QSTileHostTest.java | 6 +-- .../qs/external/TileServicesTest.java | 4 +- .../screenshot/ActionProxyReceiverTest.java | 6 +-- ...LockscreenShadeTransitionControllerTest.kt | 4 +- .../NotificationRemoteInputManagerTest.java | 6 +-- .../statusbar/SmartReplyControllerTest.java | 4 +- .../row/NotificationGutsManagerTest.java | 4 +- ...cationStackScrollLayoutControllerTest.java | 4 +- .../NotificationStackScrollLayoutTest.java | 4 +- ...tralSurfacesCommandQueueCallbacksTest.java | 2 +- .../phone/CentralSurfacesImplTest.java | 2 +- .../statusbar/phone/DozeServiceHostTest.java | 2 +- .../statusbar/phone/KeyguardBottomAreaTest.kt | 2 +- .../NotificationPanelViewControllerTest.java | 2 +- ...tificationShadeWindowViewControllerTest.kt | 2 +- .../NotificationShadeWindowViewTest.java | 2 +- .../StatusBarKeyguardViewManagerTest.java | 2 +- ...tusBarNotificationActivityStarterTest.java | 2 +- .../StatusBarNotificationPresenterTest.java | 2 +- ...nlockedScreenOffAnimationControllerTest.kt | 2 +- 94 files changed, 274 insertions(+), 274 deletions(-) rename packages/SystemUI/src/com/android/systemui/statusbar/phone/{CentralSurfacesInt.java => CentralSurfaces.java} (99%) diff --git a/packages/SystemUI/proguard.flags b/packages/SystemUI/proguard.flags index 0dc6c69acfeab..e74b6c78ec804 100644 --- a/packages/SystemUI/proguard.flags +++ b/packages/SystemUI/proguard.flags @@ -3,7 +3,7 @@ -keep class com.android.systemui.recents.OverviewProxyRecentsImpl -keep class com.android.systemui.statusbar.car.CarStatusBar --keep class com.android.systemui.statusbar.phone.CentralSurfacesInt +-keep class com.android.systemui.statusbar.phone.CentralSurfaces -keep class com.android.systemui.statusbar.tv.TvStatusBar -keep class com.android.systemui.car.CarSystemUIFactory -keep class com.android.systemui.SystemUIFactory diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java index ad614625e85b6..ca8728aecb4cb 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java @@ -24,7 +24,7 @@ import androidx.annotation.Nullable; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.statusbar.phone.BiometricUnlockController; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManager; @@ -183,7 +183,7 @@ public interface KeyguardViewController { /** * Registers the CentralSurfaces to which this Keyguard View is mounted. */ - void registerCentralSurfaces(CentralSurfacesInt centralSurfaces, + void registerCentralSurfaces(CentralSurfaces centralSurfaces, NotificationPanelViewController notificationPanelViewController, @Nullable PanelExpansionStateManager panelExpansionStateManager, BiometricUnlockController biometricUnlockController, diff --git a/packages/SystemUI/src/com/android/systemui/ActivityStarterDelegate.java b/packages/SystemUI/src/com/android/systemui/ActivityStarterDelegate.java index 02216467ed286..7af6f6677f3f5 100644 --- a/packages/SystemUI/src/com/android/systemui/ActivityStarterDelegate.java +++ b/packages/SystemUI/src/com/android/systemui/ActivityStarterDelegate.java @@ -24,7 +24,7 @@ import androidx.annotation.Nullable; import com.android.systemui.animation.ActivityLaunchAnimator; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.plugins.ActivityStarter; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import java.util.Optional; @@ -40,10 +40,10 @@ import dagger.Lazy; @SysUISingleton public class ActivityStarterDelegate implements ActivityStarter { - private Lazy> mActualStarterOptionalLazy; + private Lazy> mActualStarterOptionalLazy; @Inject - public ActivityStarterDelegate(Lazy> centralSurfacesOptionalLazy) { + public ActivityStarterDelegate(Lazy> centralSurfacesOptionalLazy) { mActualStarterOptionalLazy = centralSurfacesOptionalLazy; } diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java index 8c29b0cd6615f..bd8e44ceab803 100644 --- a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java +++ b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java @@ -54,7 +54,7 @@ import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.recents.Recents; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.NotificationShadeWindowController; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.StatusBarWindowCallback; import com.android.systemui.util.Assert; @@ -180,7 +180,7 @@ public class SystemActions extends CoreStartable { private final Optional mRecentsOptional; private Locale mLocale; private final AccessibilityManager mA11yManager; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final NotificationShadeWindowController mNotificationShadeController; private final StatusBarWindowCallback mNotificationShadeCallback; private boolean mDismissNotificationShadeActionRegistered; @@ -188,7 +188,7 @@ public class SystemActions extends CoreStartable { @Inject public SystemActions(Context context, NotificationShadeWindowController notificationShadeController, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, Optional recentsOptional) { super(context); mRecentsOptional = recentsOptional; @@ -311,9 +311,9 @@ public class SystemActions extends CoreStartable { // Saving state in instance variable since this callback is called quite often to avoid // binder calls - final Optional centralSurfacesOptional = + final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); - if (centralSurfacesOptional.map(CentralSurfacesInt::isPanelExpanded).orElse(false) + if (centralSurfacesOptional.map(CentralSurfaces::isPanelExpanded).orElse(false) && !centralSurfacesOptional.get().isKeyguardShowing()) { if (!mDismissNotificationShadeActionRegistered) { mA11yManager.registerSystemAction( @@ -467,7 +467,7 @@ public class SystemActions extends CoreStartable { } private void handleNotifications() { - mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::animateExpandNotificationsPanel); + mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::animateExpandNotificationsPanel); } private void handleQuickSettings() { diff --git a/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java b/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java index 6a7a938ffdf4f..dfff00b90ef2d 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java +++ b/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java @@ -36,7 +36,7 @@ import com.android.systemui.shared.system.PackageManagerWrapper; import com.android.systemui.shared.system.TaskStackChangeListener; import com.android.systemui.shared.system.TaskStackChangeListeners; import com.android.systemui.statusbar.StatusBarState; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import java.util.ArrayList; import java.util.List; @@ -69,7 +69,7 @@ public final class PhoneStateMonitor { }; private final Context mContext; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final StatusBarStateController mStatusBarStateController; private boolean mLauncherShowing; @@ -77,7 +77,7 @@ public final class PhoneStateMonitor { @Inject PhoneStateMonitor(Context context, BroadcastDispatcher broadcastDispatcher, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, BootCompleteCache bootCompleteCache, StatusBarStateController statusBarStateController) { mContext = context; @@ -182,7 +182,7 @@ public final class PhoneStateMonitor { private boolean isBouncerShowing() { return mCentralSurfacesOptionalLazy.get() - .map(CentralSurfacesInt::isBouncerShowing).orElse(false); + .map(CentralSurfaces::isBouncerShowing).orElse(false); } private boolean isKeyguardLocked() { diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt index 9e1951cff5070..76c1dbcaf20c7 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt @@ -40,7 +40,7 @@ import com.android.systemui.statusbar.NotificationShadeWindowController import com.android.systemui.statusbar.commandline.Command import com.android.systemui.statusbar.commandline.CommandRegistry import com.android.systemui.statusbar.phone.BiometricUnlockController -import com.android.systemui.statusbar.phone.CentralSurfacesInt +import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.KeyguardBypassController import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent.CentralSurfacesScope import com.android.systemui.statusbar.policy.ConfigurationController @@ -61,7 +61,7 @@ import javax.inject.Provider */ @CentralSurfacesScope class AuthRippleController @Inject constructor( - private val centralSurfaces: CentralSurfacesInt, + private val centralSurfaces: CentralSurfaces, private val sysuiContext: Context, private val authController: AuthController, private val configurationController: ConfigurationController, diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java index 72a0f2f0ee61a..bbeb66c5af522 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java @@ -67,7 +67,7 @@ import com.android.systemui.statusbar.notification.people.PeopleHubModule; import com.android.systemui.statusbar.notification.row.dagger.ExpandableNotificationRowComponent; import com.android.systemui.statusbar.notification.row.dagger.NotificationRowComponent; import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfComponent; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent; import com.android.systemui.statusbar.policy.ConfigurationController; @@ -178,7 +178,7 @@ public abstract class SystemUIModule { abstract Recents optionalRecents(); @BindsOptionalOf - abstract CentralSurfacesInt optionalCentralSurfaces(); + abstract CentralSurfaces optionalCentralSurfaces(); @BindsOptionalOf abstract UdfpsHbmProvider optionalUdfpsHbmProvider(); diff --git a/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java b/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java index c8834f269fea2..f5575a25aec30 100644 --- a/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java +++ b/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java @@ -37,7 +37,7 @@ import androidx.annotation.VisibleForTesting; import com.android.internal.logging.UiEvent; import com.android.internal.logging.UiEventLogger; import com.android.systemui.statusbar.NotificationShadeWindowController; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.KeyguardBouncer; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.panelstate.PanelExpansionChangeEvent; @@ -79,7 +79,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler { private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private float mCurrentExpansion; - private final Optional mCentralSurfaces; + private final Optional mCentralSurfaces; private VelocityTracker mVelocityTracker; @@ -110,7 +110,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler { // scrolls. mCapture = Math.abs(distanceY) > Math.abs(distanceX); mBouncerInitiallyShowing = mCentralSurfaces - .map(CentralSurfacesInt::isBouncerShowing) + .map(CentralSurfaces::isBouncerShowing) .orElse(false); if (mCapture) { @@ -189,7 +189,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler { public BouncerSwipeTouchHandler( DisplayMetrics displayMetrics, StatusBarKeyguardViewManager statusBarKeyguardViewManager, - Optional centralSurfaces, + Optional centralSurfaces, NotificationShadeWindowController notificationShadeWindowController, ValueAnimatorCreator valueAnimatorCreator, VelocityTrackerFactory velocityTrackerFactory, @@ -213,7 +213,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler { @Override public void getTouchInitiationRegion(Region region) { - if (mCentralSurfaces.map(CentralSurfacesInt::isBouncerShowing).orElse(false)) { + if (mCentralSurfaces.map(CentralSurfaces::isBouncerShowing).orElse(false)) { region.op(new Rect(0, 0, mDisplayMetrics.widthPixels, Math.round( mDisplayMetrics.heightPixels * mBouncerZoneScreenPercentage)), diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java index a244d4bddeb5d..acb080a2eaaab 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java @@ -121,7 +121,7 @@ import com.android.systemui.plugins.GlobalActionsPanelPlugin; import com.android.systemui.scrim.ScrimDrawable; import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.VibratorHelper; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.SystemUIDialog; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.KeyguardStateController; @@ -236,7 +236,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene private int mDialogPressDelay = DIALOG_PRESS_DELAY; // ms protected Handler mMainHandler; private int mSmallestScreenWidthDp; - private final Optional mCentralSurfacesOptional; + private final Optional mCentralSurfacesOptional; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final DialogLaunchAnimator mDialogLaunchAnimator; @@ -344,7 +344,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene RingerModeTracker ringerModeTracker, @Main Handler handler, PackageManager packageManager, - Optional centralSurfacesOptional, + Optional centralSurfacesOptional, KeyguardUpdateMonitor keyguardUpdateMonitor, DialogLaunchAnimator dialogLaunchAnimator) { mContext = context; @@ -426,7 +426,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene return mUiEventLogger; } - protected Optional getCentralSurfaces() { + protected Optional getCentralSurfaces() { return mCentralSurfacesOptional; } @@ -874,7 +874,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene mUiEventLogger.log(GlobalActionsEvent.GA_EMERGENCY_DIALER_PRESS); if (mTelecomManager != null) { // Close shade so user sees the activity - mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::collapseShade); + mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShade); Intent intent = mTelecomManager.createLaunchEmergencyDialerIntent( null /* number */); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK @@ -1006,7 +1006,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene mIActivityManager.requestInteractiveBugReport(); } // Close shade so user sees the activity - mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::collapseShade); + mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShade); } catch (RemoteException e) { } } @@ -1026,7 +1026,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene mUiEventLogger.log(GlobalActionsEvent.GA_BUGREPORT_LONG_PRESS); mIActivityManager.requestFullBugReport(); // Close shade so user sees the activity - mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::collapseShade); + mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShade); } catch (RemoteException e) { } return false; @@ -2162,7 +2162,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene protected final Runnable mOnRefreshCallback; private UiEventLogger mUiEventLogger; private GestureDetector mGestureDetector; - private Optional mCentralSurfacesOptional; + private Optional mCentralSurfacesOptional; private KeyguardUpdateMonitor mKeyguardUpdateMonitor; private LockPatternUtils mLockPatternUtils; private float mWindowDimAmount; @@ -2191,7 +2191,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene float distanceY) { if (distanceY < 0 && distanceY > distanceX && e1.getY() <= mCentralSurfacesOptional.map( - CentralSurfacesInt::getStatusBarHeight).orElse(0)) { + CentralSurfaces::getStatusBarHeight).orElse(0)) { // Downwards scroll from top openShadeAndDismiss(); return true; @@ -2204,7 +2204,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene float velocityY) { if (velocityY > 0 && Math.abs(velocityY) > Math.abs(velocityX) && e1.getY() <= mCentralSurfacesOptional.map( - CentralSurfacesInt::getStatusBarHeight).orElse(0)) { + CentralSurfaces::getStatusBarHeight).orElse(0)) { // Downwards fling from top openShadeAndDismiss(); return true; @@ -2219,7 +2219,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene NotificationShadeWindowController notificationShadeWindowController, Runnable onRefreshCallback, boolean keyguardShowing, MyPowerOptionsAdapter powerAdapter, UiEventLogger uiEventLogger, - Optional centralSurfacesOptional, + Optional centralSurfacesOptional, KeyguardUpdateMonitor keyguardUpdateMonitor, LockPatternUtils lockPatternUtils) { // We set dismissOnDeviceLock to false because we have a custom broadcast receiver to @@ -2265,7 +2265,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene private void openShadeAndDismiss() { mUiEventLogger.log(GlobalActionsEvent.GA_CLOSE_TAP_OUTSIDE); - if (mCentralSurfacesOptional.map(CentralSurfacesInt::isKeyguardShowing).orElse(false)) { + if (mCentralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing).orElse(false)) { // match existing lockscreen behavior to open QS when swiping from status bar mCentralSurfacesOptional.ifPresent( centralSurfaces -> centralSurfaces.animateExpandSettingsPanel(null)); diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index d7eff29bc8136..bcb440b1297e0 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -126,7 +126,7 @@ import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.phone.BiometricUnlockController; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.DozeParameters; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.NotificationPanelViewController; @@ -2804,7 +2804,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, * @param bypassController * @return the View Controller for the Keyguard View this class is mediating. */ - public KeyguardViewController registerCentralSurfaces(CentralSurfacesInt centralSurfaces, + public KeyguardViewController registerCentralSurfaces(CentralSurfaces centralSurfaces, NotificationPanelViewController panelView, @Nullable PanelExpansionStateManager panelExpansionStateManager, BiometricUnlockController biometricUnlockController, diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java index 7bdd7ae6f6e1d..779292c433408 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java @@ -50,7 +50,7 @@ import com.android.systemui.dump.DumpManager; import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.system.QuickStepContract; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import java.io.PrintWriter; import java.util.ArrayList; @@ -79,7 +79,7 @@ public final class NavBarHelper implements Dumpable { private final AccessibilityManager mAccessibilityManager; private final Lazy mAssistManagerLazy; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final UserTracker mUserTracker; private final SystemActions mSystemActions; private final AccessibilityButtonModeObserver mAccessibilityButtonModeObserver; @@ -113,7 +113,7 @@ public final class NavBarHelper implements SystemActions systemActions, OverviewProxyService overviewProxyService, Lazy assistManagerLazy, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, NavigationModeController navigationModeController, UserTracker userTracker, DumpManager dumpManager) { diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java index f39b92b798a84..357ff3834fcb2 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java @@ -54,8 +54,8 @@ import static com.android.systemui.statusbar.phone.BarTransitions.MODE_OPAQUE; import static com.android.systemui.statusbar.phone.BarTransitions.MODE_SEMI_TRANSPARENT; import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSPARENT; import static com.android.systemui.statusbar.phone.BarTransitions.TransitionMode; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.DEBUG_WINDOW_STATE; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.dumpBarTransitions; +import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG_WINDOW_STATE; +import static com.android.systemui.statusbar.phone.CentralSurfaces.dumpBarTransitions; import android.annotation.IdRes; import android.app.ActivityTaskManager; @@ -140,7 +140,7 @@ import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.notification.stack.StackStateAnimator; import com.android.systemui.statusbar.phone.AutoHideController; import com.android.systemui.statusbar.phone.BarTransitions; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.LightBarController; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; @@ -187,7 +187,7 @@ public class NavigationBar extends ViewController implements private final Lazy mAssistManagerLazy; private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private final SysUiState mSysUiFlagsContainer; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final ShadeController mShadeController; private final NotificationRemoteInputManager mNotificationRemoteInputManager; private final OverviewProxyService mOverviewProxyService; @@ -499,7 +499,7 @@ public class NavigationBar extends ViewController implements CommandQueue commandQueue, Optional pipOptional, Optional recentsOptional, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, ShadeController shadeController, NotificationRemoteInputManager notificationRemoteInputManager, NotificationShadeDepthController notificationShadeDepthController, @@ -1189,13 +1189,13 @@ public class NavigationBar extends ViewController implements // If an incoming call is ringing, HOME is totally disabled. // (The user is already on the InCallUI at this point, // and their ONLY options are to answer or reject the call.) - final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); + final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: mHomeBlockedThisTouch = false; if (mTelecomManagerOptional.isPresent() && mTelecomManagerOptional.get().isRinging()) { - if (centralSurfacesOptional.map(CentralSurfacesInt::isKeyguardShowing) + if (centralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing) .orElse(false)) { Log.i(TAG, "Ignoring HOME; there's a ringing incoming call. " + "No heads up"); @@ -1212,7 +1212,7 @@ public class NavigationBar extends ViewController implements case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: mHandler.removeCallbacks(mOnVariableDurationHomeLongClick); - centralSurfacesOptional.ifPresent(CentralSurfacesInt::awakenDreams); + centralSurfacesOptional.ifPresent(CentralSurfaces::awakenDreams); break; } return false; @@ -1246,7 +1246,7 @@ public class NavigationBar extends ViewController implements AssistManager.INVOCATION_TYPE_KEY, AssistManager.INVOCATION_TYPE_HOME_BUTTON_LONG_PRESS); mAssistManagerLazy.get().startAssist(args); - mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::awakenDreams); + mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::awakenDreams); mView.abortCurrentGesture(); return true; } @@ -1272,7 +1272,7 @@ public class NavigationBar extends ViewController implements LatencyTracker.getInstance(mContext).onActionStart( LatencyTracker.ACTION_TOGGLE_RECENTS); } - mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::awakenDreams); + mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::awakenDreams); mCommandQueue.toggleRecentApps(); } @@ -1454,7 +1454,7 @@ public class NavigationBar extends ViewController implements private void checkBarModes() { // We only have status bar on default display now. if (mIsOnDefaultDisplay) { - mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::checkBarModes); + mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::checkBarModes); } else { checkNavBarModes(); } @@ -1473,7 +1473,7 @@ public class NavigationBar extends ViewController implements */ public void checkNavBarModes() { final boolean anim = - mCentralSurfacesOptionalLazy.get().map(CentralSurfacesInt::isDeviceInteractive) + mCentralSurfacesOptionalLazy.get().map(CentralSurfaces::isDeviceInteractive) .orElse(false) && mNavigationBarWindowState != WINDOW_STATE_HIDDEN; getBarTransitions().transitionTo(mTransitionMode, anim); diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java index 9a15e1f132f14..f3a3f1018a9fe 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java @@ -86,7 +86,7 @@ import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.WindowManagerWrapper; import com.android.systemui.statusbar.phone.AutoHideController; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.LightBarTransitionsController; import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.wm.shell.back.BackAnimation; @@ -1331,7 +1331,7 @@ public class NavigationBarView extends FrameLayout { getContextDisplay().getRealSize(size); pw.println("NavigationBarView:"); - pw.println(String.format(" this: " + CentralSurfacesInt.viewInfo(this) + pw.println(String.format(" this: " + CentralSurfaces.viewInfo(this) + " " + visibilityToString(getVisibility()))); getWindowVisibleDisplayFrame(r); diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java index 5f1131856cbd9..623bb12be5b02 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java @@ -47,7 +47,7 @@ import com.android.systemui.R; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.statusbar.CommandQueue; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import java.io.PrintWriter; import java.util.Arrays; @@ -105,11 +105,11 @@ public class PowerUI extends CoreStartable implements CommandQueue.Callbacks { private IThermalEventListener mUsbThermalEventListener; private final BroadcastDispatcher mBroadcastDispatcher; private final CommandQueue mCommandQueue; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; @Inject public PowerUI(Context context, BroadcastDispatcher broadcastDispatcher, - CommandQueue commandQueue, Lazy> centralSurfacesOptionalLazy, + CommandQueue commandQueue, Lazy> centralSurfacesOptionalLazy, WarningsUI warningsUI, EnhancedEstimates enhancedEstimates, PowerManager powerManager) { super(context); @@ -701,9 +701,9 @@ public class PowerUI extends CoreStartable implements CommandQueue.Callbacks { int status = temp.getStatus(); if (status >= Temperature.THROTTLING_EMERGENCY) { - final Optional centralSurfacesOptional = + final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); - if (!centralSurfacesOptional.map(CentralSurfacesInt::isDeviceInVrMode) + if (!centralSurfacesOptional.map(CentralSurfaces::isDeviceInVrMode) .orElse(false)) { mWarnings.showHighTemperatureWarning(); Slog.d(TAG, "SkinThermalEventListener: notifyThrottling was called " diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java index 32b54f12e235f..fbdabc74aba48 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java @@ -53,7 +53,7 @@ import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.statusbar.phone.AutoTileManager; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.tuner.TunerService; import com.android.systemui.tuner.TunerService.Tunable; @@ -101,7 +101,7 @@ public class QSTileHost implements QSHost, Tunable, PluginListener, D private final StatusBarIconController mIconController; private final ArrayList mQsFactories = new ArrayList<>(); private int mCurrentUser; - private final Optional mCentralSurfacesOptional; + private final Optional mCentralSurfacesOptional; private Context mUserContext; private UserTracker mUserTracker; private SecureSettings mSecureSettings; @@ -120,7 +120,7 @@ public class QSTileHost implements QSHost, Tunable, PluginListener, D Provider autoTiles, DumpManager dumpManager, BroadcastDispatcher broadcastDispatcher, - Optional centralSurfacesOptional, + Optional centralSurfacesOptional, QSLogger qsLogger, UiEventLogger uiEventLogger, UserTracker userTracker, @@ -226,17 +226,17 @@ public class QSTileHost implements QSHost, Tunable, PluginListener, D @Override public void collapsePanels() { - mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::postAnimateCollapsePanels); + mCentralSurfacesOptional.ifPresent(CentralSurfaces::postAnimateCollapsePanels); } @Override public void forceCollapsePanels() { - mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::postAnimateForceCollapsePanels); + mCentralSurfacesOptional.ifPresent(CentralSurfaces::postAnimateForceCollapsePanels); } @Override public void openPanels() { - mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::postAnimateOpenPanels); + mCentralSurfacesOptional.ifPresent(CentralSurfaces::postAnimateOpenPanels); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java index 1940be8be8e32..f389df097d7d2 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java @@ -26,7 +26,7 @@ import android.util.Log; import com.android.systemui.Dependency; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.shared.recents.IOverviewProxy; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import java.util.Optional; @@ -42,7 +42,7 @@ public class OverviewProxyRecentsImpl implements RecentsImplementation { private final static String TAG = "OverviewProxyRecentsImpl"; @Nullable - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private Context mContext; private Handler mHandler; @@ -51,7 +51,7 @@ public class OverviewProxyRecentsImpl implements RecentsImplementation { @SuppressWarnings("OptionalUsedAsFieldOrParameterType") @Inject - public OverviewProxyRecentsImpl(Lazy> centralSurfacesOptionalLazy) { + public OverviewProxyRecentsImpl(Lazy> centralSurfacesOptionalLazy) { mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy; } @@ -109,9 +109,9 @@ public class OverviewProxyRecentsImpl implements RecentsImplementation { } }; // Preload only if device for current user is unlocked - final Optional centralSurfacesOptional = + final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); - if (centralSurfacesOptional.map(CentralSurfacesInt::isKeyguardShowing).orElse(false)) { + if (centralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing).orElse(false)) { centralSurfacesOptional.get().executeRunnableDismissingKeyguard(() -> { mHandler.post(toggleRecents); }, null, true /* dismissShade */, false /* afterKeyguardGone */, diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java index d8323c5c8652e..c723fbb9a6e1a 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java @@ -101,7 +101,7 @@ import com.android.systemui.shared.system.ActivityManagerWrapper; 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.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.StatusBarWindowCallback; import com.android.systemui.statusbar.policy.CallbackController; @@ -145,7 +145,7 @@ public class OverviewProxyService extends CurrentUserTracker implements private final Context mContext; private final Optional mPipOptional; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final Optional mSplitScreenOptional; private SysUiState mSysUiState; private final Handler mHandler; @@ -400,7 +400,7 @@ public class OverviewProxyService extends CurrentUserTracker implements @Override public void toggleNotificationPanel() { verifyCallerAndClearCallingIdentityPostMain("toggleNotificationPanel", () -> - mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::togglePanel)); + mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::togglePanel)); } @@ -555,7 +555,7 @@ public class OverviewProxyService extends CurrentUserTracker implements @Inject public OverviewProxyService(Context context, CommandQueue commandQueue, Lazy navBarControllerLazy, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, NavigationModeController navModeController, NotificationShadeWindowController statusBarWinController, SysUiState sysUiState, Optional pipOptional, diff --git a/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java b/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java index 1ed6a3a27c7b3..c272602e33879 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java +++ b/packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java @@ -56,7 +56,7 @@ import com.android.systemui.navigationbar.NavigationBarView; import com.android.systemui.navigationbar.NavigationModeController; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.WindowManagerWrapper; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.util.leak.RotationUtils; import java.util.ArrayList; @@ -70,7 +70,7 @@ public class ScreenPinningRequest implements View.OnClickListener, NavigationModeController.ModeChangedListener { private final Context mContext; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final AccessibilityManager mAccessibilityService; private final WindowManager mWindowManager; @@ -85,7 +85,7 @@ public class ScreenPinningRequest implements View.OnClickListener, @Inject public ScreenPinningRequest( Context context, - Lazy> centralSurfacesOptionalLazy) { + Lazy> centralSurfacesOptionalLazy) { mContext = context; mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy; mAccessibilityService = (AccessibilityManager) @@ -269,10 +269,10 @@ public class ScreenPinningRequest implements View.OnClickListener, .setVisibility(View.INVISIBLE); } - final Optional centralSurfacesOptional = + final Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); boolean recentsVisible = - centralSurfacesOptional.map(CentralSurfacesInt::isOverviewEnabled).orElse(false); + centralSurfacesOptional.map(CentralSurfaces::isOverviewEnabled).orElse(false); boolean touchExplorationEnabled = mAccessibilityService.isTouchExplorationEnabled(); int descriptionStringResId; if (QuickStepContract.isGesturalMode(mNavBarMode)) { @@ -294,7 +294,7 @@ public class ScreenPinningRequest implements View.OnClickListener, } NavigationBarView navigationBarView = - centralSurfacesOptional.map(CentralSurfacesInt::getNavigationBarView).orElse(null); + centralSurfacesOptional.map(CentralSurfaces::getNavigationBarView).orElse(null); if (navigationBarView != null) { ((ImageView) mLayout.findViewById(R.id.screen_pinning_back_icon)) .setImageDrawable(navigationBarView.getBackDrawable()); diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java b/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java index c45782965c4f3..daaa897374cba 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ActionProxyReceiver.java @@ -24,7 +24,7 @@ import static com.android.systemui.screenshot.ScreenshotController.EXTRA_ACTION_ import static com.android.systemui.screenshot.ScreenshotController.EXTRA_DISALLOW_ENTER_PIP; import static com.android.systemui.screenshot.ScreenshotController.EXTRA_ID; import static com.android.systemui.screenshot.ScreenshotController.EXTRA_SMART_ACTIONS_ENABLED; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.SYSTEM_DIALOG_REASON_SCREENSHOT; +import static com.android.systemui.statusbar.phone.CentralSurfaces.SYSTEM_DIALOG_REASON_SCREENSHOT; import android.app.ActivityOptions; import android.app.PendingIntent; @@ -36,7 +36,7 @@ import android.view.RemoteAnimationAdapter; import android.view.WindowManagerGlobal; import com.android.systemui.shared.system.ActivityManagerWrapper; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import java.util.Optional; @@ -49,12 +49,12 @@ import javax.inject.Inject; public class ActionProxyReceiver extends BroadcastReceiver { private static final String TAG = "ActionProxyReceiver"; - private final CentralSurfacesInt mCentralSurfaces; + private final CentralSurfaces mCentralSurfaces; private final ActivityManagerWrapper mActivityManagerWrapper; private final ScreenshotSmartActions mScreenshotSmartActions; @Inject - public ActionProxyReceiver(Optional centralSurfacesOptional, + public ActionProxyReceiver(Optional centralSurfacesOptional, ActivityManagerWrapper activityManagerWrapper, ScreenshotSmartActions screenshotSmartActions) { mCentralSurfaces = centralSurfacesOptional.orElse(null); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt index f913332a0d711..c1ea6bf7cec87 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt @@ -34,7 +34,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.statusbar.notification.row.ExpandableView import com.android.systemui.statusbar.notification.stack.AmbientState import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController -import com.android.systemui.statusbar.phone.CentralSurfacesInt +import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.KeyguardBypassController import com.android.systemui.statusbar.phone.LSShadeTransitionLogger import com.android.systemui.statusbar.phone.NotificationPanelViewController @@ -78,7 +78,7 @@ class LockscreenShadeTransitionController @Inject constructor( private var useSplitShade: Boolean = false private lateinit var nsslController: NotificationStackScrollLayoutController lateinit var notificationPanelController: NotificationPanelViewController - lateinit var centralSurfaces: CentralSurfacesInt + lateinit var centralSurfaces: CentralSurfaces lateinit var qS: QS /** diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java index db6709a322528..68d35f9679ed1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java @@ -34,7 +34,7 @@ import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.statusbar.dagger.CentralSurfacesModule; import com.android.systemui.statusbar.notification.collection.NotifCollection; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.NotificationListenerWithPlugins; import com.android.systemui.util.time.SystemClock; @@ -54,7 +54,7 @@ import javax.inject.Inject; @SuppressLint("OverrideAbstract") public class NotificationListener extends NotificationListenerWithPlugins { private static final String TAG = "NotificationListener"; - private static final boolean DEBUG = CentralSurfacesInt.DEBUG; + private static final boolean DEBUG = CentralSurfaces.DEBUG; private static final long MAX_RANKING_DELAY_MILLIS = 500L; private final Context mContext; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java index 37a5d74a9cde4..76f9db44af664 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java @@ -16,9 +16,9 @@ package com.android.systemui.statusbar; import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.DEBUG_MEDIA_FAKE_ARTWORK; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.ENABLE_LOCKSCREEN_WALLPAPER; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.SHOW_LOCKSCREEN_MEDIA_ARTWORK; +import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG_MEDIA_FAKE_ARTWORK; +import static com.android.systemui.statusbar.phone.CentralSurfaces.ENABLE_LOCKSCREEN_WALLPAPER; +import static com.android.systemui.statusbar.phone.CentralSurfaces.SHOW_LOCKSCREEN_MEDIA_ARTWORK; import android.annotation.MainThread; import android.annotation.NonNull; @@ -66,7 +66,7 @@ import com.android.systemui.statusbar.notification.collection.notifcollection.Di import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.phone.BiometricUnlockController; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.LockscreenWallpaper; import com.android.systemui.statusbar.phone.ScrimController; @@ -132,7 +132,7 @@ public class NotificationMediaManager implements Dumpable { private final Context mContext; private final ArrayList mMediaListeners; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final MediaArtworkProcessor mMediaArtworkProcessor; private final Set> mProcessArtworkTasks = new ArraySet<>(); @@ -177,7 +177,7 @@ public class NotificationMediaManager implements Dumpable { */ public NotificationMediaManager( Context context, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, Lazy notificationShadeWindowController, NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, @@ -663,7 +663,7 @@ public class NotificationMediaManager implements Dumpable { mNotificationShadeWindowController.get(); boolean hideBecauseOccluded = mCentralSurfacesOptionalLazy.get() - .map(CentralSurfacesInt::isOccluded).orElse(false); + .map(CentralSurfaces::isOccluded).orElse(false); final boolean hasArtwork = artworkDrawable != null; mColorExtractor.setHasMediaArtwork(hasMediaArtwork); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java index 8eac2a843c8cc..d71dec8ff3968 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java @@ -64,7 +64,7 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry. import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.notification.logging.NotificationLogger; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.android.systemui.statusbar.policy.RemoteInputView; import com.android.systemui.util.DumpUtilsKt; @@ -102,7 +102,7 @@ public class NotificationRemoteInputManager implements Dumpable { private final Handler mMainHandler; private final ActionClickLogger mLogger; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; protected final Context mContext; protected final NotifPipelineFlags mNotifPipelineFlags; @@ -262,7 +262,7 @@ public class NotificationRemoteInputManager implements Dumpable { NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, RemoteInputNotificationRebuilder rebuilder, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, StatusBarStateController statusBarStateController, @Main Handler mainHandler, RemoteInputUriController remoteInputUriController, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateController.java b/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateController.java index 96829a009f1ff..78077386179aa 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateController.java @@ -20,16 +20,16 @@ import android.view.View; import com.android.systemui.plugins.qs.QS; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; /** * Calculates and moves the QS frame vertically. */ public abstract class QsFrameTranslateController { - protected CentralSurfacesInt mCentralSurfaces; + protected CentralSurfaces mCentralSurfaces; - public QsFrameTranslateController(CentralSurfacesInt centralSurfaces) { + public QsFrameTranslateController(CentralSurfaces centralSurfaces) { mCentralSurfaces = centralSurfaces; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateImpl.java index dfdaa3c9e4499..33e224579bef3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/QsFrameTranslateImpl.java @@ -21,7 +21,7 @@ import android.view.View; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.plugins.qs.QS; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import javax.inject.Inject; @@ -32,7 +32,7 @@ import javax.inject.Inject; public class QsFrameTranslateImpl extends QsFrameTranslateController { @Inject - public QsFrameTranslateImpl(CentralSurfacesInt centralSurfaces) { + public QsFrameTranslateImpl(CentralSurfaces centralSurfaces) { super(centralSurfaces); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java b/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java index 3432fe6a06c81..2b3190159ecd1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SysuiStatusBarStateController.java @@ -25,7 +25,7 @@ import android.view.WindowInsetsController.Appearance; import android.view.WindowInsetsController.Behavior; import com.android.systemui.plugins.statusbar.StatusBarStateController; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import java.lang.annotation.Retention; @@ -92,7 +92,7 @@ public interface SysuiStatusBarStateController extends StatusBarStateController int getCurrentOrUpcomingState(); /** - * Update the dozing state from {@link CentralSurfacesInt}'s perspective + * Update the dozing state from {@link CentralSurfaces}'s perspective * @param isDozing well, are we dozing? * @return {@code true} if the state changed, else {@code false} */ @@ -117,7 +117,7 @@ public interface SysuiStatusBarStateController extends StatusBarStateController void setAndInstrumentDozeAmount(View view, float dozeAmount, boolean animated); /** - * Update the expanded state from {@link CentralSurfacesInt}'s perspective + * Update the expanded state from {@link CentralSurfaces}'s perspective * @param expanded are we expanded? * @return {@code true} if the state changed, else {@code false} */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java index fda5b18957593..29411e63b1637 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java @@ -60,7 +60,7 @@ import com.android.systemui.statusbar.notification.collection.legacy.Notificatio import com.android.systemui.statusbar.notification.collection.legacy.VisualStabilityManager; import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.CentralSurfacesImpl; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.ManagedProfileController; @@ -106,7 +106,7 @@ public interface CentralSurfacesDependenciesModule { NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, RemoteInputNotificationRebuilder rebuilder, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, StatusBarStateController statusBarStateController, Handler mainHandler, RemoteInputUriController remoteInputUriController, @@ -135,7 +135,7 @@ public interface CentralSurfacesDependenciesModule { @Provides static NotificationMediaManager provideNotificationMediaManager( Context context, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, Lazy notificationShadeWindowController, NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StartCentralSurfacesModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StartCentralSurfacesModule.kt index bf404af96005c..e84d31dd6a0ff 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StartCentralSurfacesModule.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StartCentralSurfacesModule.kt @@ -17,7 +17,7 @@ package com.android.systemui.statusbar.dagger import com.android.systemui.CoreStartable -import com.android.systemui.statusbar.phone.CentralSurfacesInt +import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.CentralSurfacesImpl import dagger.Binds import dagger.Module @@ -29,6 +29,6 @@ interface StartCentralSurfacesModule { /** Start the CentralSurfaces */ @Binds @IntoMap - @ClassKey(CentralSurfacesInt::class) + @ClassKey(CentralSurfaces::class) abstract fun bindsCentralSurfaces(centralSurfaces: CentralSurfacesImpl): CoreStartable } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java index 633f5c5c8b6b6..392145ad306a1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java @@ -24,7 +24,7 @@ import android.view.View; import com.android.systemui.DejankUtils; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.wm.shell.bubbles.Bubbles; import java.util.Optional; @@ -39,7 +39,7 @@ public final class NotificationClicker implements View.OnClickListener { private static final String TAG = "NotificationClicker"; private final NotificationClickerLogger mLogger; - private final Optional mCentralSurfacesOptional; + private final Optional mCentralSurfacesOptional; private final Optional mBubblesOptional; private final NotificationActivityStarter mNotificationActivityStarter; @@ -53,7 +53,7 @@ public final class NotificationClicker implements View.OnClickListener { private NotificationClicker( NotificationClickerLogger logger, - Optional centralSurfacesOptional, + Optional centralSurfacesOptional, Optional bubblesOptional, NotificationActivityStarter notificationActivityStarter) { mLogger = logger; @@ -137,7 +137,7 @@ public final class NotificationClicker implements View.OnClickListener { /** Builds an instance. */ public NotificationClicker build( - Optional centralSurfacesOptional, + Optional centralSurfacesOptional, Optional bubblesOptional, NotificationActivityStarter notificationActivityStarter ) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/TargetSdkResolver.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/TargetSdkResolver.kt index 2401ffd12c7d2..c71eade79cdff 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/TargetSdkResolver.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/TargetSdkResolver.kt @@ -23,7 +23,7 @@ import android.util.Log import com.android.systemui.dagger.SysUISingleton import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener -import com.android.systemui.statusbar.phone.CentralSurfacesInt +import com.android.systemui.statusbar.phone.CentralSurfaces import javax.inject.Inject @SysUISingleton @@ -39,7 +39,7 @@ class TargetSdkResolver @Inject constructor( } private fun resolveNotificationSdk(sbn: StatusBarNotification): Int { - val pmUser = CentralSurfacesInt.getPackageManagerForUser(context, sbn.user.identifier) + val pmUser = CentralSurfaces.getPackageManagerForUser(context, sbn.user.identifier) var targetSdk = 0 // Extract target SDK version. try { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/LegacyNotificationPresenterExtensions.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/LegacyNotificationPresenterExtensions.java index cf1e97de6d925..bdbb0eb48e8a4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/LegacyNotificationPresenterExtensions.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/LegacyNotificationPresenterExtensions.java @@ -16,7 +16,7 @@ package com.android.systemui.statusbar.notification.collection.legacy; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.SPEW; +import static com.android.systemui.statusbar.phone.CentralSurfaces.SPEW; import android.service.notification.StatusBarNotification; import android.util.Log; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java index 02d6740338e7f..34c8044ef0d3f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java @@ -84,7 +84,7 @@ import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.OnUserInteractionCallback; import com.android.systemui.statusbar.notification.stack.NotificationSectionsManager; import com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.NotifActivityLaunchEventsModule; import com.android.systemui.statusbar.phone.NotifPanelEventsModule; @@ -153,7 +153,7 @@ public interface NotificationsModule { @Provides static NotificationGutsManager provideNotificationGutsManager( Context context, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, @Main Handler mainHandler, @Background Handler bgHandler, AccessibilityManager accessibilityManager, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt index 7e2470fd1e2cf..11ffde6257984 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/init/NotificationsControllerImpl.kt @@ -43,7 +43,7 @@ import com.android.systemui.statusbar.notification.interruption.HeadsUpControlle import com.android.systemui.statusbar.notification.interruption.HeadsUpViewBinder import com.android.systemui.statusbar.notification.row.NotifBindPipelineInitializer import com.android.systemui.statusbar.notification.stack.NotificationListContainer -import com.android.systemui.statusbar.phone.CentralSurfacesInt +import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.NotificationGroupAlertTransferHelper import com.android.systemui.statusbar.policy.DeviceProvisionedController import com.android.systemui.statusbar.policy.HeadsUpManager @@ -63,7 +63,7 @@ import javax.inject.Inject */ @SysUISingleton class NotificationsControllerImpl @Inject constructor( - private val centralSurfaces: Lazy, + private val centralSurfaces: Lazy, private val notifPipelineFlags: NotifPipelineFlags, private val notificationListener: NotificationListener, private val entryManager: NotificationEntryManager, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index cbe6c271a4ad3..0ae365352df05 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -112,7 +112,7 @@ import com.android.systemui.statusbar.notification.stack.ExpandableViewState; import com.android.systemui.statusbar.notification.stack.NotificationChildrenContainer; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout; import com.android.systemui.statusbar.notification.stack.SwipeableView; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.InflatedSmartReplyState; @@ -398,7 +398,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView return isSystem; } else { - PackageManager packageManager = CentralSurfacesInt.getPackageManagerForUser( + PackageManager packageManager = CentralSurfaces.getPackageManagerForUser( context, sbn.getUser().getIdentifier()); Boolean isSystemNotification = null; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java index 2e7febe22040f..4c693045bc881 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java @@ -47,7 +47,7 @@ import com.android.systemui.statusbar.notification.ConversationNotificationProce import com.android.systemui.statusbar.notification.InflationException; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.wrapper.NotificationViewWrapper; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.policy.InflatedSmartReplyState; import com.android.systemui.statusbar.policy.InflatedSmartReplyViewHolder; import com.android.systemui.statusbar.policy.SmartReplyStateInflater; @@ -841,7 +841,7 @@ public class NotificationContentInflater implements NotificationRowContentBinder StatusBarNotification sbn = mEntry.getSbn(); final String ident = sbn.getPackageName() + "/0x" + Integer.toHexString(sbn.getId()); - Log.e(CentralSurfacesInt.TAG, "couldn't inflate view for notification " + ident, e); + Log.e(CentralSurfaces.TAG, "couldn't inflate view for notification " + ident, e); if (mCallback != null) { mCallback.handleInflationException(mRow.getEntry(), new InflationException("Couldn't inflate contentViews" + e)); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java index 917e84a94d24d..8a7155ac72d0e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java @@ -70,7 +70,7 @@ import com.android.systemui.statusbar.notification.collection.render.NotifGutsVi import com.android.systemui.statusbar.notification.dagger.NotificationsModule; import com.android.systemui.statusbar.notification.row.NotificationInfo.CheckSaveListener; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.wmshell.BubblesManager; @@ -119,7 +119,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx @VisibleForTesting protected String mKeyToRemoveOnGutsClosed; - private final Lazy> mCentralSurfacesOptionalLazy; + private final Lazy> mCentralSurfacesOptionalLazy; private final Handler mMainHandler; private final Handler mBgHandler; private final Optional mBubblesManagerOptional; @@ -138,7 +138,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx * Injected constructor. See {@link NotificationsModule}. */ public NotificationGutsManager(Context context, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, @Main Handler mainHandler, @Background Handler bgHandler, AccessibilityManager accessibilityManager, @@ -341,7 +341,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx } StatusBarNotification sbn = row.getEntry().getSbn(); UserHandle userHandle = sbn.getUser(); - PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser(mContext, + PackageManager pmUser = CentralSurfaces.getPackageManagerForUser(mContext, userHandle.getIdentifier()); feedbackInfo.bindGuts(pmUser, sbn, row.getEntry(), row, mAssistantFeedbackController); @@ -362,7 +362,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx // Settings link is only valid for notifications that specify a non-system user NotificationInfo.OnSettingsClickListener onSettingsClick = null; UserHandle userHandle = sbn.getUser(); - PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser( + PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( mContext, userHandle.getIdentifier()); final NotificationInfo.OnAppSettingsClickListener onAppSettingsClick = (View v, Intent intent) -> { @@ -415,7 +415,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx // Settings link is only valid for notifications that specify a non-system user NotificationInfo.OnSettingsClickListener onSettingsClick = null; UserHandle userHandle = sbn.getUser(); - PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser( + PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( mContext, userHandle.getIdentifier()); if (!userHandle.equals(UserHandle.ALL) @@ -457,7 +457,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx // Settings link is only valid for notifications that specify a non-system user NotificationConversationInfo.OnSettingsClickListener onSettingsClick = null; UserHandle userHandle = sbn.getUser(); - PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser( + PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( mContext, userHandle.getIdentifier()); final NotificationConversationInfo.OnAppSettingsClickListener onAppSettingsClick = (View v, Intent intent) -> { @@ -570,7 +570,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx .setLeaveOpenOnKeyguardHide(true); } - Optional centralSurfacesOptional = + Optional centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); if (centralSurfacesOptional.isPresent()) { Runnable r = () -> mMainHandler.post( @@ -584,7 +584,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx return true; } /** - * When {@link CentralSurfacesInt} doesn't exist, falling through to call + * When {@link CentralSurfaces} doesn't exist, falling through to call * {@link #openGutsInternal(View,int,int,NotificationMenuRowPlugin.MenuItem)}. */ } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/dagger/ExpandableNotificationRowComponent.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/dagger/ExpandableNotificationRowComponent.java index c871c4bd5103d..1a7417a781865 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/dagger/ExpandableNotificationRowComponent.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/dagger/ExpandableNotificationRowComponent.java @@ -26,7 +26,7 @@ import com.android.systemui.statusbar.notification.row.ActivatableNotificationVi import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRowController; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import dagger.Binds; import dagger.BindsInstance; @@ -100,7 +100,7 @@ public interface ExpandableNotificationRowComponent { // but since this field is used in the guts, it must be accurate. // Therefore we will only show the application label, or, failing that, the // package name. No substitutions. - PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser( + PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( context, statusBarNotification.getUser().getIdentifier()); final String pkg = statusBarNotification.getPackageName(); try { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index eb4d3c7161d18..bf27550b331be 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -100,7 +100,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.statusbar.notification.row.ExpandableView; import com.android.systemui.statusbar.notification.row.FooterView; import com.android.systemui.statusbar.notification.row.StackScrollerDecorView; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.HeadsUpAppearanceController; import com.android.systemui.statusbar.phone.HeadsUpTouchHelper; import com.android.systemui.statusbar.phone.ScreenOffAnimationController; @@ -305,7 +305,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } }; private NotificationStackScrollLogger mLogger; - private CentralSurfacesInt mCentralSurfaces; + private CentralSurfaces mCentralSurfaces; private int[] mTempInt2 = new int[2]; private boolean mGenerateChildOrderChangedEvent; private HashSet mAnimationFinishedRunnables = new HashSet<>(); @@ -4579,7 +4579,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) - public void setCentralSurfaces(CentralSurfacesInt centralSurfaces) { + public void setCentralSurfaces(CentralSurfaces centralSurfaces) { this.mCentralSurfaces = centralSurfaces; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java index ea4ea3264cfa8..ae1fd2b180e5c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java @@ -109,7 +109,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableView; import com.android.systemui.statusbar.notification.row.NotificationGuts; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.NotificationSnooze; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.HeadsUpAppearanceController; import com.android.systemui.statusbar.phone.HeadsUpManagerPhone; import com.android.systemui.statusbar.phone.HeadsUpTouchHelper; @@ -175,7 +175,7 @@ public class NotificationStackScrollLayoutController { private final KeyguardBypassController mKeyguardBypassController; private final NotificationLockscreenUserManager mLockscreenUserManager; // TODO: CentralSurfaces should be encapsulated behind a Controller - private final CentralSurfacesInt mCentralSurfaces; + private final CentralSurfaces mCentralSurfaces; private final SectionHeaderController mSilentHeaderController; private final LockscreenShadeTransitionController mLockscreenShadeTransitionController; private final InteractionJankMonitor mJankMonitor; @@ -637,7 +637,7 @@ public class NotificationStackScrollLayoutController { FalsingManager falsingManager, @Main Resources resources, NotificationSwipeHelper.Builder notificationSwipeHelperBuilder, - CentralSurfacesInt centralSurfaces, + CentralSurfaces centralSurfaces, ScrimController scrimController, NotificationGroupManagerLegacy legacyGroupManager, GroupExpansionManager groupManager, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java index c722b2d9a73b9..c1869e0575ed6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java @@ -699,7 +699,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp public void run() { mNotificationShadeWindowController.setForceDozeBrightness(false); } - }, CentralSurfacesInt.FADE_KEYGUARD_DURATION_PULSING); + }, CentralSurfaces.FADE_KEYGUARD_DURATION_PULSING); } public void finishKeyguardFadingAway() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesInt.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java similarity index 99% rename from packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesInt.java rename to packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java index ccce0ef8df8c4..39d6b6ef2c8c7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesInt.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java @@ -54,7 +54,7 @@ import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import java.io.PrintWriter; -public interface CentralSurfacesInt extends Dumpable, ActivityStarter, LifecycleOwner { +public interface CentralSurfaces extends Dumpable, ActivityStarter, LifecycleOwner { boolean MULTIUSER_DEBUG = false; // Should match the values in PhoneWindowManager String SYSTEM_DIALOG_REASON_KEY = "reason"; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java index 04242fc7c9c28..9060d5f67913a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java @@ -72,7 +72,7 @@ import javax.inject.Inject; /** */ @CentralSurfacesComponent.CentralSurfacesScope public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callbacks { - private final CentralSurfacesInt mCentralSurfaces; + private final CentralSurfaces mCentralSurfaces; private final Context mContext; private final ShadeController mShadeController; private final CommandQueue mCommandQueue; @@ -106,7 +106,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba @Inject CentralSurfacesCommandQueueCallbacks( - CentralSurfacesInt centralSurfaces, + CentralSurfaces centralSurfaces, Context context, @Main Resources resources, ShadeController shadeController, @@ -207,8 +207,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba @Override public void animateExpandNotificationsPanel() { - if (CentralSurfacesInt.SPEW) { - Log.d(CentralSurfacesInt.TAG, + if (CentralSurfaces.SPEW) { + Log.d(CentralSurfaces.TAG, "animateExpand: mExpandedVisible=" + mCentralSurfaces.isExpandedVisible()); } if (!mCommandQueue.panelsEnabled()) { @@ -220,8 +220,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba @Override public void animateExpandSettingsPanel(@Nullable String subPanel) { - if (CentralSurfacesInt.SPEW) { - Log.d(CentralSurfacesInt.TAG, + if (CentralSurfaces.SPEW) { + Log.d(CentralSurfaces.TAG, "animateExpand: mExpandedVisible=" + mCentralSurfaces.isExpandedVisible()); } if (!mCommandQueue.panelsEnabled()) { @@ -244,7 +244,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba @Override public void dismissKeyboardShortcutsMenu() { - mCentralSurfaces.resendMessage(CentralSurfacesInt.MSG_DISMISS_KEYBOARD_SHORTCUTS_MENU); + mCentralSurfaces.resendMessage(CentralSurfaces.MSG_DISMISS_KEYBOARD_SHORTCUTS_MENU); } /** * State is one or more of the DISABLE constants from StatusBarManager. @@ -257,7 +257,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba int state2BeforeAdjustment = state2; state2 = mRemoteInputQuickSettingsDisabler.adjustDisableFlags(state2); - Log.d(CentralSurfacesInt.TAG, + Log.d(CentralSurfaces.TAG, mDisableFlagsLogger.getDisableFlagsString( /* old= */ new DisableFlagsLogger.DisableState( mCentralSurfaces.getDisabled1(), mCentralSurfaces.getDisabled2()), @@ -306,8 +306,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba */ @Override public void handleSystemKey(int key) { - if (CentralSurfacesInt.SPEW) { - Log.d(CentralSurfacesInt.TAG, "handleNavigationKey: " + key); + if (CentralSurfaces.SPEW) { + Log.d(CentralSurfaces.TAG, "handleNavigationKey: " + key); } if (!mCommandQueue.panelsEnabled() || !mKeyguardUpdateMonitor.isDeviceInteractive() || mKeyguardStateController.isShowing() && !mKeyguardStateController.isOccluded()) { @@ -345,15 +345,15 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba public void onCameraLaunchGestureDetected(int source) { mCentralSurfaces.setLastCameraLaunchSource(source); if (mCentralSurfaces.isGoingToSleep()) { - if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) { - Slog.d(CentralSurfacesInt.TAG, "Finish going to sleep before launching camera"); + if (CentralSurfaces.DEBUG_CAMERA_LIFT) { + Slog.d(CentralSurfaces.TAG, "Finish going to sleep before launching camera"); } mCentralSurfaces.setLaunchCameraOnFinishedGoingToSleep(true); return; } if (!mNotificationPanelViewController.canCameraGestureBeLaunched()) { - if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) { - Slog.d(CentralSurfacesInt.TAG, "Can't launch camera right now"); + if (CentralSurfaces.DEBUG_CAMERA_LIFT) { + Slog.d(CentralSurfaces.TAG, "Can't launch camera right now"); } return; } @@ -364,7 +364,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba vibrateForCameraGesture(); if (source == StatusBarManager.CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP) { - Log.v(CentralSurfacesInt.TAG, "Camera launch"); + Log.v(CentralSurfaces.TAG, "Camera launch"); mKeyguardUpdateMonitor.onCameraLaunched(); } @@ -379,11 +379,11 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba // Avoid flickering of the scrim when we instant launch the camera and the bouncer // comes on. mCentralSurfaces.acquireGestureWakeLock( - CentralSurfacesInt.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L); + CentralSurfaces.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L); } if (isWakingUpOrAwake()) { - if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) { - Slog.d(CentralSurfacesInt.TAG, "Launching camera"); + if (CentralSurfaces.DEBUG_CAMERA_LIFT) { + Slog.d(CentralSurfaces.TAG, "Launching camera"); } if (mStatusBarKeyguardViewManager.isBouncerShowing()) { mStatusBarKeyguardViewManager.reset(true /* hide */); @@ -396,8 +396,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba // we will dismiss us too early since we are waiting on an activity to be drawn and // incorrectly get notified because of the screen on event (which resumes and pauses // some activities) - if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) { - Slog.d(CentralSurfacesInt.TAG, "Deferring until screen turns on"); + if (CentralSurfaces.DEBUG_CAMERA_LIFT) { + Slog.d(CentralSurfaces.TAG, "Deferring until screen turns on"); } mCentralSurfaces.setLaunchCameraOnFinishedWaking(true); } @@ -409,7 +409,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba Intent emergencyIntent = mCentralSurfaces.getEmergencyActionIntent(); if (emergencyIntent == null) { - Log.wtf(CentralSurfacesInt.TAG, "Couldn't find an app to process the emergency intent."); + Log.wtf(CentralSurfaces.TAG, "Couldn't find an app to process the emergency intent."); return; } @@ -438,7 +438,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba // Avoid flickering of the scrim when we instant launch the camera and the bouncer // comes on. mCentralSurfaces.acquireGestureWakeLock( - CentralSurfacesInt.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L); + CentralSurfaces.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L); } if (isWakingUpOrAwake()) { @@ -492,7 +492,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba @Override public void toggleKeyboardShortcutsMenu(int deviceId) { - mCentralSurfaces.resendMessage(new CentralSurfacesInt.KeyboardShortcutsMessage(deviceId)); + mCentralSurfaces.resendMessage(new CentralSurfaces.KeyboardShortcutsMessage(deviceId)); } @Override @@ -580,8 +580,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba // Make sure to pass -1 for repeat so VibratorManagerService doesn't stop us when going // to sleep. return VibrationEffect.createWaveform( - CentralSurfacesInt.CAMERA_LAUNCH_GESTURE_VIBRATION_TIMINGS, - CentralSurfacesInt.CAMERA_LAUNCH_GESTURE_VIBRATION_AMPLITUDES, + CentralSurfaces.CAMERA_LAUNCH_GESTURE_VIBRATION_TIMINGS, + CentralSurfaces.CAMERA_LAUNCH_GESTURE_VIBRATION_AMPLITUDES, /* repeat= */ -1); } 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 306ac0c7afa67..18092dccbd53b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -271,7 +271,7 @@ import dagger.Lazy; */ @SysUISingleton public class CentralSurfacesImpl extends CoreStartable implements - CentralSurfacesInt { + CentralSurfaces { private static final String BANNER_ACTION_CANCEL = "com.android.systemui.statusbar.banner_action_cancel"; @@ -1748,7 +1748,7 @@ public class CentralSurfacesImpl extends CoreStartable implements .create(mContext) .addNextIntent(intent) .startActivities( - CentralSurfacesInt.getActivityOptions(getDisplayId(), adapter), + CentralSurfaces.getActivityOptions(getDisplayId(), adapter), userHandle)); } @@ -2265,8 +2265,8 @@ public class CentralSurfacesImpl extends CoreStartable implements pw.println("Current Status Bar state:"); pw.println(" mExpandedVisible=" + mExpandedVisible); pw.println(" mDisplayMetrics=" + mDisplayMetrics); - pw.println(" mStackScroller: " + CentralSurfacesInt.viewInfo(mStackScroller)); - pw.println(" mStackScroller: " + CentralSurfacesInt.viewInfo(mStackScroller) + pw.println(" mStackScroller: " + CentralSurfaces.viewInfo(mStackScroller)); + pw.println(" mStackScroller: " + CentralSurfaces.viewInfo(mStackScroller) + " scroll " + mStackScroller.getScrollX() + "," + mStackScroller.getScrollY()); } @@ -2282,7 +2282,7 @@ public class CentralSurfacesImpl extends CoreStartable implements pw.println(" ShadeWindowView: "); if (mNotificationShadeWindowViewController != null) { mNotificationShadeWindowViewController.dump(pw, args); - CentralSurfacesInt.dumpBarTransitions( + CentralSurfaces.dumpBarTransitions( pw, "PhoneStatusBarTransitions", mStatusBarTransitions); } @@ -2461,7 +2461,7 @@ public class CentralSurfacesImpl extends CoreStartable implements mActivityLaunchAnimator.startIntentWithAnimation(animController, animate, intent.getPackage(), (adapter) -> { ActivityOptions options = new ActivityOptions( - CentralSurfacesInt.getActivityOptions(mDisplayId, adapter)); + CentralSurfaces.getActivityOptions(mDisplayId, adapter)); options.setDisallowEnterPictureInPictureWhileLaunching( disallowEnterPictureInPictureWhileLaunching); if (CameraIntents.isInsecureCameraIntent(intent)) { @@ -4092,7 +4092,7 @@ public class CentralSurfacesImpl extends CoreStartable implements controller, animate, intent.getCreatorPackage(), (animationAdapter) -> { ActivityOptions options = new ActivityOptions( - CentralSurfacesInt.getActivityOptions( + CentralSurfaces.getActivityOptions( mDisplayId, animationAdapter)); // TODO b/221255671: restrict this to only be set for notifications options.setEligibleForLegacyPermissionPrompt(true); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java index b28d125974505..55b310ff986da 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java @@ -97,7 +97,7 @@ public final class DozeServiceHost implements DozeHost { private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private NotificationPanelViewController mNotificationPanel; private View mAmbientIndicationContainer; - private CentralSurfacesInt mCentralSurfaces; + private CentralSurfaces mCentralSurfaces; private boolean mAlwaysOnSuppressed; @Inject @@ -146,7 +146,7 @@ public final class DozeServiceHost implements DozeHost { * Initialize instance with objects only available later during execution. */ public void initialize( - CentralSurfacesInt centralSurfaces, + CentralSurfaces centralSurfaces, StatusBarKeyguardViewManager statusBarKeyguardViewManager, NotificationShadeWindowViewController notificationShadeWindowViewController, NotificationPanelViewController notificationPanel, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java index a3563ac36f320..347e05cc7f75c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java @@ -168,7 +168,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL private FlashlightController mFlashlightController; private PreviewInflater mPreviewInflater; private AccessibilityController mAccessibilityController; - private CentralSurfacesInt mCentralSurfaces; + private CentralSurfaces mCentralSurfaces; private KeyguardAffordanceHelper mAffordanceHelper; private FalsingManager mFalsingManager; private boolean mUserSetupComplete; @@ -472,7 +472,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL mRightAffordanceView.setContentDescription(state.contentDescription); } - public void setCentralSurfaces(CentralSurfacesInt centralSurfaces) { + public void setCentralSurfaces(CentralSurfaces centralSurfaces) { mCentralSurfaces = centralSurfaces; updateCameraVisibility(); // in case onFinishInflate() was called too early } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardEnvironmentImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardEnvironmentImpl.java index 1368bfc8f7bab..2c4fc6c6f7349 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardEnvironmentImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardEnvironmentImpl.java @@ -14,8 +14,8 @@ package com.android.systemui.statusbar.phone; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.DEBUG; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.MULTIUSER_DEBUG; +import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG; +import static com.android.systemui.statusbar.phone.CentralSurfaces.MULTIUSER_DEBUG; import android.service.notification.StatusBarNotification; import android.util.Log; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index 6f1b0ef0b5cbe..adf70a255b4ff 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -1070,7 +1070,7 @@ public class NotificationPanelViewController extends PanelViewController { return mKeyguardStatusViewController.hasCustomClock(); } - private void setCentralSurfaces(CentralSurfacesInt centralSurfaces) { + private void setCentralSurfaces(CentralSurfaces centralSurfaces) { // TODO: this can be injected. mCentralSurfaces = centralSurfaces; mKeyguardBottomArea.setCentralSurfaces(mCentralSurfaces); @@ -3906,7 +3906,7 @@ public class NotificationPanelViewController extends PanelViewController { * @param hideExpandedRunnable a runnable to run when we need to hide the expanded panel. */ public void initDependencies( - CentralSurfacesInt centralSurfaces, + CentralSurfaces centralSurfaces, Runnable hideExpandedRunnable, NotificationShelfController notificationShelfController) { setCentralSurfaces(centralSurfaces); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java index 285ddb3bb4d33..24660b261c519 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImpl.java @@ -850,7 +850,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW Set mComponentsForcingTopUi = new HashSet<>(); /** - * The status bar state from {@link CentralSurfacesInt}. + * The status bar state from {@link CentralSurfaces}. */ int mStatusBarState; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java index 195fe15980dab..1e3a02b0606b9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java @@ -58,7 +58,7 @@ import com.android.systemui.R; */ public class NotificationShadeWindowView extends FrameLayout { public static final String TAG = "NotificationShadeWindowView"; - public static final boolean DEBUG = CentralSurfacesInt.DEBUG; + public static final boolean DEBUG = CentralSurfaces.DEBUG; private int mRightInset = 0; private int mLeftInset = 0; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java index 558368ba22db9..be5b33eb0da0c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java @@ -82,7 +82,7 @@ public class NotificationShadeWindowViewController { private boolean mExpandAnimationRunning; private NotificationStackScrollLayout mStackScrollLayout; private PhoneStatusBarViewController mStatusBarViewController; - private final CentralSurfacesInt mService; + private final CentralSurfaces mService; private final NotificationShadeWindowController mNotificationShadeWindowController; private DragDownHelper mDragDownHelper; private boolean mDoubleTapEnabled; @@ -111,7 +111,7 @@ public class NotificationShadeWindowViewController { StatusBarWindowStateController statusBarWindowStateController, LockIconViewController lockIconViewController, Optional lowLightClockController, - CentralSurfacesInt centralSurfaces, + CentralSurfaces centralSurfaces, NotificationShadeWindowController controller, KeyguardUnlockAnimationController keyguardUnlockAnimationController, AmbientState ambientState) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java index 711582085d624..45dc943de2f87 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -27,7 +27,7 @@ public abstract class PanelView extends FrameLayout { public static final String TAG = PanelView.class.getSimpleName(); private PanelViewController.TouchHandler mTouchHandler; - protected CentralSurfacesInt mCentralSurfaces; + protected CentralSurfaces mCentralSurfaces; protected HeadsUpManagerPhone mHeadsUpManager; protected KeyguardBottomAreaView mKeyguardBottomArea; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java index 727ad796e7992..bdbc670d7335a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java @@ -112,7 +112,7 @@ public abstract class PanelViewController { Log.v(TAG, (mViewName != null ? (mViewName + ": ") : "") + String.format(fmt, args)); } - protected CentralSurfacesInt mCentralSurfaces; + protected CentralSurfaces mCentralSurfaces; protected HeadsUpManagerPhone mHeadsUpManager; protected final StatusBarTouchableRegionManager mStatusBarTouchableRegionManager; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScreenOffAnimationController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScreenOffAnimationController.kt index 392228cd26717..c8174669cc653 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScreenOffAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScreenOffAnimationController.kt @@ -37,7 +37,7 @@ class ScreenOffAnimationController @Inject constructor( private val animations: List = listOfNotNull(foldToAodAnimation, unlockedScreenOffAnimation) - fun initialize(centralSurfaces: CentralSurfacesInt, lightRevealScrim: LightRevealScrim) { + fun initialize(centralSurfaces: CentralSurfaces, lightRevealScrim: LightRevealScrim) { animations.forEach { it.initialize(centralSurfaces, lightRevealScrim) } wakefulnessLifecycle.addObserver(this) } @@ -197,7 +197,7 @@ class ScreenOffAnimationController @Inject constructor( } interface ScreenOffAnimation { - fun initialize(centralSurfaces: CentralSurfacesInt, lightRevealScrim: LightRevealScrim) {} + fun initialize(centralSurfaces: CentralSurfaces, lightRevealScrim: LightRevealScrim) {} /** * Called when started going to sleep, should return true if the animation will be played diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java index 72c0b9a37d297..f9e17da9773f5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -437,7 +437,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump } if (mKeyguardUpdateMonitor.needsSlowUnlockTransition() && mState == ScrimState.UNLOCKED) { - mAnimationDelay = CentralSurfacesInt.FADE_KEYGUARD_START_DELAY; + mAnimationDelay = CentralSurfaces.FADE_KEYGUARD_START_DELAY; scheduleUpdate(); } else if (((oldState == ScrimState.AOD || oldState == ScrimState.PULSING) // leaving doze && (!mDozeParameters.getAlwaysOn() || mState == ScrimState.UNLOCKED)) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java index 27fde94f6b9b1..47b705845fceb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java @@ -238,7 +238,7 @@ public enum ScrimState { mAnimationDuration = mKeyguardFadingAway ? mKeyguardFadingAwayDuration - : CentralSurfacesInt.FADE_KEYGUARD_DURATION; + : CentralSurfaces.FADE_KEYGUARD_DURATION; boolean fromAod = previousState == AOD || previousState == PULSING; mAnimateChange = !mLaunchingAffordanceWithPreview && !fromAod; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeController.java index 705360ceb0ade..83ee125f84c27 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeController.java @@ -18,7 +18,7 @@ import com.android.systemui.statusbar.StatusBarState; /** * {@link ShadeController} is an abstraction of the work that used to be hard-coded in - * {@link CentralSurfacesInt}. The shade itself represents the concept of the status bar window state, + * {@link CentralSurfaces}. The shade itself represents the concept of the status bar window state, * and can be in multiple states: dozing, locked, showing the bouncer, occluded, etc. All/some of * these are coordinated with {@link StatusBarKeyguardViewManager} via * {@link com.android.systemui.keyguard.KeyguardViewMediator} and others. @@ -38,7 +38,7 @@ public interface ShadeController { /** * Collapse the shade animated, showing the bouncer when on {@link StatusBarState#KEYGUARD} or - * dismissing {@link CentralSurfacesInt} when on {@link StatusBarState#SHADE}. + * dismissing {@link CentralSurfaces} when on {@link StatusBarState#SHADE}. */ void animateCollapsePanels(int flags, boolean force); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeControllerImpl.java index ce33c57c8f751..cee8b335f380d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadeControllerImpl.java @@ -47,7 +47,7 @@ public class ShadeControllerImpl implements ShadeController { protected final NotificationShadeWindowController mNotificationShadeWindowController; private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private final int mDisplayId; - protected final Lazy> mCentralSurfacesOptionalLazy; + protected final Lazy> mCentralSurfacesOptionalLazy; private final Lazy mAssistManagerLazy; private final ArrayList mPostCollapseRunnables = new ArrayList<>(); @@ -59,7 +59,7 @@ public class ShadeControllerImpl implements ShadeController { NotificationShadeWindowController notificationShadeWindowController, StatusBarKeyguardViewManager statusBarKeyguardViewManager, WindowManager windowManager, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, Lazy assistManagerLazy ) { mCommandQueue = commandQueue; @@ -208,7 +208,7 @@ public class ShadeControllerImpl implements ShadeController { } } - private CentralSurfacesInt getCentralSurfaces() { + private CentralSurfaces getCentralSurfaces() { return mCentralSurfacesOptionalLazy.get().get(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeadsUpChangeListener.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeadsUpChangeListener.java index 10a21426ff210..50f21691b0447 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeadsUpChangeListener.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeadsUpChangeListener.java @@ -29,7 +29,7 @@ import com.android.systemui.statusbar.window.StatusBarWindowController; import javax.inject.Inject; /** - * Ties the {@link CentralSurfacesInt} to {@link com.android.systemui.statusbar.policy.HeadsUpManager}. + * Ties the {@link CentralSurfaces} to {@link com.android.systemui.statusbar.policy.HeadsUpManager}. */ @CentralSurfacesComponent.CentralSurfacesScope public class StatusBarHeadsUpChangeListener implements OnHeadsUpChangedListener { 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 77eacb67b5d0a..052a4f7c5f7cf 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -187,7 +187,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb protected LockPatternUtils mLockPatternUtils; protected ViewMediatorCallback mViewMediatorCallback; - protected CentralSurfacesInt mCentralSurfaces; + protected CentralSurfaces mCentralSurfaces; private NotificationPanelViewController mNotificationPanelViewController; private BiometricUnlockController mBiometricUnlockController; @@ -289,7 +289,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } @Override - public void registerCentralSurfaces(CentralSurfacesInt centralSurfaces, + public void registerCentralSurfaces(CentralSurfaces centralSurfaces, NotificationPanelViewController notificationPanelViewController, PanelExpansionStateManager panelExpansionStateManager, BiometricUnlockController biometricUnlockController, @@ -667,7 +667,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } /** - * If {@link CentralSurfacesInt} is pulsing. + * If {@link CentralSurfaces} is pulsing. */ public void setPulsing(boolean pulsing) { if (mPulsing != pulsing) { 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 a44d08afc3d29..56b6dfc42ee35 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt @@ -10,7 +10,7 @@ import com.android.systemui.animation.LaunchAnimator */ class StatusBarLaunchAnimatorController( private val delegate: ActivityLaunchAnimator.Controller, - private val centralSurfaces: CentralSurfacesInt, + private val centralSurfaces: CentralSurfaces, 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 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 bddc2df3fb619..87ca942edff2c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java @@ -18,7 +18,7 @@ package com.android.systemui.statusbar.phone; import static android.service.notification.NotificationListenerService.REASON_CLICK; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.getActivityOptions; +import static com.android.systemui.statusbar.phone.CentralSurfaces.getActivityOptions; import android.app.ActivityManager; import android.app.KeyguardManager; @@ -125,7 +125,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte private final MetricsLogger mMetricsLogger; private final StatusBarNotificationActivityStarterLogger mLogger; - private final CentralSurfacesInt mCentralSurfaces; + private final CentralSurfaces mCentralSurfaces; private final NotificationPresenter mPresenter; private final NotificationPanelViewController mNotificationPanel; private final ActivityLaunchAnimator mActivityLaunchAnimator; @@ -166,7 +166,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte MetricsLogger metricsLogger, StatusBarNotificationActivityStarterLogger logger, OnUserInteractionCallback onUserInteractionCallback, - CentralSurfacesInt centralSurfaces, + CentralSurfaces centralSurfaces, NotificationPresenter presenter, NotificationPanelViewController panel, ActivityLaunchAnimator activityLaunchAnimator, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java index ddde1fc192aed..aa061d74f6c6b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java @@ -14,9 +14,9 @@ package com.android.systemui.statusbar.phone; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.CLOSE_PANEL_WHEN_EMPTIED; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.DEBUG; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.MULTIUSER_DEBUG; +import static com.android.systemui.statusbar.phone.CentralSurfaces.CLOSE_PANEL_WHEN_EMPTIED; +import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG; +import static com.android.systemui.statusbar.phone.CentralSurfaces.MULTIUSER_DEBUG; import android.app.KeyguardManager; import android.content.Context; @@ -104,7 +104,7 @@ class StatusBarNotificationPresenter implements NotificationPresenter, private final DozeScrimController mDozeScrimController; private final ScrimController mScrimController; private final KeyguardIndicationController mKeyguardIndicationController; - private final CentralSurfacesInt mCentralSurfaces; + private final CentralSurfaces mCentralSurfaces; private final ShadeController mShadeController; private final LockscreenShadeTransitionController mShadeTransitionController; private final CommandQueue mCommandQueue; @@ -135,7 +135,7 @@ class StatusBarNotificationPresenter implements NotificationPresenter, DynamicPrivacyController dynamicPrivacyController, KeyguardStateController keyguardStateController, KeyguardIndicationController keyguardIndicationController, - CentralSurfacesInt centralSurfaces, + CentralSurfaces centralSurfaces, ShadeController shadeController, LockscreenShadeTransitionController shadeTransitionController, CommandQueue commandQueue, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java index 203f25efdeb24..4e9090080c991 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java @@ -58,7 +58,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable { private boolean mIsStatusBarExpanded = false; private boolean mShouldAdjustInsets = false; - private CentralSurfacesInt mCentralSurfaces; + private CentralSurfaces mCentralSurfaces; private View mNotificationShadeWindowView; private View mNotificationPanelView; private boolean mForceCollapsedUntilLayout = false; @@ -118,7 +118,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable { } protected void setup( - @NonNull CentralSurfacesInt centralSurfaces, + @NonNull CentralSurfaces centralSurfaces, @NonNull View notificationShadeWindowView) { mCentralSurfaces = centralSurfaces; mNotificationShadeWindowView = notificationShadeWindowView; 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 fa7e7c932b2f9..935f87dc82218 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt @@ -60,7 +60,7 @@ class UnlockedScreenOffAnimationController @Inject constructor( private val powerManager: PowerManager, private val handler: Handler = Handler() ) : WakefulnessLifecycle.Observer, ScreenOffAnimation { - private lateinit var mCentralSurfaces: CentralSurfacesInt + private lateinit var mCentralSurfaces: CentralSurfaces /** * Whether or not [initialize] has been called to provide us with the StatusBar, * NotificationPanelViewController, and LightRevealSrim so that we can run the unlocked screen @@ -122,7 +122,7 @@ class UnlockedScreenOffAnimationController @Inject constructor( } override fun initialize( - centralSurfaces: CentralSurfacesInt, + centralSurfaces: CentralSurfaces, lightRevealScrim: LightRevealScrim ) { this.initialized = true diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java index 6af94f374aa3a..942d186e7005d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java @@ -17,7 +17,7 @@ package com.android.systemui.statusbar.phone.dagger; import com.android.systemui.dagger.SysUISingleton; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.CentralSurfacesImpl; import dagger.Binds; @@ -33,5 +33,5 @@ public interface StatusBarPhoneModule { */ @Binds @SysUISingleton - CentralSurfacesInt bindsCentralSurfaces(CentralSurfacesImpl impl); + CentralSurfaces bindsCentralSurfaces(CentralSurfacesImpl impl); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowStateController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowStateController.kt index 2c5251f22d613..60f6df66cb5a0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowStateController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowStateController.kt @@ -25,7 +25,7 @@ import android.util.Log import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.DisplayId import com.android.systemui.statusbar.CommandQueue -import com.android.systemui.statusbar.phone.CentralSurfacesInt +import com.android.systemui.statusbar.phone.CentralSurfaces import javax.inject.Inject /** @@ -80,8 +80,8 @@ class StatusBarWindowStateController @Inject constructor( } windowState = state - if (CentralSurfacesInt.DEBUG_WINDOW_STATE) { - Log.d(CentralSurfacesInt.TAG, "Status bar " + windowStateToString(state)) + if (CentralSurfaces.DEBUG_WINDOW_STATE) { + Log.d(CentralSurfaces.TAG, "Status bar " + windowStateToString(state)) } listeners.forEach { it.onStatusBarWindowStateChanged(state) } } diff --git a/packages/SystemUI/src/com/android/systemui/unfold/FoldAodAnimationController.kt b/packages/SystemUI/src/com/android/systemui/unfold/FoldAodAnimationController.kt index 010da87083ce2..d6dfceac7a63a 100644 --- a/packages/SystemUI/src/com/android/systemui/unfold/FoldAodAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/unfold/FoldAodAnimationController.kt @@ -26,7 +26,7 @@ import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.keyguard.WakefulnessLifecycle import com.android.systemui.statusbar.LightRevealScrim import com.android.systemui.statusbar.phone.ScreenOffAnimation -import com.android.systemui.statusbar.phone.CentralSurfacesInt +import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.policy.CallbackController import com.android.systemui.unfold.FoldAodAnimationController.FoldAodAnimationStatus import com.android.systemui.util.settings.GlobalSettings @@ -50,7 +50,7 @@ constructor( private val globalSettings: GlobalSettings ) : CallbackController, ScreenOffAnimation, WakefulnessLifecycle.Observer { - private lateinit var mCentralSurfaces: CentralSurfacesInt + private lateinit var mCentralSurfaces: CentralSurfaces private var isFolded = false private var isFoldHandled = true @@ -72,7 +72,7 @@ constructor( } } - override fun initialize(centralSurfaces: CentralSurfacesInt, lightRevealScrim: LightRevealScrim) { + override fun initialize(centralSurfaces: CentralSurfaces, lightRevealScrim: LightRevealScrim) { this.mCentralSurfaces = centralSurfaces deviceStateManager.registerCallback(executor, FoldListener()) diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt index 842d7eeb42d1f..7f8656c1ecbc7 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt @@ -32,7 +32,7 @@ import com.android.systemui.statusbar.NotificationShadeWindowController import com.android.systemui.statusbar.commandline.CommandRegistry import com.android.systemui.statusbar.phone.BiometricUnlockController import com.android.systemui.statusbar.phone.KeyguardBypassController -import com.android.systemui.statusbar.phone.CentralSurfacesInt +import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.policy.ConfigurationController import com.android.systemui.statusbar.policy.KeyguardStateController import com.android.systemui.util.leak.RotationUtils @@ -61,7 +61,7 @@ class AuthRippleControllerTest : SysuiTestCase() { private lateinit var staticMockSession: MockitoSession private lateinit var controller: AuthRippleController - @Mock private lateinit var mCentralSurfaces: CentralSurfacesInt + @Mock private lateinit var mCentralSurfaces: CentralSurfaces @Mock private lateinit var rippleView: AuthRippleView @Mock private lateinit var commandRegistry: CommandRegistry @Mock private lateinit var configurationController: ConfigurationController diff --git a/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java index 8d27916dea507..442e41c9b8d3d 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java @@ -43,7 +43,7 @@ import com.android.internal.logging.UiEventLogger; import com.android.systemui.SysuiTestCase; import com.android.systemui.shared.system.InputChannelCompat; import com.android.systemui.statusbar.NotificationShadeWindowController; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.KeyguardBouncer; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.panelstate.PanelExpansionChangeEvent; @@ -66,7 +66,7 @@ public class BouncerSwipeTouchHandlerTest extends SysuiTestCase { StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; @Mock - CentralSurfacesInt mCentralSurfaces; + CentralSurfaces mCentralSurfaces; @Mock NotificationShadeWindowController mNotificationShadeWindowController; diff --git a/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java b/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java index ee59ccb371d9b..f00fbe6ac4d7b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java @@ -60,7 +60,7 @@ import com.android.systemui.plugins.GlobalActions; import com.android.systemui.settings.UserContextProvider; import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.VibratorHelper; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.telephony.TelephonyListenerManager; @@ -113,7 +113,7 @@ public class GlobalActionsDialogLiteTest extends SysuiTestCase { @Mock private Handler mHandler; @Mock private UserContextProvider mUserContextProvider; @Mock private VibratorHelper mVibratorHelper; - @Mock private CentralSurfacesInt mCentralSurfaces; + @Mock private CentralSurfaces mCentralSurfaces; @Mock private KeyguardUpdateMonitor mKeyguardUpdateMonitor; @Mock private DialogLaunchAnimator mDialogLaunchAnimator; 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 0dd8d9b7fd91f..edcf4791e6b18 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java @@ -47,7 +47,7 @@ import com.android.systemui.assist.AssistManager; import com.android.systemui.dump.DumpManager; import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.settings.UserTracker; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import org.junit.Before; import org.junit.Test; @@ -112,7 +112,7 @@ public class NavBarHelperTest extends SysuiTestCase { mNavBarHelper = new NavBarHelper(mContext, mAccessibilityManager, mAccessibilityButtonModeObserver, mAccessibilityButtonTargetObserver, mSystemActions, mOverviewProxyService, mAssistManagerLazy, - () -> Optional.of(mock(CentralSurfacesInt.class)), + () -> Optional.of(mock(CentralSurfaces.class)), mNavigationModeController, mUserTracker, mDumpManager); } 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 b3dd5685d70b8..4a740f6c55710 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java @@ -91,7 +91,7 @@ import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.phone.AutoHideController; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.LightBarController; import com.android.systemui.statusbar.phone.LightBarTransitionsController; import com.android.systemui.statusbar.phone.NotificationShadeWindowView; @@ -186,7 +186,7 @@ public class NavigationBarTest extends SysuiTestCase { @Mock private DeadZone mDeadZone; @Mock - private CentralSurfacesInt mCentralSurfaces; + private CentralSurfaces mCentralSurfaces; private DeviceConfigProxyFake mDeviceConfigProxyFake = new DeviceConfigProxyFake(); @Rule diff --git a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java index e1b9e09f0313e..91f8a403f3b59 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java @@ -48,7 +48,7 @@ import com.android.systemui.SysuiTestCase; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.power.PowerUI.WarningsUI; import com.android.systemui.statusbar.CommandQueue; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import org.junit.Before; import org.junit.Test; @@ -89,8 +89,8 @@ public class PowerUITest extends SysuiTestCase { private IThermalEventListener mSkinThermalEventListener; @Mock private BroadcastDispatcher mBroadcastDispatcher; @Mock private CommandQueue mCommandQueue; - @Mock private Lazy> mCentralSurfacesOptionalLazy; - @Mock private CentralSurfacesInt mCentralSurfaces; + @Mock private Lazy> mCentralSurfacesOptionalLazy; + @Mock private CentralSurfaces mCentralSurfaces; @Before public void setup() { diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java index 465f1a0533065..a518b808688e4 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java @@ -62,7 +62,7 @@ import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.phone.AutoTileManager; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.policy.ConfigurationController; @@ -135,7 +135,7 @@ public class QSFragmentTest extends SysuiBaseFragmentTest { () -> mock(AutoTileManager.class), mock(DumpManager.class), mock(BroadcastDispatcher.class), - Optional.of(mock(CentralSurfacesInt.class)), + Optional.of(mock(CentralSurfaces.class)), mock(QSLogger.class), mock(UiEventLogger.class), mock(UserTracker.class), diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java index b1b959dbe78e7..8cf3fe274848e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java @@ -65,7 +65,7 @@ import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.statusbar.phone.AutoTileManager; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.tuner.TunerService; import com.android.systemui.util.settings.FakeSettings; @@ -111,7 +111,7 @@ public class QSTileHostTest extends SysuiTestCase { @Mock private QSTile.State mMockState; @Mock - private CentralSurfacesInt mCentralSurfaces; + private CentralSurfaces mCentralSurfaces; @Mock private QSLogger mQSLogger; @Mock @@ -436,7 +436,7 @@ public class QSTileHostTest extends SysuiTestCase { QSFactory defaultFactory, Handler mainHandler, Looper bgLooper, PluginManager pluginManager, TunerService tunerService, Provider autoTiles, DumpManager dumpManager, - BroadcastDispatcher broadcastDispatcher, CentralSurfacesInt centralSurfaces, + BroadcastDispatcher broadcastDispatcher, CentralSurfaces centralSurfaces, QSLogger qsLogger, UiEventLogger uiEventLogger, UserTracker userTracker, SecureSettings secureSettings, CustomTileStatePersister customTileStatePersister, TileServiceRequestController.Builder tileServiceRequestControllerBuilder, diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java index 410055e31b43f..6b7e5b9335f21 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java @@ -48,7 +48,7 @@ import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.phone.AutoTileManager; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.policy.BluetoothController; import com.android.systemui.statusbar.policy.KeyguardStateController; @@ -97,7 +97,7 @@ public class TileServicesTest extends SysuiTestCase { @Mock private DumpManager mDumpManager; @Mock - private CentralSurfacesInt mCentralSurfaces; + private CentralSurfaces mCentralSurfaces; @Mock private QSLogger mQSLogger; @Mock diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ActionProxyReceiverTest.java b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ActionProxyReceiverTest.java index 65da7198b2826..7ab49584f0e39 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/ActionProxyReceiverTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/ActionProxyReceiverTest.java @@ -19,7 +19,7 @@ package com.android.systemui.screenshot; import static com.android.systemui.screenshot.ScreenshotController.ACTION_TYPE_SHARE; import static com.android.systemui.screenshot.ScreenshotController.EXTRA_ID; import static com.android.systemui.screenshot.ScreenshotController.EXTRA_SMART_ACTIONS_ENABLED; -import static com.android.systemui.statusbar.phone.CentralSurfacesInt.SYSTEM_DIALOG_REASON_SCREENSHOT; +import static com.android.systemui.statusbar.phone.CentralSurfaces.SYSTEM_DIALOG_REASON_SCREENSHOT; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; @@ -41,7 +41,7 @@ import androidx.test.filters.SmallTest; import com.android.systemui.SysuiTestCase; import com.android.systemui.shared.system.ActivityManagerWrapper; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import org.junit.Before; import org.junit.Test; @@ -59,7 +59,7 @@ import java.util.concurrent.TimeoutException; public class ActionProxyReceiverTest extends SysuiTestCase { @Mock - private CentralSurfacesInt mMockCentralSurfaces; + private CentralSurfaces mMockCentralSurfaces; @Mock private ActivityManagerWrapper mMockActivityManagerWrapper; @Mock diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt index 1014a734787f5..562c970178622 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt @@ -19,7 +19,7 @@ import com.android.systemui.statusbar.notification.row.NotificationTestHelper import com.android.systemui.statusbar.notification.stack.AmbientState import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController -import com.android.systemui.statusbar.phone.CentralSurfacesInt +import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.KeyguardBypassController import com.android.systemui.statusbar.phone.LSShadeTransitionLogger import com.android.systemui.statusbar.phone.NotificationPanelViewController @@ -74,7 +74,7 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() { @Mock lateinit var depthController: NotificationShadeDepthController @Mock lateinit var stackscroller: NotificationStackScrollLayout @Mock lateinit var expandHelperCallback: ExpandHelper.Callback - @Mock lateinit var mCentralSurfaces: CentralSurfacesInt + @Mock lateinit var mCentralSurfaces: CentralSurfaces @Mock lateinit var qS: QS @Mock lateinit var singleShadeOverScroller: SingleShadeLockScreenOverScroller @Mock lateinit var splitShadeOverScroller: SplitShadeLockScreenOverScroller diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java index 2073744438e6b..2691ff98f4ee4 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java @@ -49,7 +49,7 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.google.android.collect.Sets; @@ -105,7 +105,7 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase { mVisibilityProvider, mEntryManager, mock(RemoteInputNotificationRebuilder.class), - () -> Optional.of(mock(CentralSurfacesInt.class)), + () -> Optional.of(mock(CentralSurfaces.class)), mStateController, Handler.createAsync(Looper.myLooper()), mRemoteInputUriController, @@ -196,7 +196,7 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase { NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, RemoteInputNotificationRebuilder rebuilder, - Lazy> centralSurfacesOptionalLazy, + Lazy> centralSurfacesOptionalLazy, StatusBarStateController statusBarStateController, Handler mainHandler, RemoteInputUriController remoteInputUriController, diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java index 3e466dd9732b0..3500e4d5f7012 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java @@ -45,7 +45,7 @@ import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.policy.RemoteInputUriController; import org.junit.Before; @@ -103,7 +103,7 @@ public class SmartReplyControllerTest extends SysuiTestCase { mVisibilityProvider, mNotificationEntryManager, new RemoteInputNotificationRebuilder(mContext), - () -> Optional.of(mock(CentralSurfacesInt.class)), + () -> Optional.of(mock(CentralSurfaces.class)), mStatusBarStateController, Handler.createAsync(Looper.myLooper()), mRemoteInputUriController, diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java index 47eddb906533f..e9d8f58301311 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java @@ -82,7 +82,7 @@ import com.android.systemui.statusbar.notification.collection.provider.HighPrior import com.android.systemui.statusbar.notification.people.PeopleNotificationIdentifier; import com.android.systemui.statusbar.notification.row.NotificationGutsManager.OnSettingsClickListener; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.wmshell.BubblesManager; @@ -124,7 +124,7 @@ public class NotificationGutsManagerTest extends SysuiTestCase { @Mock private NotificationInfo.CheckSaveListener mCheckSaveListener; @Mock private OnSettingsClickListener mOnSettingsClickListener; @Mock private DeviceProvisionedController mDeviceProvisionedController; - @Mock private CentralSurfacesInt mCentralSurfaces; + @Mock private CentralSurfaces mCentralSurfaces; @Mock private AccessibilityManager mAccessibilityManager; @Mock private HighPriorityProvider mHighPriorityProvider; @Mock private INotificationManager mINotificationManager; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java index d6f933db15f3a..c9de60806b664 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java @@ -69,7 +69,7 @@ import com.android.systemui.statusbar.notification.collection.render.SectionHead import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController.NotificationPanelEvent; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.HeadsUpManagerPhone; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.ScrimController; @@ -116,7 +116,7 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase { @Mock(answer = Answers.RETURNS_SELF) private NotificationSwipeHelper.Builder mNotificationSwipeHelperBuilder; @Mock private NotificationSwipeHelper mNotificationSwipeHelper; - @Mock private CentralSurfacesInt mCentralSurfaces; + @Mock private CentralSurfaces mCentralSurfaces; @Mock private ScrimController mScrimController; @Mock private NotificationGroupManagerLegacy mLegacyGroupManager; @Mock private SectionHeaderController mSilentHeaderController; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java index ffceb62cceb14..e8608fa76c062 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java @@ -66,7 +66,7 @@ import com.android.systemui.statusbar.notification.collection.render.GroupExpans import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.FooterView; -import com.android.systemui.statusbar.phone.CentralSurfacesInt; +import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; @@ -95,7 +95,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { private AmbientState mAmbientState; @Rule public MockitoRule mockito = MockitoJUnit.rule(); - @Mock private CentralSurfacesInt mCentralSurfaces; + @Mock private CentralSurfaces mCentralSurfaces; @Mock private SysuiStatusBarStateController mBarState; @Mock private NotificationGroupManagerLegacy mGroupMembershipManger; @Mock private NotificationGroupManagerLegacy mGroupExpansionManager; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java index 058bac380e843..9bfb2c4ce00c5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java @@ -58,7 +58,7 @@ import java.util.Optional; @SmallTest @RunWith(AndroidTestingRunner.class) public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase { - @Mock private CentralSurfacesInt mCentralSurfaces; + @Mock private CentralSurfaces mCentralSurfaces; @Mock private ShadeController mShadeController; @Mock private CommandQueue mCommandQueue; @Mock private NotificationPanelViewController mNotificationPanelViewController; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java index f479a464a10a9..d364505445f07 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java @@ -791,7 +791,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase { @Test public void testDumpBarTransitions_DoesNotCrash() { - CentralSurfacesInt.dumpBarTransitions( + CentralSurfaces.dumpBarTransitions( new PrintWriter(new ByteArrayOutputStream()), "var", /* transitions= */ null); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeServiceHostTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeServiceHostTest.java index af3f3bc19bf53..26ac70c70e7fd 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeServiceHostTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeServiceHostTest.java @@ -82,7 +82,7 @@ public class DozeServiceHostTest extends SysuiTestCase { @Mock private NotificationShadeWindowController mNotificationShadeWindowController; @Mock private PowerManager mPowerManager; @Mock private WakefulnessLifecycle mWakefullnessLifecycle; - @Mock private CentralSurfacesInt mCentralSurfaces; + @Mock private CentralSurfaces mCentralSurfaces; @Mock private NotificationIconAreaController mNotificationIconAreaController; @Mock private NotificationShadeWindowViewController mNotificationShadeWindowViewController; @Mock private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt index a6f7d862a8da7..31465f45af42e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaTest.kt @@ -25,7 +25,7 @@ import java.util.concurrent.Executor class KeyguardBottomAreaTest : SysuiTestCase() { @Mock - private lateinit var mCentralSurfaces: CentralSurfacesInt + private lateinit var mCentralSurfaces: CentralSurfaces private lateinit var mKeyguardBottomArea: KeyguardBottomAreaView @Before diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java index 48c8584c2132a..71f1f0b0f7cf0 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java @@ -161,7 +161,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { private static final int NOTIFICATION_SCRIM_TOP_PADDING_IN_SPLIT_SHADE = 50; @Mock - private CentralSurfacesInt mCentralSurfaces; + private CentralSurfaces mCentralSurfaces; @Mock private NotificationStackScrollLayout mNotificationStackScrollLayout; @Mock diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewControllerTest.kt index 3e354f2ce0c02..7e245fcea22d3 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewControllerTest.kt @@ -63,7 +63,7 @@ class NotificationShadeWindowViewControllerTest : SysuiTestCase() { @Mock private lateinit var mStatusBarStateController: SysuiStatusBarStateController @Mock - private lateinit var mCentralSurfaces: CentralSurfacesInt + private lateinit var mCentralSurfaces: CentralSurfaces @Mock private lateinit var mDockManager: DockManager @Mock diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewTest.java index 37e702f2a5c71..1d86fb13a1f6e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewTest.java @@ -73,7 +73,7 @@ public class NotificationShadeWindowViewTest extends SysuiTestCase { @Mock private DragDownHelper mDragDownHelper; @Mock private SysuiStatusBarStateController mStatusBarStateController; @Mock private ShadeController mShadeController; - @Mock private CentralSurfacesInt mCentralSurfaces; + @Mock private CentralSurfaces mCentralSurfaces; @Mock private DockManager mDockManager; @Mock private NotificationPanelViewController mNotificationPanelViewController; @Mock private NotificationStackScrollLayout mNotificationStackScrollLayout; 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 ce1d7f48a853d..a94ad0b763aa1 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 @@ -77,7 +77,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase { @Mock private ViewMediatorCallback mViewMediatorCallback; @Mock private LockPatternUtils mLockPatternUtils; @Mock private KeyguardStateController mKeyguardStateController; - @Mock private CentralSurfacesInt mCentralSurfaces; + @Mock private CentralSurfaces mCentralSurfaces; @Mock private ViewGroup mContainer; @Mock private NotificationPanelViewController mNotificationPanelView; @Mock private BiometricUnlockController mBiometricUnlockController; 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 5de5138043de2..fa867e2796f7c 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 @@ -115,7 +115,7 @@ public class StatusBarNotificationActivityStarterTest extends SysuiTestCase { @Mock private NotificationRemoteInputManager mRemoteInputManager; @Mock - private CentralSurfacesInt mCentralSurfaces; + private CentralSurfaces mCentralSurfaces; @Mock private KeyguardStateController mKeyguardStateController; @Mock diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java index 893ae4a2b761f..1a3dd3a7a2a5b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java @@ -80,7 +80,7 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase { private CommandQueue mCommandQueue; private FakeMetricsLogger mMetricsLogger; private ShadeController mShadeController = mock(ShadeController.class); - private CentralSurfacesInt mCentralSurfaces = mock(CentralSurfacesInt.class); + private CentralSurfaces mCentralSurfaces = mock(CentralSurfaces.class); private InitController mInitController = new InitController(); @Before 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 e743defba892c..0936b773d4b3e 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 @@ -62,7 +62,7 @@ class UnlockedScreenOffAnimationControllerTest : SysuiTestCase() { @Mock private lateinit var globalSettings: GlobalSettings @Mock - private lateinit var mCentralSurfaces: CentralSurfacesInt + private lateinit var mCentralSurfaces: CentralSurfaces @Mock private lateinit var notificationPanelViewController: NotificationPanelViewController @Mock