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
Merged-In: Iab41b70e0c65d75560010d961dcb52a11fd237f5
This commit is contained in:
Dave Mankoff
2022-04-14 21:45:30 +00:00
parent 3c7d69d9f3
commit ee4838630c
97 changed files with 1082 additions and 781 deletions

View File

@@ -3,7 +3,7 @@
-keep class com.android.systemui.recents.OverviewProxyRecentsImpl -keep class com.android.systemui.recents.OverviewProxyRecentsImpl
-keep class com.android.systemui.statusbar.car.CarStatusBar -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.statusbar.tv.TvStatusBar
-keep class com.android.systemui.car.CarSystemUIFactory -keep class com.android.systemui.car.CarSystemUIFactory
-keep class com.android.systemui.SystemUIFactory -keep class com.android.systemui.SystemUIFactory

View File

@@ -24,7 +24,7 @@ import androidx.annotation.Nullable;
import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.statusbar.phone.BiometricUnlockController; 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.KeyguardBypassController;
import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.NotificationPanelViewController;
import com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManager; 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. * Registers the CentralSurfaces to which this Keyguard View is mounted.
*/ */
void registerCentralSurfaces(CentralSurfaces centralSurfaces, void registerCentralSurfaces(CentralSurfacesInt centralSurfaces,
NotificationPanelViewController notificationPanelViewController, NotificationPanelViewController notificationPanelViewController,
@Nullable PanelExpansionStateManager panelExpansionStateManager, @Nullable PanelExpansionStateManager panelExpansionStateManager,
BiometricUnlockController biometricUnlockController, BiometricUnlockController biometricUnlockController,

View File

@@ -24,7 +24,7 @@ import androidx.annotation.Nullable;
import com.android.systemui.animation.ActivityLaunchAnimator; import com.android.systemui.animation.ActivityLaunchAnimator;
import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.plugins.ActivityStarter; import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.statusbar.phone.CentralSurfaces; import com.android.systemui.statusbar.phone.CentralSurfacesInt;
import java.util.Optional; import java.util.Optional;
@@ -40,10 +40,10 @@ import dagger.Lazy;
@SysUISingleton @SysUISingleton
public class ActivityStarterDelegate implements ActivityStarter { public class ActivityStarterDelegate implements ActivityStarter {
private Lazy<Optional<CentralSurfaces>> mActualStarterOptionalLazy; private Lazy<Optional<CentralSurfacesInt>> mActualStarterOptionalLazy;
@Inject @Inject
public ActivityStarterDelegate(Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy) { public ActivityStarterDelegate(Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy) {
mActualStarterOptionalLazy = centralSurfacesOptionalLazy; mActualStarterOptionalLazy = centralSurfacesOptionalLazy;
} }

View File

@@ -54,7 +54,7 @@ import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.recents.Recents; import com.android.systemui.recents.Recents;
import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationShadeWindowController; 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.statusbar.phone.StatusBarWindowCallback;
import com.android.systemui.util.Assert; import com.android.systemui.util.Assert;
@@ -180,7 +180,7 @@ public class SystemActions extends CoreStartable {
private final Optional<Recents> mRecentsOptional; private final Optional<Recents> mRecentsOptional;
private Locale mLocale; private Locale mLocale;
private final AccessibilityManager mA11yManager; private final AccessibilityManager mA11yManager;
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; private final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
private final NotificationShadeWindowController mNotificationShadeController; private final NotificationShadeWindowController mNotificationShadeController;
private final StatusBarWindowCallback mNotificationShadeCallback; private final StatusBarWindowCallback mNotificationShadeCallback;
private boolean mDismissNotificationShadeActionRegistered; private boolean mDismissNotificationShadeActionRegistered;
@@ -188,7 +188,7 @@ public class SystemActions extends CoreStartable {
@Inject @Inject
public SystemActions(Context context, public SystemActions(Context context,
NotificationShadeWindowController notificationShadeController, NotificationShadeWindowController notificationShadeController,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
Optional<Recents> recentsOptional) { Optional<Recents> recentsOptional) {
super(context); super(context);
mRecentsOptional = recentsOptional; 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 // Saving state in instance variable since this callback is called quite often to avoid
// binder calls // binder calls
final Optional<CentralSurfaces> centralSurfacesOptional = final Optional<CentralSurfacesInt> centralSurfacesOptional =
mCentralSurfacesOptionalLazy.get(); mCentralSurfacesOptionalLazy.get();
if (centralSurfacesOptional.map(CentralSurfaces::isPanelExpanded).orElse(false) if (centralSurfacesOptional.map(CentralSurfacesInt::isPanelExpanded).orElse(false)
&& !centralSurfacesOptional.get().isKeyguardShowing()) { && !centralSurfacesOptional.get().isKeyguardShowing()) {
if (!mDismissNotificationShadeActionRegistered) { if (!mDismissNotificationShadeActionRegistered) {
mA11yManager.registerSystemAction( mA11yManager.registerSystemAction(
@@ -467,7 +467,7 @@ public class SystemActions extends CoreStartable {
} }
private void handleNotifications() { private void handleNotifications() {
mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::animateExpandNotificationsPanel); mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::animateExpandNotificationsPanel);
} }
private void handleQuickSettings() { private void handleQuickSettings() {

View File

@@ -36,7 +36,7 @@ import com.android.systemui.shared.system.PackageManagerWrapper;
import com.android.systemui.shared.system.TaskStackChangeListener; import com.android.systemui.shared.system.TaskStackChangeListener;
import com.android.systemui.shared.system.TaskStackChangeListeners; import com.android.systemui.shared.system.TaskStackChangeListeners;
import com.android.systemui.statusbar.StatusBarState; 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.ArrayList;
import java.util.List; import java.util.List;
@@ -69,7 +69,7 @@ public final class PhoneStateMonitor {
}; };
private final Context mContext; private final Context mContext;
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; private final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
private final StatusBarStateController mStatusBarStateController; private final StatusBarStateController mStatusBarStateController;
private boolean mLauncherShowing; private boolean mLauncherShowing;
@@ -77,7 +77,7 @@ public final class PhoneStateMonitor {
@Inject @Inject
PhoneStateMonitor(Context context, BroadcastDispatcher broadcastDispatcher, PhoneStateMonitor(Context context, BroadcastDispatcher broadcastDispatcher,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
BootCompleteCache bootCompleteCache, BootCompleteCache bootCompleteCache,
StatusBarStateController statusBarStateController) { StatusBarStateController statusBarStateController) {
mContext = context; mContext = context;
@@ -182,7 +182,7 @@ public final class PhoneStateMonitor {
private boolean isBouncerShowing() { private boolean isBouncerShowing() {
return mCentralSurfacesOptionalLazy.get() return mCentralSurfacesOptionalLazy.get()
.map(CentralSurfaces::isBouncerShowing).orElse(false); .map(CentralSurfacesInt::isBouncerShowing).orElse(false);
} }
private boolean isKeyguardLocked() { private boolean isKeyguardLocked() {

View File

@@ -40,7 +40,7 @@ import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.commandline.Command import com.android.systemui.statusbar.commandline.Command
import com.android.systemui.statusbar.commandline.CommandRegistry import com.android.systemui.statusbar.commandline.CommandRegistry
import com.android.systemui.statusbar.phone.BiometricUnlockController 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.KeyguardBypassController
import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent.CentralSurfacesScope import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent.CentralSurfacesScope
import com.android.systemui.statusbar.policy.ConfigurationController import com.android.systemui.statusbar.policy.ConfigurationController
@@ -61,7 +61,7 @@ import javax.inject.Provider
*/ */
@CentralSurfacesScope @CentralSurfacesScope
class AuthRippleController @Inject constructor( class AuthRippleController @Inject constructor(
private val centralSurfaces: CentralSurfaces, private val centralSurfaces: CentralSurfacesInt,
private val sysuiContext: Context, private val sysuiContext: Context,
private val authController: AuthController, private val authController: AuthController,
private val configurationController: ConfigurationController, private val configurationController: ConfigurationController,

View File

@@ -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.ExpandableNotificationRowComponent;
import com.android.systemui.statusbar.notification.row.dagger.NotificationRowComponent; import com.android.systemui.statusbar.notification.row.dagger.NotificationRowComponent;
import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfComponent; 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.ShadeController;
import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent; import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent;
import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.ConfigurationController;
@@ -178,7 +178,7 @@ public abstract class SystemUIModule {
abstract Recents optionalRecents(); abstract Recents optionalRecents();
@BindsOptionalOf @BindsOptionalOf
abstract CentralSurfaces optionalCentralSurfaces(); abstract CentralSurfacesInt optionalCentralSurfaces();
@BindsOptionalOf @BindsOptionalOf
abstract UdfpsHbmProvider optionalUdfpsHbmProvider(); abstract UdfpsHbmProvider optionalUdfpsHbmProvider();

View File

@@ -37,7 +37,7 @@ import androidx.annotation.VisibleForTesting;
import com.android.internal.logging.UiEvent; import com.android.internal.logging.UiEvent;
import com.android.internal.logging.UiEventLogger; import com.android.internal.logging.UiEventLogger;
import com.android.systemui.statusbar.NotificationShadeWindowController; 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.KeyguardBouncer;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.panelstate.PanelExpansionChangeEvent; import com.android.systemui.statusbar.phone.panelstate.PanelExpansionChangeEvent;
@@ -79,7 +79,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler {
private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
private float mCurrentExpansion; private float mCurrentExpansion;
private final Optional<CentralSurfaces> mCentralSurfaces; private final Optional<CentralSurfacesInt> mCentralSurfaces;
private VelocityTracker mVelocityTracker; private VelocityTracker mVelocityTracker;
@@ -110,7 +110,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler {
// scrolls. // scrolls.
mCapture = Math.abs(distanceY) > Math.abs(distanceX); mCapture = Math.abs(distanceY) > Math.abs(distanceX);
mBouncerInitiallyShowing = mCentralSurfaces mBouncerInitiallyShowing = mCentralSurfaces
.map(CentralSurfaces::isBouncerShowing) .map(CentralSurfacesInt::isBouncerShowing)
.orElse(false); .orElse(false);
if (mCapture) { if (mCapture) {
@@ -187,7 +187,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler {
public BouncerSwipeTouchHandler( public BouncerSwipeTouchHandler(
DisplayMetrics displayMetrics, DisplayMetrics displayMetrics,
StatusBarKeyguardViewManager statusBarKeyguardViewManager, StatusBarKeyguardViewManager statusBarKeyguardViewManager,
Optional<CentralSurfaces> centralSurfaces, Optional<CentralSurfacesInt> centralSurfaces,
NotificationShadeWindowController notificationShadeWindowController, NotificationShadeWindowController notificationShadeWindowController,
ValueAnimatorCreator valueAnimatorCreator, ValueAnimatorCreator valueAnimatorCreator,
VelocityTrackerFactory velocityTrackerFactory, VelocityTrackerFactory velocityTrackerFactory,
@@ -211,7 +211,7 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler {
@Override @Override
public void getTouchInitiationRegion(Region region) { 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, region.op(new Rect(0, 0, mDisplayMetrics.widthPixels,
Math.round( Math.round(
mDisplayMetrics.heightPixels * mBouncerZoneScreenPercentage)), mDisplayMetrics.heightPixels * mBouncerZoneScreenPercentage)),

View File

@@ -121,7 +121,7 @@ import com.android.systemui.plugins.GlobalActionsPanelPlugin;
import com.android.systemui.scrim.ScrimDrawable; import com.android.systemui.scrim.ScrimDrawable;
import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.VibratorHelper; 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.phone.SystemUIDialog;
import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.statusbar.policy.KeyguardStateController;
@@ -236,7 +236,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
private int mDialogPressDelay = DIALOG_PRESS_DELAY; // ms private int mDialogPressDelay = DIALOG_PRESS_DELAY; // ms
protected Handler mMainHandler; protected Handler mMainHandler;
private int mSmallestScreenWidthDp; private int mSmallestScreenWidthDp;
private final Optional<CentralSurfaces> mCentralSurfacesOptional; private final Optional<CentralSurfacesInt> mCentralSurfacesOptional;
private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
private final DialogLaunchAnimator mDialogLaunchAnimator; private final DialogLaunchAnimator mDialogLaunchAnimator;
@@ -344,7 +344,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
RingerModeTracker ringerModeTracker, RingerModeTracker ringerModeTracker,
@Main Handler handler, @Main Handler handler,
PackageManager packageManager, PackageManager packageManager,
Optional<CentralSurfaces> centralSurfacesOptional, Optional<CentralSurfacesInt> centralSurfacesOptional,
KeyguardUpdateMonitor keyguardUpdateMonitor, KeyguardUpdateMonitor keyguardUpdateMonitor,
DialogLaunchAnimator dialogLaunchAnimator) { DialogLaunchAnimator dialogLaunchAnimator) {
mContext = context; mContext = context;
@@ -426,7 +426,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
return mUiEventLogger; return mUiEventLogger;
} }
protected Optional<CentralSurfaces> getCentralSurfaces() { protected Optional<CentralSurfacesInt> getCentralSurfaces() {
return mCentralSurfacesOptional; return mCentralSurfacesOptional;
} }
@@ -874,7 +874,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
mUiEventLogger.log(GlobalActionsEvent.GA_EMERGENCY_DIALER_PRESS); mUiEventLogger.log(GlobalActionsEvent.GA_EMERGENCY_DIALER_PRESS);
if (mTelecomManager != null) { if (mTelecomManager != null) {
// Close shade so user sees the activity // Close shade so user sees the activity
mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShade); mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::collapseShade);
Intent intent = mTelecomManager.createLaunchEmergencyDialerIntent( Intent intent = mTelecomManager.createLaunchEmergencyDialerIntent(
null /* number */); null /* number */);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
@@ -1006,7 +1006,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
mIActivityManager.requestInteractiveBugReport(); mIActivityManager.requestInteractiveBugReport();
} }
// Close shade so user sees the activity // Close shade so user sees the activity
mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShade); mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::collapseShade);
} catch (RemoteException e) { } catch (RemoteException e) {
} }
} }
@@ -1026,7 +1026,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
mUiEventLogger.log(GlobalActionsEvent.GA_BUGREPORT_LONG_PRESS); mUiEventLogger.log(GlobalActionsEvent.GA_BUGREPORT_LONG_PRESS);
mIActivityManager.requestFullBugReport(); mIActivityManager.requestFullBugReport();
// Close shade so user sees the activity // Close shade so user sees the activity
mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShade); mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::collapseShade);
} catch (RemoteException e) { } catch (RemoteException e) {
} }
return false; return false;
@@ -2162,7 +2162,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
protected final Runnable mOnRefreshCallback; protected final Runnable mOnRefreshCallback;
private UiEventLogger mUiEventLogger; private UiEventLogger mUiEventLogger;
private GestureDetector mGestureDetector; private GestureDetector mGestureDetector;
private Optional<CentralSurfaces> mCentralSurfacesOptional; private Optional<CentralSurfacesInt> mCentralSurfacesOptional;
private KeyguardUpdateMonitor mKeyguardUpdateMonitor; private KeyguardUpdateMonitor mKeyguardUpdateMonitor;
private LockPatternUtils mLockPatternUtils; private LockPatternUtils mLockPatternUtils;
private float mWindowDimAmount; private float mWindowDimAmount;
@@ -2191,7 +2191,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
float distanceY) { float distanceY) {
if (distanceY < 0 && distanceY > distanceX if (distanceY < 0 && distanceY > distanceX
&& e1.getY() <= mCentralSurfacesOptional.map( && e1.getY() <= mCentralSurfacesOptional.map(
CentralSurfaces::getStatusBarHeight).orElse(0)) { CentralSurfacesInt::getStatusBarHeight).orElse(0)) {
// Downwards scroll from top // Downwards scroll from top
openShadeAndDismiss(); openShadeAndDismiss();
return true; return true;
@@ -2204,7 +2204,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
float velocityY) { float velocityY) {
if (velocityY > 0 && Math.abs(velocityY) > Math.abs(velocityX) if (velocityY > 0 && Math.abs(velocityY) > Math.abs(velocityX)
&& e1.getY() <= mCentralSurfacesOptional.map( && e1.getY() <= mCentralSurfacesOptional.map(
CentralSurfaces::getStatusBarHeight).orElse(0)) { CentralSurfacesInt::getStatusBarHeight).orElse(0)) {
// Downwards fling from top // Downwards fling from top
openShadeAndDismiss(); openShadeAndDismiss();
return true; return true;
@@ -2219,7 +2219,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
NotificationShadeWindowController notificationShadeWindowController, NotificationShadeWindowController notificationShadeWindowController,
Runnable onRefreshCallback, boolean keyguardShowing, Runnable onRefreshCallback, boolean keyguardShowing,
MyPowerOptionsAdapter powerAdapter, UiEventLogger uiEventLogger, MyPowerOptionsAdapter powerAdapter, UiEventLogger uiEventLogger,
Optional<CentralSurfaces> centralSurfacesOptional, Optional<CentralSurfacesInt> centralSurfacesOptional,
KeyguardUpdateMonitor keyguardUpdateMonitor, KeyguardUpdateMonitor keyguardUpdateMonitor,
LockPatternUtils lockPatternUtils) { LockPatternUtils lockPatternUtils) {
// We set dismissOnDeviceLock to false because we have a custom broadcast receiver to // 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() { private void openShadeAndDismiss() {
mUiEventLogger.log(GlobalActionsEvent.GA_CLOSE_TAP_OUTSIDE); 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 // match existing lockscreen behavior to open QS when swiping from status bar
mCentralSurfacesOptional.ifPresent( mCentralSurfacesOptional.ifPresent(
centralSurfaces -> centralSurfaces.animateExpandSettingsPanel(null)); centralSurfaces -> centralSurfaces.animateExpandSettingsPanel(null));

View File

@@ -127,7 +127,7 @@ import com.android.systemui.statusbar.NotificationShadeDepthController;
import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.phone.BiometricUnlockController; 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.DozeParameters;
import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.NotificationPanelViewController;
@@ -2828,7 +2828,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
* @param bypassController * @param bypassController
* @return the View Controller for the Keyguard View this class is mediating. * @return the View Controller for the Keyguard View this class is mediating.
*/ */
public KeyguardViewController registerCentralSurfaces(CentralSurfaces centralSurfaces, public KeyguardViewController registerCentralSurfaces(CentralSurfacesInt centralSurfaces,
NotificationPanelViewController panelView, NotificationPanelViewController panelView,
@Nullable PanelExpansionStateManager panelExpansionStateManager, @Nullable PanelExpansionStateManager panelExpansionStateManager,
BiometricUnlockController biometricUnlockController, BiometricUnlockController biometricUnlockController,

View File

@@ -50,7 +50,7 @@ import com.android.systemui.dump.DumpManager;
import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.settings.UserTracker; import com.android.systemui.settings.UserTracker;
import com.android.systemui.shared.system.QuickStepContract; 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.io.PrintWriter;
import java.util.ArrayList; import java.util.ArrayList;
@@ -79,7 +79,7 @@ public final class NavBarHelper implements
Dumpable { Dumpable {
private final AccessibilityManager mAccessibilityManager; private final AccessibilityManager mAccessibilityManager;
private final Lazy<AssistManager> mAssistManagerLazy; private final Lazy<AssistManager> mAssistManagerLazy;
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; private final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
private final UserTracker mUserTracker; private final UserTracker mUserTracker;
private final SystemActions mSystemActions; private final SystemActions mSystemActions;
private final AccessibilityButtonModeObserver mAccessibilityButtonModeObserver; private final AccessibilityButtonModeObserver mAccessibilityButtonModeObserver;
@@ -113,7 +113,7 @@ public final class NavBarHelper implements
SystemActions systemActions, SystemActions systemActions,
OverviewProxyService overviewProxyService, OverviewProxyService overviewProxyService,
Lazy<AssistManager> assistManagerLazy, Lazy<AssistManager> assistManagerLazy,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
NavigationModeController navigationModeController, NavigationModeController navigationModeController,
UserTracker userTracker, UserTracker userTracker,
DumpManager dumpManager) { DumpManager dumpManager) {

View File

@@ -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_SEMI_TRANSPARENT;
import static com.android.systemui.statusbar.phone.BarTransitions.MODE_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.BarTransitions.TransitionMode;
import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG_WINDOW_STATE; import static com.android.systemui.statusbar.phone.CentralSurfacesInt.DEBUG_WINDOW_STATE;
import static com.android.systemui.statusbar.phone.CentralSurfaces.dumpBarTransitions; import static com.android.systemui.statusbar.phone.CentralSurfacesInt.dumpBarTransitions;
import android.annotation.IdRes; import android.annotation.IdRes;
import android.app.ActivityTaskManager; 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.notification.stack.StackStateAnimator;
import com.android.systemui.statusbar.phone.AutoHideController; import com.android.systemui.statusbar.phone.AutoHideController;
import com.android.systemui.statusbar.phone.BarTransitions; 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.LightBarController;
import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.ShadeController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
@@ -187,7 +187,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
private final Lazy<AssistManager> mAssistManagerLazy; private final Lazy<AssistManager> mAssistManagerLazy;
private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
private final SysUiState mSysUiFlagsContainer; private final SysUiState mSysUiFlagsContainer;
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; private final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
private final ShadeController mShadeController; private final ShadeController mShadeController;
private final NotificationRemoteInputManager mNotificationRemoteInputManager; private final NotificationRemoteInputManager mNotificationRemoteInputManager;
private final OverviewProxyService mOverviewProxyService; private final OverviewProxyService mOverviewProxyService;
@@ -499,7 +499,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
CommandQueue commandQueue, CommandQueue commandQueue,
Optional<Pip> pipOptional, Optional<Pip> pipOptional,
Optional<Recents> recentsOptional, Optional<Recents> recentsOptional,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
ShadeController shadeController, ShadeController shadeController,
NotificationRemoteInputManager notificationRemoteInputManager, NotificationRemoteInputManager notificationRemoteInputManager,
NotificationShadeDepthController notificationShadeDepthController, NotificationShadeDepthController notificationShadeDepthController,
@@ -1189,13 +1189,13 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
// If an incoming call is ringing, HOME is totally disabled. // If an incoming call is ringing, HOME is totally disabled.
// (The user is already on the InCallUI at this point, // (The user is already on the InCallUI at this point,
// and their ONLY options are to answer or reject the call.) // and their ONLY options are to answer or reject the call.)
final Optional<CentralSurfaces> centralSurfacesOptional = mCentralSurfacesOptionalLazy.get(); final Optional<CentralSurfacesInt> centralSurfacesOptional = mCentralSurfacesOptionalLazy.get();
switch (event.getAction()) { switch (event.getAction()) {
case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_DOWN:
mHomeBlockedThisTouch = false; mHomeBlockedThisTouch = false;
if (mTelecomManagerOptional.isPresent() if (mTelecomManagerOptional.isPresent()
&& mTelecomManagerOptional.get().isRinging()) { && mTelecomManagerOptional.get().isRinging()) {
if (centralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing) if (centralSurfacesOptional.map(CentralSurfacesInt::isKeyguardShowing)
.orElse(false)) { .orElse(false)) {
Log.i(TAG, "Ignoring HOME; there's a ringing incoming call. " + Log.i(TAG, "Ignoring HOME; there's a ringing incoming call. " +
"No heads up"); "No heads up");
@@ -1212,7 +1212,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
case MotionEvent.ACTION_UP: case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_CANCEL:
mHandler.removeCallbacks(mOnVariableDurationHomeLongClick); mHandler.removeCallbacks(mOnVariableDurationHomeLongClick);
centralSurfacesOptional.ifPresent(CentralSurfaces::awakenDreams); centralSurfacesOptional.ifPresent(CentralSurfacesInt::awakenDreams);
break; break;
} }
return false; return false;
@@ -1246,7 +1246,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
AssistManager.INVOCATION_TYPE_KEY, AssistManager.INVOCATION_TYPE_KEY,
AssistManager.INVOCATION_TYPE_HOME_BUTTON_LONG_PRESS); AssistManager.INVOCATION_TYPE_HOME_BUTTON_LONG_PRESS);
mAssistManagerLazy.get().startAssist(args); mAssistManagerLazy.get().startAssist(args);
mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::awakenDreams); mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::awakenDreams);
mView.abortCurrentGesture(); mView.abortCurrentGesture();
return true; return true;
} }
@@ -1272,7 +1272,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
LatencyTracker.getInstance(mContext).onActionStart( LatencyTracker.getInstance(mContext).onActionStart(
LatencyTracker.ACTION_TOGGLE_RECENTS); LatencyTracker.ACTION_TOGGLE_RECENTS);
} }
mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::awakenDreams); mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::awakenDreams);
mCommandQueue.toggleRecentApps(); mCommandQueue.toggleRecentApps();
} }
@@ -1454,7 +1454,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
private void checkBarModes() { private void checkBarModes() {
// We only have status bar on default display now. // We only have status bar on default display now.
if (mIsOnDefaultDisplay) { if (mIsOnDefaultDisplay) {
mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::checkBarModes); mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::checkBarModes);
} else { } else {
checkNavBarModes(); checkNavBarModes();
} }
@@ -1473,7 +1473,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
*/ */
public void checkNavBarModes() { public void checkNavBarModes() {
final boolean anim = final boolean anim =
mCentralSurfacesOptionalLazy.get().map(CentralSurfaces::isDeviceInteractive) mCentralSurfacesOptionalLazy.get().map(CentralSurfacesInt::isDeviceInteractive)
.orElse(false) .orElse(false)
&& mNavigationBarWindowState != WINDOW_STATE_HIDDEN; && mNavigationBarWindowState != WINDOW_STATE_HIDDEN;
getBarTransitions().transitionTo(mTransitionMode, anim); getBarTransitions().transitionTo(mTransitionMode, anim);

View File

@@ -86,7 +86,7 @@ import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.shared.system.WindowManagerWrapper; import com.android.systemui.shared.system.WindowManagerWrapper;
import com.android.systemui.statusbar.phone.AutoHideController; 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.LightBarTransitionsController;
import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.NotificationPanelViewController;
import com.android.wm.shell.back.BackAnimation; import com.android.wm.shell.back.BackAnimation;
@@ -1331,7 +1331,7 @@ public class NavigationBarView extends FrameLayout {
getContextDisplay().getRealSize(size); getContextDisplay().getRealSize(size);
pw.println("NavigationBarView:"); pw.println("NavigationBarView:");
pw.println(String.format(" this: " + CentralSurfaces.viewInfo(this) pw.println(String.format(" this: " + CentralSurfacesInt.viewInfo(this)
+ " " + visibilityToString(getVisibility()))); + " " + visibilityToString(getVisibility())));
getWindowVisibleDisplayFrame(r); getWindowVisibleDisplayFrame(r);

View File

@@ -47,7 +47,7 @@ import com.android.systemui.R;
import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.statusbar.CommandQueue; 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.io.PrintWriter;
import java.util.Arrays; import java.util.Arrays;
@@ -105,11 +105,11 @@ public class PowerUI extends CoreStartable implements CommandQueue.Callbacks {
private IThermalEventListener mUsbThermalEventListener; private IThermalEventListener mUsbThermalEventListener;
private final BroadcastDispatcher mBroadcastDispatcher; private final BroadcastDispatcher mBroadcastDispatcher;
private final CommandQueue mCommandQueue; private final CommandQueue mCommandQueue;
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; private final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
@Inject @Inject
public PowerUI(Context context, BroadcastDispatcher broadcastDispatcher, public PowerUI(Context context, BroadcastDispatcher broadcastDispatcher,
CommandQueue commandQueue, Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, CommandQueue commandQueue, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
WarningsUI warningsUI, EnhancedEstimates enhancedEstimates, WarningsUI warningsUI, EnhancedEstimates enhancedEstimates,
PowerManager powerManager) { PowerManager powerManager) {
super(context); super(context);
@@ -701,9 +701,9 @@ public class PowerUI extends CoreStartable implements CommandQueue.Callbacks {
int status = temp.getStatus(); int status = temp.getStatus();
if (status >= Temperature.THROTTLING_EMERGENCY) { if (status >= Temperature.THROTTLING_EMERGENCY) {
final Optional<CentralSurfaces> centralSurfacesOptional = final Optional<CentralSurfacesInt> centralSurfacesOptional =
mCentralSurfacesOptionalLazy.get(); mCentralSurfacesOptionalLazy.get();
if (!centralSurfacesOptional.map(CentralSurfaces::isDeviceInVrMode) if (!centralSurfacesOptional.map(CentralSurfacesInt::isDeviceInVrMode)
.orElse(false)) { .orElse(false)) {
mWarnings.showHighTemperatureWarning(); mWarnings.showHighTemperatureWarning();
Slog.d(TAG, "SkinThermalEventListener: notifyThrottling was called " Slog.d(TAG, "SkinThermalEventListener: notifyThrottling was called "

View File

@@ -53,7 +53,7 @@ import com.android.systemui.qs.logging.QSLogger;
import com.android.systemui.settings.UserTracker; import com.android.systemui.settings.UserTracker;
import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.statusbar.phone.AutoTileManager; 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.phone.StatusBarIconController;
import com.android.systemui.tuner.TunerService; import com.android.systemui.tuner.TunerService;
import com.android.systemui.tuner.TunerService.Tunable; import com.android.systemui.tuner.TunerService.Tunable;
@@ -101,7 +101,7 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, D
private final StatusBarIconController mIconController; private final StatusBarIconController mIconController;
private final ArrayList<QSFactory> mQsFactories = new ArrayList<>(); private final ArrayList<QSFactory> mQsFactories = new ArrayList<>();
private int mCurrentUser; private int mCurrentUser;
private final Optional<CentralSurfaces> mCentralSurfacesOptional; private final Optional<CentralSurfacesInt> mCentralSurfacesOptional;
private Context mUserContext; private Context mUserContext;
private UserTracker mUserTracker; private UserTracker mUserTracker;
private SecureSettings mSecureSettings; private SecureSettings mSecureSettings;
@@ -120,7 +120,7 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, D
Provider<AutoTileManager> autoTiles, Provider<AutoTileManager> autoTiles,
DumpManager dumpManager, DumpManager dumpManager,
BroadcastDispatcher broadcastDispatcher, BroadcastDispatcher broadcastDispatcher,
Optional<CentralSurfaces> centralSurfacesOptional, Optional<CentralSurfacesInt> centralSurfacesOptional,
QSLogger qsLogger, QSLogger qsLogger,
UiEventLogger uiEventLogger, UiEventLogger uiEventLogger,
UserTracker userTracker, UserTracker userTracker,
@@ -226,17 +226,17 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, D
@Override @Override
public void collapsePanels() { public void collapsePanels() {
mCentralSurfacesOptional.ifPresent(CentralSurfaces::postAnimateCollapsePanels); mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::postAnimateCollapsePanels);
} }
@Override @Override
public void forceCollapsePanels() { public void forceCollapsePanels() {
mCentralSurfacesOptional.ifPresent(CentralSurfaces::postAnimateForceCollapsePanels); mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::postAnimateForceCollapsePanels);
} }
@Override @Override
public void openPanels() { public void openPanels() {
mCentralSurfacesOptional.ifPresent(CentralSurfaces::postAnimateOpenPanels); mCentralSurfacesOptional.ifPresent(CentralSurfacesInt::postAnimateOpenPanels);
} }
@Override @Override

View File

@@ -26,7 +26,7 @@ import android.util.Log;
import com.android.systemui.Dependency; import com.android.systemui.Dependency;
import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.shared.recents.IOverviewProxy; 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; import java.util.Optional;
@@ -42,7 +42,7 @@ public class OverviewProxyRecentsImpl implements RecentsImplementation {
private final static String TAG = "OverviewProxyRecentsImpl"; private final static String TAG = "OverviewProxyRecentsImpl";
@Nullable @Nullable
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; private final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
private Context mContext; private Context mContext;
private Handler mHandler; private Handler mHandler;
@@ -51,7 +51,7 @@ public class OverviewProxyRecentsImpl implements RecentsImplementation {
@SuppressWarnings("OptionalUsedAsFieldOrParameterType") @SuppressWarnings("OptionalUsedAsFieldOrParameterType")
@Inject @Inject
public OverviewProxyRecentsImpl(Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy) { public OverviewProxyRecentsImpl(Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy) {
mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy; mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy;
} }
@@ -109,9 +109,9 @@ public class OverviewProxyRecentsImpl implements RecentsImplementation {
} }
}; };
// Preload only if device for current user is unlocked // Preload only if device for current user is unlocked
final Optional<CentralSurfaces> centralSurfacesOptional = final Optional<CentralSurfacesInt> centralSurfacesOptional =
mCentralSurfacesOptionalLazy.get(); mCentralSurfacesOptionalLazy.get();
if (centralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing).orElse(false)) { if (centralSurfacesOptional.map(CentralSurfacesInt::isKeyguardShowing).orElse(false)) {
centralSurfacesOptional.get().executeRunnableDismissingKeyguard(() -> { centralSurfacesOptional.get().executeRunnableDismissingKeyguard(() -> {
mHandler.post(toggleRecents); mHandler.post(toggleRecents);
}, null, true /* dismissShade */, false /* afterKeyguardGone */, }, null, true /* dismissShade */, false /* afterKeyguardGone */,

View File

@@ -101,7 +101,7 @@ import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationShadeWindowController; 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.NotificationPanelViewController;
import com.android.systemui.statusbar.phone.StatusBarWindowCallback; import com.android.systemui.statusbar.phone.StatusBarWindowCallback;
import com.android.systemui.statusbar.policy.CallbackController; import com.android.systemui.statusbar.policy.CallbackController;
@@ -145,7 +145,7 @@ public class OverviewProxyService extends CurrentUserTracker implements
private final Context mContext; private final Context mContext;
private final Optional<Pip> mPipOptional; private final Optional<Pip> mPipOptional;
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; private final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
private final Optional<SplitScreen> mSplitScreenOptional; private final Optional<SplitScreen> mSplitScreenOptional;
private SysUiState mSysUiState; private SysUiState mSysUiState;
private final Handler mHandler; private final Handler mHandler;
@@ -400,7 +400,7 @@ public class OverviewProxyService extends CurrentUserTracker implements
@Override @Override
public void toggleNotificationPanel() { public void toggleNotificationPanel() {
verifyCallerAndClearCallingIdentityPostMain("toggleNotificationPanel", () -> verifyCallerAndClearCallingIdentityPostMain("toggleNotificationPanel", () ->
mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfaces::togglePanel)); mCentralSurfacesOptionalLazy.get().ifPresent(CentralSurfacesInt::togglePanel));
} }
@@ -555,7 +555,7 @@ public class OverviewProxyService extends CurrentUserTracker implements
@Inject @Inject
public OverviewProxyService(Context context, CommandQueue commandQueue, public OverviewProxyService(Context context, CommandQueue commandQueue,
Lazy<NavigationBarController> navBarControllerLazy, Lazy<NavigationBarController> navBarControllerLazy,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
NavigationModeController navModeController, NavigationModeController navModeController,
NotificationShadeWindowController statusBarWinController, SysUiState sysUiState, NotificationShadeWindowController statusBarWinController, SysUiState sysUiState,
Optional<Pip> pipOptional, Optional<Pip> pipOptional,

View File

@@ -56,7 +56,7 @@ import com.android.systemui.navigationbar.NavigationBarView;
import com.android.systemui.navigationbar.NavigationModeController; import com.android.systemui.navigationbar.NavigationModeController;
import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.shared.system.WindowManagerWrapper; 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 com.android.systemui.util.leak.RotationUtils;
import java.util.ArrayList; import java.util.ArrayList;
@@ -70,7 +70,7 @@ public class ScreenPinningRequest implements View.OnClickListener,
NavigationModeController.ModeChangedListener { NavigationModeController.ModeChangedListener {
private final Context mContext; private final Context mContext;
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; private final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
private final AccessibilityManager mAccessibilityService; private final AccessibilityManager mAccessibilityService;
private final WindowManager mWindowManager; private final WindowManager mWindowManager;
@@ -85,7 +85,7 @@ public class ScreenPinningRequest implements View.OnClickListener,
@Inject @Inject
public ScreenPinningRequest( public ScreenPinningRequest(
Context context, Context context,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy) { Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy) {
mContext = context; mContext = context;
mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy; mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy;
mAccessibilityService = (AccessibilityManager) mAccessibilityService = (AccessibilityManager)
@@ -269,10 +269,10 @@ public class ScreenPinningRequest implements View.OnClickListener,
.setVisibility(View.INVISIBLE); .setVisibility(View.INVISIBLE);
} }
final Optional<CentralSurfaces> centralSurfacesOptional = final Optional<CentralSurfacesInt> centralSurfacesOptional =
mCentralSurfacesOptionalLazy.get(); mCentralSurfacesOptionalLazy.get();
boolean recentsVisible = boolean recentsVisible =
centralSurfacesOptional.map(CentralSurfaces::isOverviewEnabled).orElse(false); centralSurfacesOptional.map(CentralSurfacesInt::isOverviewEnabled).orElse(false);
boolean touchExplorationEnabled = mAccessibilityService.isTouchExplorationEnabled(); boolean touchExplorationEnabled = mAccessibilityService.isTouchExplorationEnabled();
int descriptionStringResId; int descriptionStringResId;
if (QuickStepContract.isGesturalMode(mNavBarMode)) { if (QuickStepContract.isGesturalMode(mNavBarMode)) {
@@ -294,7 +294,7 @@ public class ScreenPinningRequest implements View.OnClickListener,
} }
NavigationBarView navigationBarView = NavigationBarView navigationBarView =
centralSurfacesOptional.map(CentralSurfaces::getNavigationBarView).orElse(null); centralSurfacesOptional.map(CentralSurfacesInt::getNavigationBarView).orElse(null);
if (navigationBarView != null) { if (navigationBarView != null) {
((ImageView) mLayout.findViewById(R.id.screen_pinning_back_icon)) ((ImageView) mLayout.findViewById(R.id.screen_pinning_back_icon))
.setImageDrawable(navigationBarView.getBackDrawable()); .setImageDrawable(navigationBarView.getBackDrawable());

View File

@@ -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_DISALLOW_ENTER_PIP;
import static com.android.systemui.screenshot.ScreenshotController.EXTRA_ID; 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.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.ActivityOptions;
import android.app.PendingIntent; import android.app.PendingIntent;
@@ -36,7 +36,7 @@ import android.view.RemoteAnimationAdapter;
import android.view.WindowManagerGlobal; import android.view.WindowManagerGlobal;
import com.android.systemui.shared.system.ActivityManagerWrapper; 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; import java.util.Optional;
@@ -49,12 +49,12 @@ import javax.inject.Inject;
public class ActionProxyReceiver extends BroadcastReceiver { public class ActionProxyReceiver extends BroadcastReceiver {
private static final String TAG = "ActionProxyReceiver"; private static final String TAG = "ActionProxyReceiver";
private final CentralSurfaces mCentralSurfaces; private final CentralSurfacesInt mCentralSurfaces;
private final ActivityManagerWrapper mActivityManagerWrapper; private final ActivityManagerWrapper mActivityManagerWrapper;
private final ScreenshotSmartActions mScreenshotSmartActions; private final ScreenshotSmartActions mScreenshotSmartActions;
@Inject @Inject
public ActionProxyReceiver(Optional<CentralSurfaces> centralSurfacesOptional, public ActionProxyReceiver(Optional<CentralSurfacesInt> centralSurfacesOptional,
ActivityManagerWrapper activityManagerWrapper, ActivityManagerWrapper activityManagerWrapper,
ScreenshotSmartActions screenshotSmartActions) { ScreenshotSmartActions screenshotSmartActions) {
mCentralSurfaces = centralSurfacesOptional.orElse(null); mCentralSurfaces = centralSurfacesOptional.orElse(null);

View File

@@ -23,7 +23,7 @@ import static android.inputmethodservice.InputMethodService.IME_INVISIBLE;
import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.INVALID_DISPLAY; import static android.view.Display.INVALID_DISPLAY;
import static com.android.systemui.statusbar.phone.CentralSurfaces.ONLY_CORE_APPS; import static com.android.systemui.statusbar.phone.CentralSurfacesImpl.ONLY_CORE_APPS;
import android.annotation.Nullable; import android.annotation.Nullable;
import android.app.ITransientNotificationCallback; import android.app.ITransientNotificationCallback;

View File

@@ -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.row.ExpandableView
import com.android.systemui.statusbar.notification.stack.AmbientState import com.android.systemui.statusbar.notification.stack.AmbientState
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController 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.KeyguardBypassController
import com.android.systemui.statusbar.phone.LSShadeTransitionLogger import com.android.systemui.statusbar.phone.LSShadeTransitionLogger
import com.android.systemui.statusbar.phone.NotificationPanelViewController import com.android.systemui.statusbar.phone.NotificationPanelViewController
@@ -78,7 +78,7 @@ class LockscreenShadeTransitionController @Inject constructor(
private var useSplitShade: Boolean = false private var useSplitShade: Boolean = false
private lateinit var nsslController: NotificationStackScrollLayoutController private lateinit var nsslController: NotificationStackScrollLayoutController
lateinit var notificationPanelController: NotificationPanelViewController lateinit var notificationPanelController: NotificationPanelViewController
lateinit var centralSurfaces: CentralSurfaces lateinit var centralSurfaces: CentralSurfacesInt
lateinit var qS: QS lateinit var qS: QS
/** /**

View File

@@ -34,7 +34,7 @@ import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.statusbar.dagger.CentralSurfacesModule; import com.android.systemui.statusbar.dagger.CentralSurfacesModule;
import com.android.systemui.statusbar.notification.collection.NotifCollection; 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.statusbar.phone.NotificationListenerWithPlugins;
import com.android.systemui.util.time.SystemClock; import com.android.systemui.util.time.SystemClock;
@@ -54,7 +54,7 @@ import javax.inject.Inject;
@SuppressLint("OverrideAbstract") @SuppressLint("OverrideAbstract")
public class NotificationListener extends NotificationListenerWithPlugins { public class NotificationListener extends NotificationListenerWithPlugins {
private static final String TAG = "NotificationListener"; 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 static final long MAX_RANKING_DELAY_MILLIS = 500L;
private final Context mContext; private final Context mContext;

View File

@@ -16,9 +16,9 @@
package com.android.systemui.statusbar; package com.android.systemui.statusbar;
import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; 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.CentralSurfacesInt.DEBUG_MEDIA_FAKE_ARTWORK;
import static com.android.systemui.statusbar.phone.CentralSurfaces.ENABLE_LOCKSCREEN_WALLPAPER; import static com.android.systemui.statusbar.phone.CentralSurfacesInt.ENABLE_LOCKSCREEN_WALLPAPER;
import static com.android.systemui.statusbar.phone.CentralSurfaces.SHOW_LOCKSCREEN_MEDIA_ARTWORK; import static com.android.systemui.statusbar.phone.CentralSurfacesInt.SHOW_LOCKSCREEN_MEDIA_ARTWORK;
import android.annotation.MainThread; import android.annotation.MainThread;
import android.annotation.NonNull; 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.notifcollection.NotifCollectionListener;
import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider;
import com.android.systemui.statusbar.phone.BiometricUnlockController; 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.KeyguardBypassController;
import com.android.systemui.statusbar.phone.LockscreenWallpaper; import com.android.systemui.statusbar.phone.LockscreenWallpaper;
import com.android.systemui.statusbar.phone.ScrimController; import com.android.systemui.statusbar.phone.ScrimController;
@@ -132,7 +132,7 @@ public class NotificationMediaManager implements Dumpable {
private final Context mContext; private final Context mContext;
private final ArrayList<MediaListener> mMediaListeners; private final ArrayList<MediaListener> mMediaListeners;
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; private final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
private final MediaArtworkProcessor mMediaArtworkProcessor; private final MediaArtworkProcessor mMediaArtworkProcessor;
private final Set<AsyncTask<?, ?, ?>> mProcessArtworkTasks = new ArraySet<>(); private final Set<AsyncTask<?, ?, ?>> mProcessArtworkTasks = new ArraySet<>();
@@ -177,7 +177,7 @@ public class NotificationMediaManager implements Dumpable {
*/ */
public NotificationMediaManager( public NotificationMediaManager(
Context context, Context context,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
Lazy<NotificationShadeWindowController> notificationShadeWindowController, Lazy<NotificationShadeWindowController> notificationShadeWindowController,
NotificationVisibilityProvider visibilityProvider, NotificationVisibilityProvider visibilityProvider,
NotificationEntryManager notificationEntryManager, NotificationEntryManager notificationEntryManager,
@@ -663,7 +663,7 @@ public class NotificationMediaManager implements Dumpable {
mNotificationShadeWindowController.get(); mNotificationShadeWindowController.get();
boolean hideBecauseOccluded = boolean hideBecauseOccluded =
mCentralSurfacesOptionalLazy.get() mCentralSurfacesOptionalLazy.get()
.map(CentralSurfaces::isOccluded).orElse(false); .map(CentralSurfacesInt::isOccluded).orElse(false);
final boolean hasArtwork = artworkDrawable != null; final boolean hasArtwork = artworkDrawable != null;
mColorExtractor.setHasMediaArtwork(hasMediaArtwork); mColorExtractor.setHasMediaArtwork(hasMediaArtwork);

View File

@@ -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.collection.render.NotificationVisibilityProvider;
import com.android.systemui.statusbar.notification.logging.NotificationLogger; import com.android.systemui.statusbar.notification.logging.NotificationLogger;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; 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.RemoteInputUriController;
import com.android.systemui.statusbar.policy.RemoteInputView; import com.android.systemui.statusbar.policy.RemoteInputView;
import com.android.systemui.util.DumpUtilsKt; import com.android.systemui.util.DumpUtilsKt;
@@ -102,7 +102,7 @@ public class NotificationRemoteInputManager implements Dumpable {
private final Handler mMainHandler; private final Handler mMainHandler;
private final ActionClickLogger mLogger; private final ActionClickLogger mLogger;
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; private final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
protected final Context mContext; protected final Context mContext;
protected final NotifPipelineFlags mNotifPipelineFlags; protected final NotifPipelineFlags mNotifPipelineFlags;
@@ -262,7 +262,7 @@ public class NotificationRemoteInputManager implements Dumpable {
NotificationVisibilityProvider visibilityProvider, NotificationVisibilityProvider visibilityProvider,
NotificationEntryManager notificationEntryManager, NotificationEntryManager notificationEntryManager,
RemoteInputNotificationRebuilder rebuilder, RemoteInputNotificationRebuilder rebuilder,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
StatusBarStateController statusBarStateController, StatusBarStateController statusBarStateController,
@Main Handler mainHandler, @Main Handler mainHandler,
RemoteInputUriController remoteInputUriController, RemoteInputUriController remoteInputUriController,

View File

@@ -20,16 +20,16 @@ import android.view.View;
import com.android.systemui.plugins.qs.QS; import com.android.systemui.plugins.qs.QS;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; 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. * Calculates and moves the QS frame vertically.
*/ */
public abstract class QsFrameTranslateController { public abstract class QsFrameTranslateController {
protected CentralSurfaces mCentralSurfaces; protected CentralSurfacesInt mCentralSurfaces;
public QsFrameTranslateController(CentralSurfaces centralSurfaces) { public QsFrameTranslateController(CentralSurfacesInt centralSurfaces) {
mCentralSurfaces = centralSurfaces; mCentralSurfaces = centralSurfaces;
} }

View File

@@ -21,7 +21,7 @@ import android.view.View;
import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.plugins.qs.QS; import com.android.systemui.plugins.qs.QS;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; 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; import javax.inject.Inject;
@@ -32,7 +32,7 @@ import javax.inject.Inject;
public class QsFrameTranslateImpl extends QsFrameTranslateController { public class QsFrameTranslateImpl extends QsFrameTranslateController {
@Inject @Inject
public QsFrameTranslateImpl(CentralSurfaces centralSurfaces) { public QsFrameTranslateImpl(CentralSurfacesInt centralSurfaces) {
super(centralSurfaces); super(centralSurfaces);
} }

View File

@@ -25,7 +25,7 @@ import android.view.WindowInsetsController.Appearance;
import android.view.WindowInsetsController.Behavior; import android.view.WindowInsetsController.Behavior;
import com.android.systemui.plugins.statusbar.StatusBarStateController; 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; import java.lang.annotation.Retention;
@@ -92,7 +92,7 @@ public interface SysuiStatusBarStateController extends StatusBarStateController
int getCurrentOrUpcomingState(); 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? * @param isDozing well, are we dozing?
* @return {@code true} if the state changed, else {@code false} * @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); 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? * @param expanded are we expanded?
* @return {@code true} if the state changed, else {@code false} * @return {@code true} if the state changed, else {@code false}
*/ */

View File

@@ -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.legacy.VisualStabilityManager;
import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection; import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection;
import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; 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.KeyguardBypassController;
import com.android.systemui.statusbar.phone.ManagedProfileController; import com.android.systemui.statusbar.phone.ManagedProfileController;
import com.android.systemui.statusbar.phone.ManagedProfileControllerImpl; import com.android.systemui.statusbar.phone.ManagedProfileControllerImpl;
@@ -87,7 +88,7 @@ import dagger.Module;
import dagger.Provides; 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 * this separate from {@link CentralSurfacesModule} module so that components that wish to build
* their own version of CentralSurfaces can include just dependencies, without injecting * their own version of CentralSurfaces can include just dependencies, without injecting
* CentralSurfaces itself. * CentralSurfaces itself.
@@ -105,7 +106,7 @@ public interface CentralSurfacesDependenciesModule {
NotificationVisibilityProvider visibilityProvider, NotificationVisibilityProvider visibilityProvider,
NotificationEntryManager notificationEntryManager, NotificationEntryManager notificationEntryManager,
RemoteInputNotificationRebuilder rebuilder, RemoteInputNotificationRebuilder rebuilder,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
StatusBarStateController statusBarStateController, StatusBarStateController statusBarStateController,
Handler mainHandler, Handler mainHandler,
RemoteInputUriController remoteInputUriController, RemoteInputUriController remoteInputUriController,
@@ -134,7 +135,7 @@ public interface CentralSurfacesDependenciesModule {
@Provides @Provides
static NotificationMediaManager provideNotificationMediaManager( static NotificationMediaManager provideNotificationMediaManager(
Context context, Context context,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
Lazy<NotificationShadeWindowController> notificationShadeWindowController, Lazy<NotificationShadeWindowController> notificationShadeWindowController,
NotificationVisibilityProvider visibilityProvider, NotificationVisibilityProvider visibilityProvider,
NotificationEntryManager notificationEntryManager, NotificationEntryManager notificationEntryManager,

View File

@@ -17,7 +17,8 @@
package com.android.systemui.statusbar.dagger package com.android.systemui.statusbar.dagger
import com.android.systemui.CoreStartable 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.Binds
import dagger.Module import dagger.Module
import dagger.multibindings.ClassKey import dagger.multibindings.ClassKey
@@ -28,6 +29,6 @@ interface StartCentralSurfacesModule {
/** Start the CentralSurfaces */ /** Start the CentralSurfaces */
@Binds @Binds
@IntoMap @IntoMap
@ClassKey(CentralSurfaces::class) @ClassKey(CentralSurfacesInt::class)
abstract fun bindsCentralSurfaces(centralSurfaces: CentralSurfaces): CoreStartable abstract fun bindsCentralSurfaces(centralSurfaces: CentralSurfacesImpl): CoreStartable
} }

View File

@@ -24,7 +24,7 @@ import android.view.View;
import com.android.systemui.DejankUtils; import com.android.systemui.DejankUtils;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; 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 com.android.wm.shell.bubbles.Bubbles;
import java.util.Optional; import java.util.Optional;
@@ -39,7 +39,7 @@ public final class NotificationClicker implements View.OnClickListener {
private static final String TAG = "NotificationClicker"; private static final String TAG = "NotificationClicker";
private final NotificationClickerLogger mLogger; private final NotificationClickerLogger mLogger;
private final Optional<CentralSurfaces> mCentralSurfacesOptional; private final Optional<CentralSurfacesInt> mCentralSurfacesOptional;
private final Optional<Bubbles> mBubblesOptional; private final Optional<Bubbles> mBubblesOptional;
private final NotificationActivityStarter mNotificationActivityStarter; private final NotificationActivityStarter mNotificationActivityStarter;
@@ -53,7 +53,7 @@ public final class NotificationClicker implements View.OnClickListener {
private NotificationClicker( private NotificationClicker(
NotificationClickerLogger logger, NotificationClickerLogger logger,
Optional<CentralSurfaces> centralSurfacesOptional, Optional<CentralSurfacesInt> centralSurfacesOptional,
Optional<Bubbles> bubblesOptional, Optional<Bubbles> bubblesOptional,
NotificationActivityStarter notificationActivityStarter) { NotificationActivityStarter notificationActivityStarter) {
mLogger = logger; mLogger = logger;
@@ -137,7 +137,7 @@ public final class NotificationClicker implements View.OnClickListener {
/** Builds an instance. */ /** Builds an instance. */
public NotificationClicker build( public NotificationClicker build(
Optional<CentralSurfaces> centralSurfacesOptional, Optional<CentralSurfacesInt> centralSurfacesOptional,
Optional<Bubbles> bubblesOptional, Optional<Bubbles> bubblesOptional,
NotificationActivityStarter notificationActivityStarter NotificationActivityStarter notificationActivityStarter
) { ) {

View File

@@ -23,7 +23,7 @@ import android.util.Log
import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection
import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener 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 import javax.inject.Inject
@SysUISingleton @SysUISingleton
@@ -39,7 +39,7 @@ class TargetSdkResolver @Inject constructor(
} }
private fun resolveNotificationSdk(sbn: StatusBarNotification): Int { 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 var targetSdk = 0
// Extract target SDK version. // Extract target SDK version.
try { try {

View File

@@ -16,7 +16,7 @@
package com.android.systemui.statusbar.notification.collection.legacy; 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.service.notification.StatusBarNotification;
import android.util.Log; import android.util.Log;

View File

@@ -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.row.OnUserInteractionCallback;
import com.android.systemui.statusbar.notification.stack.NotificationSectionsManager; import com.android.systemui.statusbar.notification.stack.NotificationSectionsManager;
import com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm; 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.KeyguardBypassController;
import com.android.systemui.statusbar.phone.NotifActivityLaunchEventsModule; import com.android.systemui.statusbar.phone.NotifActivityLaunchEventsModule;
import com.android.systemui.statusbar.phone.NotifPanelEventsModule; import com.android.systemui.statusbar.phone.NotifPanelEventsModule;
@@ -153,7 +153,7 @@ public interface NotificationsModule {
@Provides @Provides
static NotificationGutsManager provideNotificationGutsManager( static NotificationGutsManager provideNotificationGutsManager(
Context context, Context context,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
@Main Handler mainHandler, @Main Handler mainHandler,
@Background Handler bgHandler, @Background Handler bgHandler,
AccessibilityManager accessibilityManager, AccessibilityManager accessibilityManager,

View File

@@ -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.interruption.HeadsUpViewBinder
import com.android.systemui.statusbar.notification.row.NotifBindPipelineInitializer import com.android.systemui.statusbar.notification.row.NotifBindPipelineInitializer
import com.android.systemui.statusbar.notification.stack.NotificationListContainer 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.phone.NotificationGroupAlertTransferHelper
import com.android.systemui.statusbar.policy.DeviceProvisionedController import com.android.systemui.statusbar.policy.DeviceProvisionedController
import com.android.systemui.statusbar.policy.HeadsUpManager import com.android.systemui.statusbar.policy.HeadsUpManager
@@ -63,7 +63,7 @@ import javax.inject.Inject
*/ */
@SysUISingleton @SysUISingleton
class NotificationsControllerImpl @Inject constructor( class NotificationsControllerImpl @Inject constructor(
private val centralSurfaces: Lazy<CentralSurfaces>, private val centralSurfaces: Lazy<CentralSurfacesInt>,
private val notifPipelineFlags: NotifPipelineFlags, private val notifPipelineFlags: NotifPipelineFlags,
private val notificationListener: NotificationListener, private val notificationListener: NotificationListener,
private val entryManager: NotificationEntryManager, private val entryManager: NotificationEntryManager,

View File

@@ -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.NotificationChildrenContainer;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
import com.android.systemui.statusbar.notification.stack.SwipeableView; 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.phone.KeyguardBypassController;
import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.HeadsUpManager;
import com.android.systemui.statusbar.policy.InflatedSmartReplyState; import com.android.systemui.statusbar.policy.InflatedSmartReplyState;
@@ -398,7 +398,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
return isSystem; return isSystem;
} else { } else {
PackageManager packageManager = CentralSurfaces.getPackageManagerForUser( PackageManager packageManager = CentralSurfacesInt.getPackageManagerForUser(
context, sbn.getUser().getIdentifier()); context, sbn.getUser().getIdentifier());
Boolean isSystemNotification = null; Boolean isSystemNotification = null;

View File

@@ -47,7 +47,7 @@ import com.android.systemui.statusbar.notification.ConversationNotificationProce
import com.android.systemui.statusbar.notification.InflationException; import com.android.systemui.statusbar.notification.InflationException;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.wrapper.NotificationViewWrapper; 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.InflatedSmartReplyState;
import com.android.systemui.statusbar.policy.InflatedSmartReplyViewHolder; import com.android.systemui.statusbar.policy.InflatedSmartReplyViewHolder;
import com.android.systemui.statusbar.policy.SmartReplyStateInflater; import com.android.systemui.statusbar.policy.SmartReplyStateInflater;
@@ -841,7 +841,7 @@ public class NotificationContentInflater implements NotificationRowContentBinder
StatusBarNotification sbn = mEntry.getSbn(); StatusBarNotification sbn = mEntry.getSbn();
final String ident = sbn.getPackageName() + "/0x" final String ident = sbn.getPackageName() + "/0x"
+ Integer.toHexString(sbn.getId()); + 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) { if (mCallback != null) {
mCallback.handleInflationException(mRow.getEntry(), mCallback.handleInflationException(mRow.getEntry(),
new InflationException("Couldn't inflate contentViews" + e)); new InflationException("Couldn't inflate contentViews" + e));

View File

@@ -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.dagger.NotificationsModule;
import com.android.systemui.statusbar.notification.row.NotificationInfo.CheckSaveListener; import com.android.systemui.statusbar.notification.row.NotificationInfo.CheckSaveListener;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer; 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.phone.ShadeController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.wmshell.BubblesManager; import com.android.systemui.wmshell.BubblesManager;
@@ -119,7 +119,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
@VisibleForTesting @VisibleForTesting
protected String mKeyToRemoveOnGutsClosed; protected String mKeyToRemoveOnGutsClosed;
private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; private final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
private final Handler mMainHandler; private final Handler mMainHandler;
private final Handler mBgHandler; private final Handler mBgHandler;
private final Optional<BubblesManager> mBubblesManagerOptional; private final Optional<BubblesManager> mBubblesManagerOptional;
@@ -138,7 +138,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
* Injected constructor. See {@link NotificationsModule}. * Injected constructor. See {@link NotificationsModule}.
*/ */
public NotificationGutsManager(Context context, public NotificationGutsManager(Context context,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
@Main Handler mainHandler, @Main Handler mainHandler,
@Background Handler bgHandler, @Background Handler bgHandler,
AccessibilityManager accessibilityManager, AccessibilityManager accessibilityManager,
@@ -341,7 +341,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
} }
StatusBarNotification sbn = row.getEntry().getSbn(); StatusBarNotification sbn = row.getEntry().getSbn();
UserHandle userHandle = sbn.getUser(); UserHandle userHandle = sbn.getUser();
PackageManager pmUser = CentralSurfaces.getPackageManagerForUser(mContext, PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser(mContext,
userHandle.getIdentifier()); userHandle.getIdentifier());
feedbackInfo.bindGuts(pmUser, sbn, row.getEntry(), row, mAssistantFeedbackController); 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 // Settings link is only valid for notifications that specify a non-system user
NotificationInfo.OnSettingsClickListener onSettingsClick = null; NotificationInfo.OnSettingsClickListener onSettingsClick = null;
UserHandle userHandle = sbn.getUser(); UserHandle userHandle = sbn.getUser();
PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser(
mContext, userHandle.getIdentifier()); mContext, userHandle.getIdentifier());
final NotificationInfo.OnAppSettingsClickListener onAppSettingsClick = final NotificationInfo.OnAppSettingsClickListener onAppSettingsClick =
(View v, Intent intent) -> { (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 // Settings link is only valid for notifications that specify a non-system user
NotificationInfo.OnSettingsClickListener onSettingsClick = null; NotificationInfo.OnSettingsClickListener onSettingsClick = null;
UserHandle userHandle = sbn.getUser(); UserHandle userHandle = sbn.getUser();
PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser(
mContext, userHandle.getIdentifier()); mContext, userHandle.getIdentifier());
if (!userHandle.equals(UserHandle.ALL) 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 // Settings link is only valid for notifications that specify a non-system user
NotificationConversationInfo.OnSettingsClickListener onSettingsClick = null; NotificationConversationInfo.OnSettingsClickListener onSettingsClick = null;
UserHandle userHandle = sbn.getUser(); UserHandle userHandle = sbn.getUser();
PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser(
mContext, userHandle.getIdentifier()); mContext, userHandle.getIdentifier());
final NotificationConversationInfo.OnAppSettingsClickListener onAppSettingsClick = final NotificationConversationInfo.OnAppSettingsClickListener onAppSettingsClick =
(View v, Intent intent) -> { (View v, Intent intent) -> {
@@ -570,7 +570,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
.setLeaveOpenOnKeyguardHide(true); .setLeaveOpenOnKeyguardHide(true);
} }
Optional<CentralSurfaces> centralSurfacesOptional = Optional<CentralSurfacesInt> centralSurfacesOptional =
mCentralSurfacesOptionalLazy.get(); mCentralSurfacesOptionalLazy.get();
if (centralSurfacesOptional.isPresent()) { if (centralSurfacesOptional.isPresent()) {
Runnable r = () -> mMainHandler.post( Runnable r = () -> mMainHandler.post(
@@ -584,7 +584,7 @@ public class NotificationGutsManager implements Dumpable, NotificationLifetimeEx
return true; 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)}. * {@link #openGutsInternal(View,int,int,NotificationMenuRowPlugin.MenuItem)}.
*/ */
} }

View File

@@ -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.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRowController; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRowController;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer; 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.Binds;
import dagger.BindsInstance; import dagger.BindsInstance;
@@ -100,7 +100,7 @@ public interface ExpandableNotificationRowComponent {
// but since this field is used in the guts, it must be accurate. // 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 // Therefore we will only show the application label, or, failing that, the
// package name. No substitutions. // package name. No substitutions.
PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( PackageManager pmUser = CentralSurfacesInt.getPackageManagerForUser(
context, statusBarNotification.getUser().getIdentifier()); context, statusBarNotification.getUser().getIdentifier());
final String pkg = statusBarNotification.getPackageName(); final String pkg = statusBarNotification.getPackageName();
try { try {

View File

@@ -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.ExpandableView;
import com.android.systemui.statusbar.notification.row.FooterView; import com.android.systemui.statusbar.notification.row.FooterView;
import com.android.systemui.statusbar.notification.row.StackScrollerDecorView; 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.HeadsUpAppearanceController;
import com.android.systemui.statusbar.phone.HeadsUpTouchHelper; import com.android.systemui.statusbar.phone.HeadsUpTouchHelper;
import com.android.systemui.statusbar.phone.ScreenOffAnimationController; import com.android.systemui.statusbar.phone.ScreenOffAnimationController;
@@ -305,7 +305,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
} }
}; };
private NotificationStackScrollLogger mLogger; private NotificationStackScrollLogger mLogger;
private CentralSurfaces mCentralSurfaces; private CentralSurfacesInt mCentralSurfaces;
private int[] mTempInt2 = new int[2]; private int[] mTempInt2 = new int[2];
private boolean mGenerateChildOrderChangedEvent; private boolean mGenerateChildOrderChangedEvent;
private HashSet<Runnable> mAnimationFinishedRunnables = new HashSet<>(); private HashSet<Runnable> mAnimationFinishedRunnables = new HashSet<>();
@@ -4590,7 +4590,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
} }
@ShadeViewRefactor(RefactorComponent.SHADE_VIEW) @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
public void setCentralSurfaces(CentralSurfaces centralSurfaces) { public void setCentralSurfaces(CentralSurfacesInt centralSurfaces) {
this.mCentralSurfaces = centralSurfaces; this.mCentralSurfaces = centralSurfaces;
} }

View File

@@ -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.NotificationGuts;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
import com.android.systemui.statusbar.notification.row.NotificationSnooze; 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.HeadsUpAppearanceController;
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone; import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
import com.android.systemui.statusbar.phone.HeadsUpTouchHelper; import com.android.systemui.statusbar.phone.HeadsUpTouchHelper;
@@ -176,7 +176,7 @@ public class NotificationStackScrollLayoutController {
private final KeyguardBypassController mKeyguardBypassController; private final KeyguardBypassController mKeyguardBypassController;
private final NotificationLockscreenUserManager mLockscreenUserManager; private final NotificationLockscreenUserManager mLockscreenUserManager;
// TODO: CentralSurfaces should be encapsulated behind a Controller // TODO: CentralSurfaces should be encapsulated behind a Controller
private final CentralSurfaces mCentralSurfaces; private final CentralSurfacesInt mCentralSurfaces;
private final SectionHeaderController mSilentHeaderController; private final SectionHeaderController mSilentHeaderController;
private final LockscreenShadeTransitionController mLockscreenShadeTransitionController; private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
private final ShadeTransitionController mShadeTransitionController; private final ShadeTransitionController mShadeTransitionController;
@@ -639,7 +639,7 @@ public class NotificationStackScrollLayoutController {
FalsingManager falsingManager, FalsingManager falsingManager,
@Main Resources resources, @Main Resources resources,
NotificationSwipeHelper.Builder notificationSwipeHelperBuilder, NotificationSwipeHelper.Builder notificationSwipeHelperBuilder,
CentralSurfaces centralSurfaces, CentralSurfacesInt centralSurfaces,
ScrimController scrimController, ScrimController scrimController,
NotificationGroupManagerLegacy legacyGroupManager, NotificationGroupManagerLegacy legacyGroupManager,
GroupExpansionManager groupManager, GroupExpansionManager groupManager,

View File

@@ -699,7 +699,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
public void run() { public void run() {
mNotificationShadeWindowController.setForceDozeBrightness(false); mNotificationShadeWindowController.setForceDozeBrightness(false);
} }
}, CentralSurfaces.FADE_KEYGUARD_DURATION_PULSING); }, CentralSurfacesInt.FADE_KEYGUARD_DURATION_PULSING);
} }
public void finishKeyguardFadingAway() { public void finishKeyguardFadingAway() {

View File

@@ -72,7 +72,7 @@ import javax.inject.Inject;
/** */ /** */
@CentralSurfacesComponent.CentralSurfacesScope @CentralSurfacesComponent.CentralSurfacesScope
public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callbacks { public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callbacks {
private final CentralSurfaces mCentralSurfaces; private final CentralSurfacesInt mCentralSurfaces;
private final Context mContext; private final Context mContext;
private final ShadeController mShadeController; private final ShadeController mShadeController;
private final CommandQueue mCommandQueue; private final CommandQueue mCommandQueue;
@@ -106,7 +106,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
@Inject @Inject
CentralSurfacesCommandQueueCallbacks( CentralSurfacesCommandQueueCallbacks(
CentralSurfaces centralSurfaces, CentralSurfacesInt centralSurfaces,
Context context, Context context,
@Main Resources resources, @Main Resources resources,
ShadeController shadeController, ShadeController shadeController,
@@ -207,8 +207,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
@Override @Override
public void animateExpandNotificationsPanel() { public void animateExpandNotificationsPanel() {
if (CentralSurfaces.SPEW) { if (CentralSurfacesInt.SPEW) {
Log.d(CentralSurfaces.TAG, Log.d(CentralSurfacesInt.TAG,
"animateExpand: mExpandedVisible=" + mCentralSurfaces.isExpandedVisible()); "animateExpand: mExpandedVisible=" + mCentralSurfaces.isExpandedVisible());
} }
if (!mCommandQueue.panelsEnabled()) { if (!mCommandQueue.panelsEnabled()) {
@@ -220,8 +220,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
@Override @Override
public void animateExpandSettingsPanel(@Nullable String subPanel) { public void animateExpandSettingsPanel(@Nullable String subPanel) {
if (CentralSurfaces.SPEW) { if (CentralSurfacesInt.SPEW) {
Log.d(CentralSurfaces.TAG, Log.d(CentralSurfacesInt.TAG,
"animateExpand: mExpandedVisible=" + mCentralSurfaces.isExpandedVisible()); "animateExpand: mExpandedVisible=" + mCentralSurfaces.isExpandedVisible());
} }
if (!mCommandQueue.panelsEnabled()) { if (!mCommandQueue.panelsEnabled()) {
@@ -244,7 +244,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
@Override @Override
public void dismissKeyboardShortcutsMenu() { 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. * State is one or more of the DISABLE constants from StatusBarManager.
@@ -257,7 +257,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
int state2BeforeAdjustment = state2; int state2BeforeAdjustment = state2;
state2 = mRemoteInputQuickSettingsDisabler.adjustDisableFlags(state2); state2 = mRemoteInputQuickSettingsDisabler.adjustDisableFlags(state2);
Log.d(CentralSurfaces.TAG, Log.d(CentralSurfacesInt.TAG,
mDisableFlagsLogger.getDisableFlagsString( mDisableFlagsLogger.getDisableFlagsString(
/* old= */ new DisableFlagsLogger.DisableState( /* old= */ new DisableFlagsLogger.DisableState(
mCentralSurfaces.getDisabled1(), mCentralSurfaces.getDisabled2()), mCentralSurfaces.getDisabled1(), mCentralSurfaces.getDisabled2()),
@@ -306,8 +306,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
*/ */
@Override @Override
public void handleSystemKey(int key) { public void handleSystemKey(int key) {
if (CentralSurfaces.SPEW) { if (CentralSurfacesInt.SPEW) {
Log.d(CentralSurfaces.TAG, "handleNavigationKey: " + key); Log.d(CentralSurfacesInt.TAG, "handleNavigationKey: " + key);
} }
if (!mCommandQueue.panelsEnabled() || !mKeyguardUpdateMonitor.isDeviceInteractive() if (!mCommandQueue.panelsEnabled() || !mKeyguardUpdateMonitor.isDeviceInteractive()
|| mKeyguardStateController.isShowing() && !mKeyguardStateController.isOccluded()) { || mKeyguardStateController.isShowing() && !mKeyguardStateController.isOccluded()) {
@@ -345,15 +345,15 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
public void onCameraLaunchGestureDetected(int source) { public void onCameraLaunchGestureDetected(int source) {
mCentralSurfaces.setLastCameraLaunchSource(source); mCentralSurfaces.setLastCameraLaunchSource(source);
if (mCentralSurfaces.isGoingToSleep()) { if (mCentralSurfaces.isGoingToSleep()) {
if (CentralSurfaces.DEBUG_CAMERA_LIFT) { if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) {
Slog.d(CentralSurfaces.TAG, "Finish going to sleep before launching camera"); Slog.d(CentralSurfacesInt.TAG, "Finish going to sleep before launching camera");
} }
mCentralSurfaces.setLaunchCameraOnFinishedGoingToSleep(true); mCentralSurfaces.setLaunchCameraOnFinishedGoingToSleep(true);
return; return;
} }
if (!mNotificationPanelViewController.canCameraGestureBeLaunched()) { if (!mNotificationPanelViewController.canCameraGestureBeLaunched()) {
if (CentralSurfaces.DEBUG_CAMERA_LIFT) { if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) {
Slog.d(CentralSurfaces.TAG, "Can't launch camera right now"); Slog.d(CentralSurfacesInt.TAG, "Can't launch camera right now");
} }
return; return;
} }
@@ -364,7 +364,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
vibrateForCameraGesture(); vibrateForCameraGesture();
if (source == StatusBarManager.CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP) { if (source == StatusBarManager.CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP) {
Log.v(CentralSurfaces.TAG, "Camera launch"); Log.v(CentralSurfacesInt.TAG, "Camera launch");
mKeyguardUpdateMonitor.onCameraLaunched(); 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 // Avoid flickering of the scrim when we instant launch the camera and the bouncer
// comes on. // comes on.
mCentralSurfaces.acquireGestureWakeLock( mCentralSurfaces.acquireGestureWakeLock(
CentralSurfaces.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L); CentralSurfacesInt.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L);
} }
if (isWakingUpOrAwake()) { if (isWakingUpOrAwake()) {
if (CentralSurfaces.DEBUG_CAMERA_LIFT) { if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) {
Slog.d(CentralSurfaces.TAG, "Launching camera"); Slog.d(CentralSurfacesInt.TAG, "Launching camera");
} }
if (mStatusBarKeyguardViewManager.isBouncerShowing()) { if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
mStatusBarKeyguardViewManager.reset(true /* hide */); 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 // 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 // incorrectly get notified because of the screen on event (which resumes and pauses
// some activities) // some activities)
if (CentralSurfaces.DEBUG_CAMERA_LIFT) { if (CentralSurfacesInt.DEBUG_CAMERA_LIFT) {
Slog.d(CentralSurfaces.TAG, "Deferring until screen turns on"); Slog.d(CentralSurfacesInt.TAG, "Deferring until screen turns on");
} }
mCentralSurfaces.setLaunchCameraOnFinishedWaking(true); mCentralSurfaces.setLaunchCameraOnFinishedWaking(true);
} }
@@ -409,7 +409,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
Intent emergencyIntent = mCentralSurfaces.getEmergencyActionIntent(); Intent emergencyIntent = mCentralSurfaces.getEmergencyActionIntent();
if (emergencyIntent == null) { 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; 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 // Avoid flickering of the scrim when we instant launch the camera and the bouncer
// comes on. // comes on.
mCentralSurfaces.acquireGestureWakeLock( mCentralSurfaces.acquireGestureWakeLock(
CentralSurfaces.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L); CentralSurfacesInt.LAUNCH_TRANSITION_TIMEOUT_MS + 1000L);
} }
if (isWakingUpOrAwake()) { if (isWakingUpOrAwake()) {
@@ -492,7 +492,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
@Override @Override
public void toggleKeyboardShortcutsMenu(int deviceId) { public void toggleKeyboardShortcutsMenu(int deviceId) {
mCentralSurfaces.resendMessage(new CentralSurfaces.KeyboardShortcutsMessage(deviceId)); mCentralSurfaces.resendMessage(new CentralSurfacesInt.KeyboardShortcutsMessage(deviceId));
} }
@Override @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 // Make sure to pass -1 for repeat so VibratorManagerService doesn't stop us when going
// to sleep. // to sleep.
return VibrationEffect.createWaveform( return VibrationEffect.createWaveform(
CentralSurfaces.CAMERA_LAUNCH_GESTURE_VIBRATION_TIMINGS, CentralSurfacesInt.CAMERA_LAUNCH_GESTURE_VIBRATION_TIMINGS,
CentralSurfaces.CAMERA_LAUNCH_GESTURE_VIBRATION_AMPLITUDES, CentralSurfacesInt.CAMERA_LAUNCH_GESTURE_VIBRATION_AMPLITUDES,
/* repeat= */ -1); /* repeat= */ -1);
} }

View File

@@ -0,0 +1,585 @@
/*
* 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 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;
}
}
}

View File

@@ -97,7 +97,7 @@ public final class DozeServiceHost implements DozeHost {
private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
private NotificationPanelViewController mNotificationPanel; private NotificationPanelViewController mNotificationPanel;
private View mAmbientIndicationContainer; private View mAmbientIndicationContainer;
private CentralSurfaces mCentralSurfaces; private CentralSurfacesInt mCentralSurfaces;
private boolean mAlwaysOnSuppressed; private boolean mAlwaysOnSuppressed;
@Inject @Inject
@@ -146,7 +146,7 @@ public final class DozeServiceHost implements DozeHost {
* Initialize instance with objects only available later during execution. * Initialize instance with objects only available later during execution.
*/ */
public void initialize( public void initialize(
CentralSurfaces centralSurfaces, CentralSurfacesInt centralSurfaces,
StatusBarKeyguardViewManager statusBarKeyguardViewManager, StatusBarKeyguardViewManager statusBarKeyguardViewManager,
NotificationShadeWindowViewController notificationShadeWindowViewController, NotificationShadeWindowViewController notificationShadeWindowViewController,
NotificationPanelViewController notificationPanel, NotificationPanelViewController notificationPanel,

View File

@@ -168,7 +168,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
private FlashlightController mFlashlightController; private FlashlightController mFlashlightController;
private PreviewInflater mPreviewInflater; private PreviewInflater mPreviewInflater;
private AccessibilityController mAccessibilityController; private AccessibilityController mAccessibilityController;
private CentralSurfaces mCentralSurfaces; private CentralSurfacesInt mCentralSurfaces;
private KeyguardAffordanceHelper mAffordanceHelper; private KeyguardAffordanceHelper mAffordanceHelper;
private FalsingManager mFalsingManager; private FalsingManager mFalsingManager;
private boolean mUserSetupComplete; private boolean mUserSetupComplete;
@@ -472,7 +472,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
mRightAffordanceView.setContentDescription(state.contentDescription); mRightAffordanceView.setContentDescription(state.contentDescription);
} }
public void setCentralSurfaces(CentralSurfaces centralSurfaces) { public void setCentralSurfaces(CentralSurfacesInt centralSurfaces) {
mCentralSurfaces = centralSurfaces; mCentralSurfaces = centralSurfaces;
updateCameraVisibility(); // in case onFinishInflate() was called too early updateCameraVisibility(); // in case onFinishInflate() was called too early
} }

View File

@@ -14,8 +14,8 @@
package com.android.systemui.statusbar.phone; package com.android.systemui.statusbar.phone;
import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG; import static com.android.systemui.statusbar.phone.CentralSurfacesInt.DEBUG;
import static com.android.systemui.statusbar.phone.CentralSurfaces.MULTIUSER_DEBUG; import static com.android.systemui.statusbar.phone.CentralSurfacesInt.MULTIUSER_DEBUG;
import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification;
import android.util.Log; import android.util.Log;

View File

@@ -1093,7 +1093,7 @@ public class NotificationPanelViewController extends PanelViewController {
return mKeyguardStatusViewController.hasCustomClock(); return mKeyguardStatusViewController.hasCustomClock();
} }
private void setCentralSurfaces(CentralSurfaces centralSurfaces) { private void setCentralSurfaces(CentralSurfacesInt centralSurfaces) {
// TODO: this can be injected. // TODO: this can be injected.
mCentralSurfaces = centralSurfaces; mCentralSurfaces = centralSurfaces;
mKeyguardBottomArea.setCentralSurfaces(mCentralSurfaces); mKeyguardBottomArea.setCentralSurfaces(mCentralSurfaces);
@@ -3933,7 +3933,7 @@ public class NotificationPanelViewController extends PanelViewController {
* @param hideExpandedRunnable a runnable to run when we need to hide the expanded panel. * @param hideExpandedRunnable a runnable to run when we need to hide the expanded panel.
*/ */
public void initDependencies( public void initDependencies(
CentralSurfaces centralSurfaces, CentralSurfacesInt centralSurfaces,
Runnable hideExpandedRunnable, Runnable hideExpandedRunnable,
NotificationShelfController notificationShelfController) { NotificationShelfController notificationShelfController) {
setCentralSurfaces(centralSurfaces); setCentralSurfaces(centralSurfaces);

View File

@@ -850,7 +850,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW
Set<String> mComponentsForcingTopUi = new HashSet<>(); Set<String> mComponentsForcingTopUi = new HashSet<>();
/** /**
* The status bar state from {@link CentralSurfaces}. * The status bar state from {@link CentralSurfacesInt}.
*/ */
int mStatusBarState; int mStatusBarState;

View File

@@ -58,7 +58,7 @@ import com.android.systemui.R;
*/ */
public class NotificationShadeWindowView extends FrameLayout { public class NotificationShadeWindowView extends FrameLayout {
public static final String TAG = "NotificationShadeWindowView"; 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 mRightInset = 0;
private int mLeftInset = 0; private int mLeftInset = 0;

View File

@@ -82,7 +82,7 @@ public class NotificationShadeWindowViewController {
private boolean mExpandAnimationRunning; private boolean mExpandAnimationRunning;
private NotificationStackScrollLayout mStackScrollLayout; private NotificationStackScrollLayout mStackScrollLayout;
private PhoneStatusBarViewController mStatusBarViewController; private PhoneStatusBarViewController mStatusBarViewController;
private final CentralSurfaces mService; private final CentralSurfacesInt mService;
private final NotificationShadeWindowController mNotificationShadeWindowController; private final NotificationShadeWindowController mNotificationShadeWindowController;
private DragDownHelper mDragDownHelper; private DragDownHelper mDragDownHelper;
private boolean mDoubleTapEnabled; private boolean mDoubleTapEnabled;
@@ -111,7 +111,7 @@ public class NotificationShadeWindowViewController {
StatusBarWindowStateController statusBarWindowStateController, StatusBarWindowStateController statusBarWindowStateController,
LockIconViewController lockIconViewController, LockIconViewController lockIconViewController,
Optional<LowLightClockController> lowLightClockController, Optional<LowLightClockController> lowLightClockController,
CentralSurfaces centralSurfaces, CentralSurfacesInt centralSurfaces,
NotificationShadeWindowController controller, NotificationShadeWindowController controller,
KeyguardUnlockAnimationController keyguardUnlockAnimationController, KeyguardUnlockAnimationController keyguardUnlockAnimationController,
AmbientState ambientState) { AmbientState ambientState) {
@@ -252,7 +252,7 @@ public class NotificationShadeWindowViewController {
} }
if (mStatusBarStateController.isDozing()) { if (mStatusBarStateController.isDozing()) {
mService.mDozeScrimController.extendPulse(); mService.extendDozePulse();
} }
mLockIconViewController.onTouchEvent( mLockIconViewController.onTouchEvent(
ev, ev,

View File

@@ -27,7 +27,7 @@ public abstract class PanelView extends FrameLayout {
public static final String TAG = PanelView.class.getSimpleName(); public static final String TAG = PanelView.class.getSimpleName();
private PanelViewController.TouchHandler mTouchHandler; private PanelViewController.TouchHandler mTouchHandler;
protected CentralSurfaces mCentralSurfaces; protected CentralSurfacesInt mCentralSurfaces;
protected HeadsUpManagerPhone mHeadsUpManager; protected HeadsUpManagerPhone mHeadsUpManager;
protected KeyguardBottomAreaView mKeyguardBottomArea; protected KeyguardBottomAreaView mKeyguardBottomArea;

View File

@@ -114,7 +114,7 @@ public abstract class PanelViewController {
Log.v(TAG, (mViewName != null ? (mViewName + ": ") : "") + String.format(fmt, args)); Log.v(TAG, (mViewName != null ? (mViewName + ": ") : "") + String.format(fmt, args));
} }
protected CentralSurfaces mCentralSurfaces; protected CentralSurfacesInt mCentralSurfaces;
protected HeadsUpManagerPhone mHeadsUpManager; protected HeadsUpManagerPhone mHeadsUpManager;
protected final StatusBarTouchableRegionManager mStatusBarTouchableRegionManager; protected final StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;

View File

@@ -37,7 +37,7 @@ class ScreenOffAnimationController @Inject constructor(
private val animations: List<ScreenOffAnimation> = private val animations: List<ScreenOffAnimation> =
listOfNotNull(foldToAodAnimation, unlockedScreenOffAnimation) listOfNotNull(foldToAodAnimation, unlockedScreenOffAnimation)
fun initialize(centralSurfaces: CentralSurfaces, lightRevealScrim: LightRevealScrim) { fun initialize(centralSurfaces: CentralSurfacesInt, lightRevealScrim: LightRevealScrim) {
animations.forEach { it.initialize(centralSurfaces, lightRevealScrim) } animations.forEach { it.initialize(centralSurfaces, lightRevealScrim) }
wakefulnessLifecycle.addObserver(this) wakefulnessLifecycle.addObserver(this)
} }
@@ -197,7 +197,7 @@ class ScreenOffAnimationController @Inject constructor(
} }
interface ScreenOffAnimation { 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 * Called when started going to sleep, should return true if the animation will be played

View File

@@ -437,7 +437,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
} }
if (mKeyguardUpdateMonitor.needsSlowUnlockTransition() && mState == ScrimState.UNLOCKED) { if (mKeyguardUpdateMonitor.needsSlowUnlockTransition() && mState == ScrimState.UNLOCKED) {
mAnimationDelay = CentralSurfaces.FADE_KEYGUARD_START_DELAY; mAnimationDelay = CentralSurfacesInt.FADE_KEYGUARD_START_DELAY;
scheduleUpdate(); scheduleUpdate();
} else if (((oldState == ScrimState.AOD || oldState == ScrimState.PULSING) // leaving doze } else if (((oldState == ScrimState.AOD || oldState == ScrimState.PULSING) // leaving doze
&& (!mDozeParameters.getAlwaysOn() || mState == ScrimState.UNLOCKED)) && (!mDozeParameters.getAlwaysOn() || mState == ScrimState.UNLOCKED))

View File

@@ -238,7 +238,7 @@ public enum ScrimState {
mAnimationDuration = mKeyguardFadingAway mAnimationDuration = mKeyguardFadingAway
? mKeyguardFadingAwayDuration ? mKeyguardFadingAwayDuration
: CentralSurfaces.FADE_KEYGUARD_DURATION; : CentralSurfacesInt.FADE_KEYGUARD_DURATION;
boolean fromAod = previousState == AOD || previousState == PULSING; boolean fromAod = previousState == AOD || previousState == PULSING;
mAnimateChange = !mLaunchingAffordanceWithPreview && !fromAod; mAnimateChange = !mLaunchingAffordanceWithPreview && !fromAod;

View File

@@ -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 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 * and can be in multiple states: dozing, locked, showing the bouncer, occluded, etc. All/some of
* these are coordinated with {@link StatusBarKeyguardViewManager} via * these are coordinated with {@link StatusBarKeyguardViewManager} via
* {@link com.android.systemui.keyguard.KeyguardViewMediator} and others. * {@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 * 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); void animateCollapsePanels(int flags, boolean force);

View File

@@ -47,7 +47,7 @@ public class ShadeControllerImpl implements ShadeController {
protected final NotificationShadeWindowController mNotificationShadeWindowController; protected final NotificationShadeWindowController mNotificationShadeWindowController;
private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
private final int mDisplayId; private final int mDisplayId;
protected final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; protected final Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
private final Lazy<AssistManager> mAssistManagerLazy; private final Lazy<AssistManager> mAssistManagerLazy;
private final ArrayList<Runnable> mPostCollapseRunnables = new ArrayList<>(); private final ArrayList<Runnable> mPostCollapseRunnables = new ArrayList<>();
@@ -59,7 +59,7 @@ public class ShadeControllerImpl implements ShadeController {
NotificationShadeWindowController notificationShadeWindowController, NotificationShadeWindowController notificationShadeWindowController,
StatusBarKeyguardViewManager statusBarKeyguardViewManager, StatusBarKeyguardViewManager statusBarKeyguardViewManager,
WindowManager windowManager, WindowManager windowManager,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
Lazy<AssistManager> assistManagerLazy Lazy<AssistManager> assistManagerLazy
) { ) {
mCommandQueue = commandQueue; mCommandQueue = commandQueue;
@@ -208,7 +208,7 @@ public class ShadeControllerImpl implements ShadeController {
} }
} }
private CentralSurfaces getCentralSurfaces() { private CentralSurfacesInt getCentralSurfaces() {
return mCentralSurfacesOptionalLazy.get().get(); return mCentralSurfacesOptionalLazy.get().get();
} }

View File

@@ -29,7 +29,7 @@ import com.android.systemui.statusbar.window.StatusBarWindowController;
import javax.inject.Inject; 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 @CentralSurfacesComponent.CentralSurfacesScope
public class StatusBarHeadsUpChangeListener implements OnHeadsUpChangedListener { public class StatusBarHeadsUpChangeListener implements OnHeadsUpChangedListener {

View File

@@ -187,7 +187,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
protected LockPatternUtils mLockPatternUtils; protected LockPatternUtils mLockPatternUtils;
protected ViewMediatorCallback mViewMediatorCallback; protected ViewMediatorCallback mViewMediatorCallback;
protected CentralSurfaces mCentralSurfaces; protected CentralSurfacesInt mCentralSurfaces;
private NotificationPanelViewController mNotificationPanelViewController; private NotificationPanelViewController mNotificationPanelViewController;
private BiometricUnlockController mBiometricUnlockController; private BiometricUnlockController mBiometricUnlockController;
@@ -289,7 +289,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
} }
@Override @Override
public void registerCentralSurfaces(CentralSurfaces centralSurfaces, public void registerCentralSurfaces(CentralSurfacesInt centralSurfaces,
NotificationPanelViewController notificationPanelViewController, NotificationPanelViewController notificationPanelViewController,
PanelExpansionStateManager panelExpansionStateManager, PanelExpansionStateManager panelExpansionStateManager,
BiometricUnlockController biometricUnlockController, BiometricUnlockController biometricUnlockController,
@@ -672,7 +672,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
} }
/** /**
* If {@link CentralSurfaces} is pulsing. * If {@link CentralSurfacesInt} is pulsing.
*/ */
public void setPulsing(boolean pulsing) { public void setPulsing(boolean pulsing) {
if (mPulsing != pulsing) { if (mPulsing != pulsing) {

View File

@@ -10,7 +10,7 @@ import com.android.systemui.animation.LaunchAnimator
*/ */
class StatusBarLaunchAnimatorController( class StatusBarLaunchAnimatorController(
private val delegate: ActivityLaunchAnimator.Controller, private val delegate: ActivityLaunchAnimator.Controller,
private val centralSurfaces: CentralSurfaces, private val centralSurfaces: CentralSurfacesInt,
private val isLaunchForActivity: Boolean = true private val isLaunchForActivity: Boolean = true
) : ActivityLaunchAnimator.Controller by delegate { ) : ActivityLaunchAnimator.Controller by delegate {
// Always sync the opening window with the shade, given that we draw a hole punch in the shade // Always sync the opening window with the shade, given that we draw a hole punch in the shade

View File

@@ -18,7 +18,7 @@ package com.android.systemui.statusbar.phone;
import static android.service.notification.NotificationListenerService.REASON_CLICK; 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.ActivityManager;
import android.app.KeyguardManager; import android.app.KeyguardManager;
@@ -125,7 +125,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
private final MetricsLogger mMetricsLogger; private final MetricsLogger mMetricsLogger;
private final StatusBarNotificationActivityStarterLogger mLogger; private final StatusBarNotificationActivityStarterLogger mLogger;
private final CentralSurfaces mCentralSurfaces; private final CentralSurfacesInt mCentralSurfaces;
private final NotificationPresenter mPresenter; private final NotificationPresenter mPresenter;
private final NotificationPanelViewController mNotificationPanel; private final NotificationPanelViewController mNotificationPanel;
private final ActivityLaunchAnimator mActivityLaunchAnimator; private final ActivityLaunchAnimator mActivityLaunchAnimator;
@@ -166,7 +166,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte
MetricsLogger metricsLogger, MetricsLogger metricsLogger,
StatusBarNotificationActivityStarterLogger logger, StatusBarNotificationActivityStarterLogger logger,
OnUserInteractionCallback onUserInteractionCallback, OnUserInteractionCallback onUserInteractionCallback,
CentralSurfaces centralSurfaces, CentralSurfacesInt centralSurfaces,
NotificationPresenter presenter, NotificationPresenter presenter,
NotificationPanelViewController panel, NotificationPanelViewController panel,
ActivityLaunchAnimator activityLaunchAnimator, ActivityLaunchAnimator activityLaunchAnimator,

View File

@@ -14,9 +14,9 @@
package com.android.systemui.statusbar.phone; 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.CentralSurfacesInt.CLOSE_PANEL_WHEN_EMPTIED;
import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG; import static com.android.systemui.statusbar.phone.CentralSurfacesInt.DEBUG;
import static com.android.systemui.statusbar.phone.CentralSurfaces.MULTIUSER_DEBUG; import static com.android.systemui.statusbar.phone.CentralSurfacesInt.MULTIUSER_DEBUG;
import android.app.KeyguardManager; import android.app.KeyguardManager;
import android.content.Context; import android.content.Context;
@@ -104,7 +104,7 @@ class StatusBarNotificationPresenter implements NotificationPresenter,
private final DozeScrimController mDozeScrimController; private final DozeScrimController mDozeScrimController;
private final ScrimController mScrimController; private final ScrimController mScrimController;
private final KeyguardIndicationController mKeyguardIndicationController; private final KeyguardIndicationController mKeyguardIndicationController;
private final CentralSurfaces mCentralSurfaces; private final CentralSurfacesInt mCentralSurfaces;
private final ShadeController mShadeController; private final ShadeController mShadeController;
private final LockscreenShadeTransitionController mShadeTransitionController; private final LockscreenShadeTransitionController mShadeTransitionController;
private final CommandQueue mCommandQueue; private final CommandQueue mCommandQueue;
@@ -135,7 +135,7 @@ class StatusBarNotificationPresenter implements NotificationPresenter,
DynamicPrivacyController dynamicPrivacyController, DynamicPrivacyController dynamicPrivacyController,
KeyguardStateController keyguardStateController, KeyguardStateController keyguardStateController,
KeyguardIndicationController keyguardIndicationController, KeyguardIndicationController keyguardIndicationController,
CentralSurfaces centralSurfaces, CentralSurfacesInt centralSurfaces,
ShadeController shadeController, ShadeController shadeController,
LockscreenShadeTransitionController shadeTransitionController, LockscreenShadeTransitionController shadeTransitionController,
CommandQueue commandQueue, CommandQueue commandQueue,

View File

@@ -58,7 +58,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable {
private boolean mIsStatusBarExpanded = false; private boolean mIsStatusBarExpanded = false;
private boolean mShouldAdjustInsets = false; private boolean mShouldAdjustInsets = false;
private CentralSurfaces mCentralSurfaces; private CentralSurfacesInt mCentralSurfaces;
private View mNotificationShadeWindowView; private View mNotificationShadeWindowView;
private View mNotificationPanelView; private View mNotificationPanelView;
private boolean mForceCollapsedUntilLayout = false; private boolean mForceCollapsedUntilLayout = false;
@@ -118,7 +118,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable {
} }
protected void setup( protected void setup(
@NonNull CentralSurfaces centralSurfaces, @NonNull CentralSurfacesInt centralSurfaces,
@NonNull View notificationShadeWindowView) { @NonNull View notificationShadeWindowView) {
mCentralSurfaces = centralSurfaces; mCentralSurfaces = centralSurfaces;
mNotificationShadeWindowView = notificationShadeWindowView; mNotificationShadeWindowView = notificationShadeWindowView;

View File

@@ -60,7 +60,7 @@ class UnlockedScreenOffAnimationController @Inject constructor(
private val powerManager: PowerManager, private val powerManager: PowerManager,
private val handler: Handler = Handler() private val handler: Handler = Handler()
) : WakefulnessLifecycle.Observer, ScreenOffAnimation { ) : 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, * Whether or not [initialize] has been called to provide us with the StatusBar,
* NotificationPanelViewController, and LightRevealSrim so that we can run the unlocked screen * NotificationPanelViewController, and LightRevealSrim so that we can run the unlocked screen
@@ -122,7 +122,7 @@ class UnlockedScreenOffAnimationController @Inject constructor(
} }
override fun initialize( override fun initialize(
centralSurfaces: CentralSurfaces, centralSurfaces: CentralSurfacesInt,
lightRevealScrim: LightRevealScrim lightRevealScrim: LightRevealScrim
) { ) {
this.initialized = true this.initialized = true

View File

@@ -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.NotificationStackScrollLayoutController;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutListContainerModule; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutListContainerModule;
import com.android.systemui.statusbar.phone.CentralSurfacesCommandQueueCallbacks; 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.LargeScreenShadeHeaderController;
import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.NotificationPanelViewController;
import com.android.systemui.statusbar.phone.NotificationShadeWindowView; 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 * 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 * 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 * directly related to status bar functionality, like multiple notification classes. And, the fact

View File

@@ -16,317 +16,22 @@
package com.android.systemui.statusbar.phone.dagger; 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.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.statusbar.phone.CentralSurfacesInt;
import com.android.systemui.dagger.qualifiers.UiBackground; import com.android.systemui.statusbar.phone.CentralSurfacesImpl;
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 java.util.Optional; import dagger.Binds;
import java.util.concurrent.Executor;
import javax.inject.Named;
import dagger.Lazy;
import dagger.Module; import dagger.Module;
import dagger.Provides;
/** /**
* Dagger Module providing {@link CentralSurfaces}. * Dagger Module providing {@link CentralSurfacesImpl}.
*/ */
@Module @Module
public interface StatusBarPhoneModule { public interface StatusBarPhoneModule {
/** /**
* Provides our instance of CentralSurfaces which is considered optional. * Provides our instance of CentralSurfaces which is considered optional.
*/ */
@Provides @Binds
@SysUISingleton @SysUISingleton
static CentralSurfaces provideCentralSurfaces( CentralSurfacesInt bindsCentralSurfaces(CentralSurfacesImpl impl);
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<BubblesManager> bubblesManagerOptional,
Optional<Bubbles> bubblesOptional,
VisualStabilityManager visualStabilityManager,
DeviceProvisionedController deviceProvisionedController,
NavigationBarController navigationBarController,
AccessibilityFloatingMenuController accessibilityFloatingMenuController,
Lazy<AssistManager> assistManagerLazy,
ConfigurationController configurationController,
NotificationShadeWindowController notificationShadeWindowController,
DozeParameters dozeParameters,
ScrimController scrimController,
Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
LockscreenGestureLogger lockscreenGestureLogger,
Lazy<BiometricUnlockController> 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> 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<StartingSurface> 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
);
}
} }

View File

@@ -18,14 +18,12 @@ package com.android.systemui.statusbar.phone.fragment.dagger;
import com.android.systemui.battery.BatteryMeterViewController; import com.android.systemui.battery.BatteryMeterViewController;
import com.android.systemui.dagger.qualifiers.RootView; 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.HeadsUpAppearanceController;
import com.android.systemui.statusbar.phone.LightsOutNotifController; import com.android.systemui.statusbar.phone.LightsOutNotifController;
import com.android.systemui.statusbar.phone.PhoneStatusBarTransitions; import com.android.systemui.statusbar.phone.PhoneStatusBarTransitions;
import com.android.systemui.statusbar.phone.PhoneStatusBarView; import com.android.systemui.statusbar.phone.PhoneStatusBarView;
import com.android.systemui.statusbar.phone.PhoneStatusBarViewController; import com.android.systemui.statusbar.phone.PhoneStatusBarViewController;
import com.android.systemui.statusbar.phone.StatusBarDemoMode; import com.android.systemui.statusbar.phone.StatusBarDemoMode;
import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent;
import com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment; import com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment;
import dagger.BindsInstance; import dagger.BindsInstance;

View File

@@ -25,7 +25,7 @@ import android.util.Log
import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.DisplayId import com.android.systemui.dagger.qualifiers.DisplayId
import com.android.systemui.statusbar.CommandQueue import com.android.systemui.statusbar.CommandQueue
import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.CentralSurfacesInt
import javax.inject.Inject import javax.inject.Inject
/** /**
@@ -80,8 +80,8 @@ class StatusBarWindowStateController @Inject constructor(
} }
windowState = state windowState = state
if (CentralSurfaces.DEBUG_WINDOW_STATE) { if (CentralSurfacesInt.DEBUG_WINDOW_STATE) {
Log.d(CentralSurfaces.TAG, "Status bar " + windowStateToString(state)) Log.d(CentralSurfacesInt.TAG, "Status bar " + windowStateToString(state))
} }
listeners.forEach { it.onStatusBarWindowStateChanged(state) } listeners.forEach { it.onStatusBarWindowStateChanged(state) }
} }

View File

@@ -26,7 +26,7 @@ import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.keyguard.WakefulnessLifecycle import com.android.systemui.keyguard.WakefulnessLifecycle
import com.android.systemui.statusbar.LightRevealScrim import com.android.systemui.statusbar.LightRevealScrim
import com.android.systemui.statusbar.phone.ScreenOffAnimation 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.statusbar.policy.CallbackController
import com.android.systemui.unfold.FoldAodAnimationController.FoldAodAnimationStatus import com.android.systemui.unfold.FoldAodAnimationController.FoldAodAnimationStatus
import com.android.systemui.util.settings.GlobalSettings import com.android.systemui.util.settings.GlobalSettings
@@ -50,7 +50,7 @@ constructor(
private val globalSettings: GlobalSettings private val globalSettings: GlobalSettings
) : CallbackController<FoldAodAnimationStatus>, ScreenOffAnimation, WakefulnessLifecycle.Observer { ) : CallbackController<FoldAodAnimationStatus>, ScreenOffAnimation, WakefulnessLifecycle.Observer {
private lateinit var mCentralSurfaces: CentralSurfaces private lateinit var mCentralSurfaces: CentralSurfacesInt
private var isFolded = false private var isFolded = false
private var isFoldHandled = true 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 this.mCentralSurfaces = centralSurfaces
deviceStateManager.registerCallback(executor, FoldListener()) deviceStateManager.registerCallback(executor, FoldListener())

View File

@@ -32,7 +32,7 @@ import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.commandline.CommandRegistry import com.android.systemui.statusbar.commandline.CommandRegistry
import com.android.systemui.statusbar.phone.BiometricUnlockController import com.android.systemui.statusbar.phone.BiometricUnlockController
import com.android.systemui.statusbar.phone.KeyguardBypassController 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.ConfigurationController
import com.android.systemui.statusbar.policy.KeyguardStateController import com.android.systemui.statusbar.policy.KeyguardStateController
import com.android.systemui.util.leak.RotationUtils import com.android.systemui.util.leak.RotationUtils
@@ -61,7 +61,7 @@ class AuthRippleControllerTest : SysuiTestCase() {
private lateinit var staticMockSession: MockitoSession private lateinit var staticMockSession: MockitoSession
private lateinit var controller: AuthRippleController 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 rippleView: AuthRippleView
@Mock private lateinit var commandRegistry: CommandRegistry @Mock private lateinit var commandRegistry: CommandRegistry
@Mock private lateinit var configurationController: ConfigurationController @Mock private lateinit var configurationController: ConfigurationController

View File

@@ -43,7 +43,7 @@ import com.android.internal.logging.UiEventLogger;
import com.android.systemui.SysuiTestCase; import com.android.systemui.SysuiTestCase;
import com.android.systemui.shared.system.InputChannelCompat; import com.android.systemui.shared.system.InputChannelCompat;
import com.android.systemui.statusbar.NotificationShadeWindowController; 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.KeyguardBouncer;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.panelstate.PanelExpansionChangeEvent; import com.android.systemui.statusbar.phone.panelstate.PanelExpansionChangeEvent;
@@ -66,7 +66,7 @@ public class BouncerSwipeTouchHandlerTest extends SysuiTestCase {
StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
@Mock @Mock
CentralSurfaces mCentralSurfaces; CentralSurfacesInt mCentralSurfaces;
@Mock @Mock
NotificationShadeWindowController mNotificationShadeWindowController; NotificationShadeWindowController mNotificationShadeWindowController;

View File

@@ -60,7 +60,7 @@ import com.android.systemui.plugins.GlobalActions;
import com.android.systemui.settings.UserContextProvider; import com.android.systemui.settings.UserContextProvider;
import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.VibratorHelper; 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.ConfigurationController;
import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.telephony.TelephonyListenerManager; import com.android.systemui.telephony.TelephonyListenerManager;
@@ -113,7 +113,7 @@ public class GlobalActionsDialogLiteTest extends SysuiTestCase {
@Mock private Handler mHandler; @Mock private Handler mHandler;
@Mock private UserContextProvider mUserContextProvider; @Mock private UserContextProvider mUserContextProvider;
@Mock private VibratorHelper mVibratorHelper; @Mock private VibratorHelper mVibratorHelper;
@Mock private CentralSurfaces mCentralSurfaces; @Mock private CentralSurfacesInt mCentralSurfaces;
@Mock private KeyguardUpdateMonitor mKeyguardUpdateMonitor; @Mock private KeyguardUpdateMonitor mKeyguardUpdateMonitor;
@Mock private DialogLaunchAnimator mDialogLaunchAnimator; @Mock private DialogLaunchAnimator mDialogLaunchAnimator;

View File

@@ -47,7 +47,7 @@ import com.android.systemui.assist.AssistManager;
import com.android.systemui.dump.DumpManager; import com.android.systemui.dump.DumpManager;
import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.settings.UserTracker; 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.Before;
import org.junit.Test; import org.junit.Test;
@@ -112,7 +112,7 @@ public class NavBarHelperTest extends SysuiTestCase {
mNavBarHelper = new NavBarHelper(mContext, mAccessibilityManager, mNavBarHelper = new NavBarHelper(mContext, mAccessibilityManager,
mAccessibilityButtonModeObserver, mAccessibilityButtonTargetObserver, mAccessibilityButtonModeObserver, mAccessibilityButtonTargetObserver,
mSystemActions, mOverviewProxyService, mAssistManagerLazy, mSystemActions, mOverviewProxyService, mAssistManagerLazy,
() -> Optional.of(mock(CentralSurfaces.class)), () -> Optional.of(mock(CentralSurfacesInt.class)),
mNavigationModeController, mUserTracker, mDumpManager); mNavigationModeController, mUserTracker, mDumpManager);
} }

View File

@@ -91,7 +91,7 @@ import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShadeDepthController;
import com.android.systemui.statusbar.phone.AutoHideController; 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.LightBarController;
import com.android.systemui.statusbar.phone.LightBarTransitionsController; import com.android.systemui.statusbar.phone.LightBarTransitionsController;
import com.android.systemui.statusbar.phone.NotificationShadeWindowView; import com.android.systemui.statusbar.phone.NotificationShadeWindowView;
@@ -186,7 +186,7 @@ public class NavigationBarTest extends SysuiTestCase {
@Mock @Mock
private DeadZone mDeadZone; private DeadZone mDeadZone;
@Mock @Mock
private CentralSurfaces mCentralSurfaces; private CentralSurfacesInt mCentralSurfaces;
private DeviceConfigProxyFake mDeviceConfigProxyFake = new DeviceConfigProxyFake(); private DeviceConfigProxyFake mDeviceConfigProxyFake = new DeviceConfigProxyFake();
@Rule @Rule

View File

@@ -48,7 +48,7 @@ import com.android.systemui.SysuiTestCase;
import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.power.PowerUI.WarningsUI; import com.android.systemui.power.PowerUI.WarningsUI;
import com.android.systemui.statusbar.CommandQueue; 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.Before;
import org.junit.Test; import org.junit.Test;
@@ -89,8 +89,8 @@ public class PowerUITest extends SysuiTestCase {
private IThermalEventListener mSkinThermalEventListener; private IThermalEventListener mSkinThermalEventListener;
@Mock private BroadcastDispatcher mBroadcastDispatcher; @Mock private BroadcastDispatcher mBroadcastDispatcher;
@Mock private CommandQueue mCommandQueue; @Mock private CommandQueue mCommandQueue;
@Mock private Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy; @Mock private Lazy<Optional<CentralSurfacesInt>> mCentralSurfacesOptionalLazy;
@Mock private CentralSurfaces mCentralSurfaces; @Mock private CentralSurfacesInt mCentralSurfaces;
@Before @Before
public void setup() { public void setup() {

View File

@@ -62,7 +62,7 @@ import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.phone.AutoTileManager; 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.KeyguardBypassController;
import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.phone.StatusBarIconController;
import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.ConfigurationController;
@@ -135,7 +135,7 @@ public class QSFragmentTest extends SysuiBaseFragmentTest {
() -> mock(AutoTileManager.class), () -> mock(AutoTileManager.class),
mock(DumpManager.class), mock(DumpManager.class),
mock(BroadcastDispatcher.class), mock(BroadcastDispatcher.class),
Optional.of(mock(CentralSurfaces.class)), Optional.of(mock(CentralSurfacesInt.class)),
mock(QSLogger.class), mock(QSLogger.class),
mock(UiEventLogger.class), mock(UiEventLogger.class),
mock(UserTracker.class), mock(UserTracker.class),

View File

@@ -65,7 +65,7 @@ import com.android.systemui.qs.tileimpl.QSTileImpl;
import com.android.systemui.settings.UserTracker; import com.android.systemui.settings.UserTracker;
import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.statusbar.phone.AutoTileManager; 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.phone.StatusBarIconController;
import com.android.systemui.tuner.TunerService; import com.android.systemui.tuner.TunerService;
import com.android.systemui.util.settings.FakeSettings; import com.android.systemui.util.settings.FakeSettings;
@@ -111,7 +111,7 @@ public class QSTileHostTest extends SysuiTestCase {
@Mock @Mock
private QSTile.State mMockState; private QSTile.State mMockState;
@Mock @Mock
private CentralSurfaces mCentralSurfaces; private CentralSurfacesInt mCentralSurfaces;
@Mock @Mock
private QSLogger mQSLogger; private QSLogger mQSLogger;
@Mock @Mock
@@ -436,7 +436,7 @@ public class QSTileHostTest extends SysuiTestCase {
QSFactory defaultFactory, Handler mainHandler, Looper bgLooper, QSFactory defaultFactory, Handler mainHandler, Looper bgLooper,
PluginManager pluginManager, TunerService tunerService, PluginManager pluginManager, TunerService tunerService,
Provider<AutoTileManager> autoTiles, DumpManager dumpManager, Provider<AutoTileManager> autoTiles, DumpManager dumpManager,
BroadcastDispatcher broadcastDispatcher, CentralSurfaces centralSurfaces, BroadcastDispatcher broadcastDispatcher, CentralSurfacesInt centralSurfaces,
QSLogger qsLogger, UiEventLogger uiEventLogger, UserTracker userTracker, QSLogger qsLogger, UiEventLogger uiEventLogger, UserTracker userTracker,
SecureSettings secureSettings, CustomTileStatePersister customTileStatePersister, SecureSettings secureSettings, CustomTileStatePersister customTileStatePersister,
TileServiceRequestController.Builder tileServiceRequestControllerBuilder, TileServiceRequestController.Builder tileServiceRequestControllerBuilder,

View File

@@ -48,7 +48,7 @@ import com.android.systemui.settings.UserTracker;
import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.phone.AutoTileManager; 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.phone.StatusBarIconController;
import com.android.systemui.statusbar.policy.BluetoothController; import com.android.systemui.statusbar.policy.BluetoothController;
import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.statusbar.policy.KeyguardStateController;
@@ -97,7 +97,7 @@ public class TileServicesTest extends SysuiTestCase {
@Mock @Mock
private DumpManager mDumpManager; private DumpManager mDumpManager;
@Mock @Mock
private CentralSurfaces mCentralSurfaces; private CentralSurfacesInt mCentralSurfaces;
@Mock @Mock
private QSLogger mQSLogger; private QSLogger mQSLogger;
@Mock @Mock

View File

@@ -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.ACTION_TYPE_SHARE;
import static com.android.systemui.screenshot.ScreenshotController.EXTRA_ID; 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.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.any;
import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyBoolean;
@@ -41,7 +41,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase; import com.android.systemui.SysuiTestCase;
import com.android.systemui.shared.system.ActivityManagerWrapper; 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.Before;
import org.junit.Test; import org.junit.Test;
@@ -59,7 +59,7 @@ import java.util.concurrent.TimeoutException;
public class ActionProxyReceiverTest extends SysuiTestCase { public class ActionProxyReceiverTest extends SysuiTestCase {
@Mock @Mock
private CentralSurfaces mMockCentralSurfaces; private CentralSurfacesInt mMockCentralSurfaces;
@Mock @Mock
private ActivityManagerWrapper mMockActivityManagerWrapper; private ActivityManagerWrapper mMockActivityManagerWrapper;
@Mock @Mock

View File

@@ -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.AmbientState
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController 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.KeyguardBypassController
import com.android.systemui.statusbar.phone.LSShadeTransitionLogger import com.android.systemui.statusbar.phone.LSShadeTransitionLogger
import com.android.systemui.statusbar.phone.NotificationPanelViewController import com.android.systemui.statusbar.phone.NotificationPanelViewController
@@ -74,7 +74,7 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
@Mock lateinit var depthController: NotificationShadeDepthController @Mock lateinit var depthController: NotificationShadeDepthController
@Mock lateinit var stackscroller: NotificationStackScrollLayout @Mock lateinit var stackscroller: NotificationStackScrollLayout
@Mock lateinit var expandHelperCallback: ExpandHelper.Callback @Mock lateinit var expandHelperCallback: ExpandHelper.Callback
@Mock lateinit var mCentralSurfaces: CentralSurfaces @Mock lateinit var mCentralSurfaces: CentralSurfacesInt
@Mock lateinit var qS: QS @Mock lateinit var qS: QS
@Mock lateinit var singleShadeOverScroller: SingleShadeLockScreenOverScroller @Mock lateinit var singleShadeOverScroller: SingleShadeLockScreenOverScroller
@Mock lateinit var splitShadeOverScroller: SplitShadeLockScreenOverScroller @Mock lateinit var splitShadeOverScroller: SplitShadeLockScreenOverScroller

View File

@@ -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.NotificationEntryBuilder;
import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; 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.RemoteInputUriController;
import com.google.android.collect.Sets; import com.google.android.collect.Sets;
@@ -105,7 +105,7 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase {
mVisibilityProvider, mVisibilityProvider,
mEntryManager, mEntryManager,
mock(RemoteInputNotificationRebuilder.class), mock(RemoteInputNotificationRebuilder.class),
() -> Optional.of(mock(CentralSurfaces.class)), () -> Optional.of(mock(CentralSurfacesInt.class)),
mStateController, mStateController,
Handler.createAsync(Looper.myLooper()), Handler.createAsync(Looper.myLooper()),
mRemoteInputUriController, mRemoteInputUriController,
@@ -196,7 +196,7 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase {
NotificationVisibilityProvider visibilityProvider, NotificationVisibilityProvider visibilityProvider,
NotificationEntryManager notificationEntryManager, NotificationEntryManager notificationEntryManager,
RemoteInputNotificationRebuilder rebuilder, RemoteInputNotificationRebuilder rebuilder,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfacesInt>> centralSurfacesOptionalLazy,
StatusBarStateController statusBarStateController, StatusBarStateController statusBarStateController,
Handler mainHandler, Handler mainHandler,
RemoteInputUriController remoteInputUriController, RemoteInputUriController remoteInputUriController,

View File

@@ -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.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder;
import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; 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 com.android.systemui.statusbar.policy.RemoteInputUriController;
import org.junit.Before; import org.junit.Before;
@@ -103,7 +103,7 @@ public class SmartReplyControllerTest extends SysuiTestCase {
mVisibilityProvider, mVisibilityProvider,
mNotificationEntryManager, mNotificationEntryManager,
new RemoteInputNotificationRebuilder(mContext), new RemoteInputNotificationRebuilder(mContext),
() -> Optional.of(mock(CentralSurfaces.class)), () -> Optional.of(mock(CentralSurfacesInt.class)),
mStatusBarStateController, mStatusBarStateController,
Handler.createAsync(Looper.myLooper()), Handler.createAsync(Looper.myLooper()),
mRemoteInputUriController, mRemoteInputUriController,

View File

@@ -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.people.PeopleNotificationIdentifier;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager.OnSettingsClickListener; import com.android.systemui.statusbar.notification.row.NotificationGutsManager.OnSettingsClickListener;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer; 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.phone.ShadeController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.wmshell.BubblesManager; import com.android.systemui.wmshell.BubblesManager;
@@ -124,7 +124,7 @@ public class NotificationGutsManagerTest extends SysuiTestCase {
@Mock private NotificationInfo.CheckSaveListener mCheckSaveListener; @Mock private NotificationInfo.CheckSaveListener mCheckSaveListener;
@Mock private OnSettingsClickListener mOnSettingsClickListener; @Mock private OnSettingsClickListener mOnSettingsClickListener;
@Mock private DeviceProvisionedController mDeviceProvisionedController; @Mock private DeviceProvisionedController mDeviceProvisionedController;
@Mock private CentralSurfaces mCentralSurfaces; @Mock private CentralSurfacesInt mCentralSurfaces;
@Mock private AccessibilityManager mAccessibilityManager; @Mock private AccessibilityManager mAccessibilityManager;
@Mock private HighPriorityProvider mHighPriorityProvider; @Mock private HighPriorityProvider mHighPriorityProvider;
@Mock private INotificationManager mINotificationManager; @Mock private INotificationManager mINotificationManager;

View File

@@ -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.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController.NotificationPanelEvent; 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.HeadsUpManagerPhone;
import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.ScrimController; import com.android.systemui.statusbar.phone.ScrimController;
@@ -117,7 +117,7 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase {
@Mock(answer = Answers.RETURNS_SELF) @Mock(answer = Answers.RETURNS_SELF)
private NotificationSwipeHelper.Builder mNotificationSwipeHelperBuilder; private NotificationSwipeHelper.Builder mNotificationSwipeHelperBuilder;
@Mock private NotificationSwipeHelper mNotificationSwipeHelper; @Mock private NotificationSwipeHelper mNotificationSwipeHelper;
@Mock private CentralSurfaces mCentralSurfaces; @Mock private CentralSurfacesInt mCentralSurfaces;
@Mock private ScrimController mScrimController; @Mock private ScrimController mScrimController;
@Mock private NotificationGroupManagerLegacy mLegacyGroupManager; @Mock private NotificationGroupManagerLegacy mLegacyGroupManager;
@Mock private SectionHeaderController mSilentHeaderController; @Mock private SectionHeaderController mSilentHeaderController;

View File

@@ -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.collection.render.GroupMembershipManager;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.FooterView; 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.KeyguardBypassController;
import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.ShadeController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
@@ -95,7 +95,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
private AmbientState mAmbientState; private AmbientState mAmbientState;
@Rule public MockitoRule mockito = MockitoJUnit.rule(); @Rule public MockitoRule mockito = MockitoJUnit.rule();
@Mock private CentralSurfaces mCentralSurfaces; @Mock private CentralSurfacesInt mCentralSurfaces;
@Mock private SysuiStatusBarStateController mBarState; @Mock private SysuiStatusBarStateController mBarState;
@Mock private NotificationGroupManagerLegacy mGroupMembershipManger; @Mock private NotificationGroupManagerLegacy mGroupMembershipManger;
@Mock private NotificationGroupManagerLegacy mGroupExpansionManager; @Mock private NotificationGroupManagerLegacy mGroupExpansionManager;

View File

@@ -58,7 +58,7 @@ import java.util.Optional;
@SmallTest @SmallTest
@RunWith(AndroidTestingRunner.class) @RunWith(AndroidTestingRunner.class)
public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase { public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase {
@Mock private CentralSurfaces mCentralSurfaces; @Mock private CentralSurfacesInt mCentralSurfaces;
@Mock private ShadeController mShadeController; @Mock private ShadeController mShadeController;
@Mock private CommandQueue mCommandQueue; @Mock private CommandQueue mCommandQueue;
@Mock private NotificationPanelViewController mNotificationPanelViewController; @Mock private NotificationPanelViewController mNotificationPanelViewController;

View File

@@ -178,12 +178,12 @@ import dagger.Lazy;
@SmallTest @SmallTest
@RunWith(AndroidTestingRunner.class) @RunWith(AndroidTestingRunner.class)
@RunWithLooper(setAsMainLooper = true) @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_FOLDED = 0;
private static final int FOLD_STATE_UNFOLDED = 1; private static final int FOLD_STATE_UNFOLDED = 1;
private CentralSurfaces mCentralSurfaces; private CentralSurfacesImpl mCentralSurfaces;
private FakeMetricsLogger mMetricsLogger; private FakeMetricsLogger mMetricsLogger;
private PowerManager mPowerManager; private PowerManager mPowerManager;
private TestableNotificationInterruptStateProviderImpl mNotificationInterruptStateProvider; private TestableNotificationInterruptStateProviderImpl mNotificationInterruptStateProvider;
@@ -383,7 +383,7 @@ public class CentralSurfacesTest extends SysuiTestCase {
when(mOperatorNameViewControllerFactory.create(any())) when(mOperatorNameViewControllerFactory.create(any()))
.thenReturn(mOperatorNameViewController); .thenReturn(mOperatorNameViewController);
mCentralSurfaces = new CentralSurfaces( mCentralSurfaces = new CentralSurfacesImpl(
mContext, mContext,
mNotificationsController, mNotificationsController,
mock(FragmentService.class), mock(FragmentService.class),
@@ -479,7 +479,7 @@ public class CentralSurfacesTest extends SysuiTestCase {
mDreamOverlayStateController, mDreamOverlayStateController,
mWiredChargingRippleController); mWiredChargingRippleController);
when(mKeyguardViewMediator.registerCentralSurfaces( when(mKeyguardViewMediator.registerCentralSurfaces(
any(CentralSurfaces.class), any(CentralSurfacesImpl.class),
any(NotificationPanelViewController.class), any(NotificationPanelViewController.class),
any(PanelExpansionStateManager.class), any(PanelExpansionStateManager.class),
any(BiometricUnlockController.class), any(BiometricUnlockController.class),
@@ -791,7 +791,7 @@ public class CentralSurfacesTest extends SysuiTestCase {
@Test @Test
public void testDumpBarTransitions_DoesNotCrash() { public void testDumpBarTransitions_DoesNotCrash() {
CentralSurfaces.dumpBarTransitions( CentralSurfacesInt.dumpBarTransitions(
new PrintWriter(new ByteArrayOutputStream()), "var", /* transitions= */ null); new PrintWriter(new ByteArrayOutputStream()), "var", /* transitions= */ null);
} }

View File

@@ -82,7 +82,7 @@ public class DozeServiceHostTest extends SysuiTestCase {
@Mock private NotificationShadeWindowController mNotificationShadeWindowController; @Mock private NotificationShadeWindowController mNotificationShadeWindowController;
@Mock private PowerManager mPowerManager; @Mock private PowerManager mPowerManager;
@Mock private WakefulnessLifecycle mWakefullnessLifecycle; @Mock private WakefulnessLifecycle mWakefullnessLifecycle;
@Mock private CentralSurfaces mCentralSurfaces; @Mock private CentralSurfacesInt mCentralSurfaces;
@Mock private NotificationIconAreaController mNotificationIconAreaController; @Mock private NotificationIconAreaController mNotificationIconAreaController;
@Mock private NotificationShadeWindowViewController mNotificationShadeWindowViewController; @Mock private NotificationShadeWindowViewController mNotificationShadeWindowViewController;
@Mock private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; @Mock private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;

View File

@@ -25,7 +25,7 @@ import java.util.concurrent.Executor
class KeyguardBottomAreaTest : SysuiTestCase() { class KeyguardBottomAreaTest : SysuiTestCase() {
@Mock @Mock
private lateinit var mCentralSurfaces: CentralSurfaces private lateinit var mCentralSurfaces: CentralSurfacesInt
private lateinit var mKeyguardBottomArea: KeyguardBottomAreaView private lateinit var mKeyguardBottomArea: KeyguardBottomAreaView
@Before @Before

View File

@@ -162,7 +162,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
private static final int NOTIFICATION_SCRIM_TOP_PADDING_IN_SPLIT_SHADE = 50; private static final int NOTIFICATION_SCRIM_TOP_PADDING_IN_SPLIT_SHADE = 50;
@Mock @Mock
private CentralSurfaces mCentralSurfaces; private CentralSurfacesInt mCentralSurfaces;
@Mock @Mock
private NotificationStackScrollLayout mNotificationStackScrollLayout; private NotificationStackScrollLayout mNotificationStackScrollLayout;
@Mock @Mock

View File

@@ -63,7 +63,7 @@ class NotificationShadeWindowViewControllerTest : SysuiTestCase() {
@Mock @Mock
private lateinit var mStatusBarStateController: SysuiStatusBarStateController private lateinit var mStatusBarStateController: SysuiStatusBarStateController
@Mock @Mock
private lateinit var mCentralSurfaces: CentralSurfaces private lateinit var mCentralSurfaces: CentralSurfacesInt
@Mock @Mock
private lateinit var mDockManager: DockManager private lateinit var mDockManager: DockManager
@Mock @Mock

View File

@@ -73,7 +73,7 @@ public class NotificationShadeWindowViewTest extends SysuiTestCase {
@Mock private DragDownHelper mDragDownHelper; @Mock private DragDownHelper mDragDownHelper;
@Mock private SysuiStatusBarStateController mStatusBarStateController; @Mock private SysuiStatusBarStateController mStatusBarStateController;
@Mock private ShadeController mShadeController; @Mock private ShadeController mShadeController;
@Mock private CentralSurfaces mCentralSurfaces; @Mock private CentralSurfacesInt mCentralSurfaces;
@Mock private DockManager mDockManager; @Mock private DockManager mDockManager;
@Mock private NotificationPanelViewController mNotificationPanelViewController; @Mock private NotificationPanelViewController mNotificationPanelViewController;
@Mock private NotificationStackScrollLayout mNotificationStackScrollLayout; @Mock private NotificationStackScrollLayout mNotificationStackScrollLayout;

View File

@@ -77,7 +77,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
@Mock private ViewMediatorCallback mViewMediatorCallback; @Mock private ViewMediatorCallback mViewMediatorCallback;
@Mock private LockPatternUtils mLockPatternUtils; @Mock private LockPatternUtils mLockPatternUtils;
@Mock private KeyguardStateController mKeyguardStateController; @Mock private KeyguardStateController mKeyguardStateController;
@Mock private CentralSurfaces mCentralSurfaces; @Mock private CentralSurfacesInt mCentralSurfaces;
@Mock private ViewGroup mContainer; @Mock private ViewGroup mContainer;
@Mock private NotificationPanelViewController mNotificationPanelView; @Mock private NotificationPanelViewController mNotificationPanelView;
@Mock private BiometricUnlockController mBiometricUnlockController; @Mock private BiometricUnlockController mBiometricUnlockController;

View File

@@ -115,7 +115,7 @@ public class StatusBarNotificationActivityStarterTest extends SysuiTestCase {
@Mock @Mock
private NotificationRemoteInputManager mRemoteInputManager; private NotificationRemoteInputManager mRemoteInputManager;
@Mock @Mock
private CentralSurfaces mCentralSurfaces; private CentralSurfacesInt mCentralSurfaces;
@Mock @Mock
private KeyguardStateController mKeyguardStateController; private KeyguardStateController mKeyguardStateController;
@Mock @Mock

View File

@@ -80,7 +80,7 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase {
private CommandQueue mCommandQueue; private CommandQueue mCommandQueue;
private FakeMetricsLogger mMetricsLogger; private FakeMetricsLogger mMetricsLogger;
private ShadeController mShadeController = mock(ShadeController.class); private ShadeController mShadeController = mock(ShadeController.class);
private CentralSurfaces mCentralSurfaces = mock(CentralSurfaces.class); private CentralSurfacesInt mCentralSurfaces = mock(CentralSurfacesInt.class);
private InitController mInitController = new InitController(); private InitController mInitController = new InitController();
@Before @Before

View File

@@ -62,7 +62,7 @@ class UnlockedScreenOffAnimationControllerTest : SysuiTestCase() {
@Mock @Mock
private lateinit var globalSettings: GlobalSettings private lateinit var globalSettings: GlobalSettings
@Mock @Mock
private lateinit var mCentralSurfaces: CentralSurfaces private lateinit var mCentralSurfaces: CentralSurfacesInt
@Mock @Mock
private lateinit var notificationPanelViewController: NotificationPanelViewController private lateinit var notificationPanelViewController: NotificationPanelViewController
@Mock @Mock