Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +12 −17 Original line number Original line Diff line number Diff line Loading @@ -101,6 +101,8 @@ import com.android.wm.shell.draganddrop.DragAndDropController; import com.android.wm.shell.onehanded.OneHandedController; import com.android.wm.shell.onehanded.OneHandedController; import com.android.wm.shell.onehanded.OneHandedTransitionCallback; import com.android.wm.shell.onehanded.OneHandedTransitionCallback; import com.android.wm.shell.pip.PinnedStackListenerForwarder; import com.android.wm.shell.pip.PinnedStackListenerForwarder; import com.android.wm.shell.sysui.ConfigurationChangeListener; import com.android.wm.shell.sysui.ShellController; import java.io.PrintWriter; import java.io.PrintWriter; import java.util.ArrayList; import java.util.ArrayList; Loading @@ -119,7 +121,7 @@ import java.util.function.IntConsumer; * * * The controller manages addition, removal, and visible state of bubbles on screen. * The controller manages addition, removal, and visible state of bubbles on screen. */ */ public class BubbleController { public class BubbleController implements ConfigurationChangeListener { private static final String TAG = TAG_WITH_CLASS_NAME ? "BubbleController" : TAG_BUBBLES; private static final String TAG = TAG_WITH_CLASS_NAME ? "BubbleController" : TAG_BUBBLES; Loading Loading @@ -155,6 +157,7 @@ public class BubbleController { private final DisplayController mDisplayController; private final DisplayController mDisplayController; private final TaskViewTransitions mTaskViewTransitions; private final TaskViewTransitions mTaskViewTransitions; private final SyncTransactionQueue mSyncQueue; private final SyncTransactionQueue mSyncQueue; private final ShellController mShellController; // Used to post to main UI thread // Used to post to main UI thread private final ShellExecutor mMainExecutor; private final ShellExecutor mMainExecutor; Loading Loading @@ -224,6 +227,7 @@ public class BubbleController { public BubbleController(Context context, public BubbleController(Context context, ShellController shellController, BubbleData data, BubbleData data, @Nullable BubbleStackView.SurfaceSynchronizer synchronizer, @Nullable BubbleStackView.SurfaceSynchronizer synchronizer, FloatingContentCoordinator floatingContentCoordinator, FloatingContentCoordinator floatingContentCoordinator, Loading @@ -246,6 +250,7 @@ public class BubbleController { TaskViewTransitions taskViewTransitions, TaskViewTransitions taskViewTransitions, SyncTransactionQueue syncQueue) { SyncTransactionQueue syncQueue) { mContext = context; mContext = context; mShellController = shellController; mLauncherApps = launcherApps; mLauncherApps = launcherApps; mBarService = statusBarService == null mBarService = statusBarService == null ? IStatusBarService.Stub.asInterface( ? IStatusBarService.Stub.asInterface( Loading Loading @@ -414,6 +419,8 @@ public class BubbleController { // Clear out any persisted bubbles on disk that no longer have a valid user. // Clear out any persisted bubbles on disk that no longer have a valid user. List<UserInfo> users = mUserManager.getAliveUsers(); List<UserInfo> users = mUserManager.getAliveUsers(); mDataRepository.sanitizeBubbles(users); mDataRepository.sanitizeBubbles(users); mShellController.addConfigurationChangeListener(this); } } @VisibleForTesting @VisibleForTesting Loading Loading @@ -798,7 +805,8 @@ public class BubbleController { mSavedBubbleKeysPerUser.remove(userId); mSavedBubbleKeysPerUser.remove(userId); } } private void updateForThemeChanges() { @Override public void onThemeChanged() { if (mStackView != null) { if (mStackView != null) { mStackView.onThemeChanged(); mStackView.onThemeChanged(); } } Loading @@ -818,7 +826,8 @@ public class BubbleController { } } } } private void onConfigChanged(Configuration newConfig) { @Override public void onConfigurationChanged(Configuration newConfig) { if (mBubblePositioner != null) { if (mBubblePositioner != null) { mBubblePositioner.update(); mBubblePositioner.update(); } } Loading Loading @@ -1677,13 +1686,6 @@ public class BubbleController { }); }); } } @Override public void updateForThemeChanges() { mMainExecutor.execute(() -> { BubbleController.this.updateForThemeChanges(); }); } @Override @Override public void expandStackAndSelectBubble(BubbleEntry entry) { public void expandStackAndSelectBubble(BubbleEntry entry) { mMainExecutor.execute(() -> { mMainExecutor.execute(() -> { Loading Loading @@ -1822,13 +1824,6 @@ public class BubbleController { }); }); } } @Override public void onConfigChanged(Configuration newConfig) { mMainExecutor.execute(() -> { BubbleController.this.onConfigChanged(newConfig); }); } @Override @Override public void onNotificationPanelExpandedChanged(boolean expanded) { public void onNotificationPanelExpandedChanged(boolean expanded) { mMainExecutor.execute( mMainExecutor.execute( Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java +0 −10 Original line number Original line Diff line number Diff line Loading @@ -107,9 +107,6 @@ public interface Bubbles { /** Tell the stack of bubbles to collapse. */ /** Tell the stack of bubbles to collapse. */ void collapseStack(); void collapseStack(); /** Tell the controller need update its UI to fit theme. */ void updateForThemeChanges(); /** /** * Request the stack expand if needed, then select the specified Bubble as current. * Request the stack expand if needed, then select the specified Bubble as current. * If no bubble exists for this entry, one is created. * If no bubble exists for this entry, one is created. Loading Loading @@ -255,13 +252,6 @@ public interface Bubbles { */ */ void onUserRemoved(int removedUserId); void onUserRemoved(int removedUserId); /** * Called when config changed. * * @param newConfig the new config. */ void onConfigChanged(Configuration newConfig); /** Description of current bubble state. */ /** Description of current bubble state. */ void dump(PrintWriter pw, String[] args); void dump(PrintWriter pw, String[] args); Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/TvPipModule.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -48,6 +48,7 @@ import com.android.wm.shell.pip.tv.TvPipNotificationController; import com.android.wm.shell.pip.tv.TvPipTaskOrganizer; import com.android.wm.shell.pip.tv.TvPipTaskOrganizer; import com.android.wm.shell.pip.tv.TvPipTransition; import com.android.wm.shell.pip.tv.TvPipTransition; import com.android.wm.shell.splitscreen.SplitScreenController; import com.android.wm.shell.splitscreen.SplitScreenController; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.transition.Transitions; import java.util.Optional; import java.util.Optional; Loading @@ -64,6 +65,7 @@ public abstract class TvPipModule { @Provides @Provides static Optional<Pip> providePip( static Optional<Pip> providePip( Context context, Context context, ShellController shellController, TvPipBoundsState tvPipBoundsState, TvPipBoundsState tvPipBoundsState, TvPipBoundsAlgorithm tvPipBoundsAlgorithm, TvPipBoundsAlgorithm tvPipBoundsAlgorithm, TvPipBoundsController tvPipBoundsController, TvPipBoundsController tvPipBoundsController, Loading @@ -81,6 +83,7 @@ public abstract class TvPipModule { return Optional.of( return Optional.of( TvPipController.create( TvPipController.create( context, context, shellController, tvPipBoundsState, tvPipBoundsState, tvPipBoundsAlgorithm, tvPipBoundsAlgorithm, tvPipBoundsController, tvPipBoundsController, Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +29 −6 Original line number Original line Diff line number Diff line Loading @@ -83,6 +83,8 @@ import com.android.wm.shell.startingsurface.StartingSurface; import com.android.wm.shell.startingsurface.StartingWindowController; import com.android.wm.shell.startingsurface.StartingWindowController; import com.android.wm.shell.startingsurface.StartingWindowTypeAlgorithm; import com.android.wm.shell.startingsurface.StartingWindowTypeAlgorithm; import com.android.wm.shell.startingsurface.phone.PhoneStartingWindowTypeAlgorithm; import com.android.wm.shell.startingsurface.phone.PhoneStartingWindowTypeAlgorithm; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.sysui.ShellInterface; import com.android.wm.shell.tasksurfacehelper.TaskSurfaceHelper; import com.android.wm.shell.tasksurfacehelper.TaskSurfaceHelper; import com.android.wm.shell.tasksurfacehelper.TaskSurfaceHelperController; import com.android.wm.shell.tasksurfacehelper.TaskSurfaceHelperController; import com.android.wm.shell.transition.ShellTransitions; import com.android.wm.shell.transition.ShellTransitions; Loading Loading @@ -160,10 +162,13 @@ public abstract class WMShellBaseModule { @WMSingleton @WMSingleton @Provides @Provides static DragAndDropController provideDragAndDropController(Context context, static DragAndDropController provideDragAndDropController(Context context, DisplayController displayController, UiEventLogger uiEventLogger, ShellController shellController, IconProvider iconProvider, @ShellMainThread ShellExecutor mainExecutor) { DisplayController displayController, return new DragAndDropController(context, displayController, uiEventLogger, iconProvider, UiEventLogger uiEventLogger, mainExecutor); IconProvider iconProvider, @ShellMainThread ShellExecutor mainExecutor) { return new DragAndDropController(context, shellController, displayController, uiEventLogger, iconProvider, mainExecutor); } } @WMSingleton @WMSingleton Loading Loading @@ -378,9 +383,11 @@ public abstract class WMShellBaseModule { @WMSingleton @WMSingleton @Provides @Provides static Optional<HideDisplayCutoutController> provideHideDisplayCutoutController(Context context, static Optional<HideDisplayCutoutController> provideHideDisplayCutoutController(Context context, DisplayController displayController, @ShellMainThread ShellExecutor mainExecutor) { ShellController shellController, DisplayController displayController, @ShellMainThread ShellExecutor mainExecutor) { return Optional.ofNullable( return Optional.ofNullable( HideDisplayCutoutController.create(context, displayController, mainExecutor)); HideDisplayCutoutController.create(context, shellController, displayController, mainExecutor)); } } // // Loading Loading @@ -634,6 +641,22 @@ public abstract class WMShellBaseModule { return Optional.of(new ActivityEmbeddingController(context, transitions)); return Optional.of(new ActivityEmbeddingController(context, transitions)); } } // // SysUI -> Shell interface // @WMSingleton @Provides static ShellInterface provideShellSysuiCallbacks(ShellController shellController) { return shellController.asShell(); } @WMSingleton @Provides static ShellController provideShellController(@ShellMainThread ShellExecutor mainExecutor) { return new ShellController(mainExecutor); } // // // Misc // Misc // // Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +10 −5 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,7 @@ import com.android.wm.shell.pip.phone.PipMotionHelper; import com.android.wm.shell.pip.phone.PipTouchHandler; import com.android.wm.shell.pip.phone.PipTouchHandler; import com.android.wm.shell.recents.RecentTasksController; import com.android.wm.shell.recents.RecentTasksController; import com.android.wm.shell.splitscreen.SplitScreenController; import com.android.wm.shell.splitscreen.SplitScreenController; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.unfold.ShellUnfoldProgressProvider; import com.android.wm.shell.unfold.ShellUnfoldProgressProvider; import com.android.wm.shell.unfold.UnfoldAnimationController; import com.android.wm.shell.unfold.UnfoldAnimationController; Loading Loading @@ -134,6 +135,7 @@ public abstract class WMShellModule { @WMSingleton @WMSingleton @Provides @Provides static BubbleController provideBubbleController(Context context, static BubbleController provideBubbleController(Context context, ShellController shellController, BubbleData data, BubbleData data, FloatingContentCoordinator floatingContentCoordinator, FloatingContentCoordinator floatingContentCoordinator, IStatusBarService statusBarService, IStatusBarService statusBarService, Loading @@ -153,7 +155,7 @@ public abstract class WMShellModule { @ShellBackgroundThread ShellExecutor bgExecutor, @ShellBackgroundThread ShellExecutor bgExecutor, TaskViewTransitions taskViewTransitions, TaskViewTransitions taskViewTransitions, SyncTransactionQueue syncQueue) { SyncTransactionQueue syncQueue) { return new BubbleController(context, data, null /* synchronizer */, return new BubbleController(context, shellController, data, null /* synchronizer */, floatingContentCoordinator, floatingContentCoordinator, new BubbleDataRepository(context, launcherApps, mainExecutor), new BubbleDataRepository(context, launcherApps, mainExecutor), statusBarService, windowManager, windowManagerShellWrapper, userManager, statusBarService, windowManager, windowManagerShellWrapper, userManager, Loading Loading @@ -205,12 +207,14 @@ public abstract class WMShellModule { @Provides @Provides @DynamicOverride @DynamicOverride static OneHandedController provideOneHandedController(Context context, static OneHandedController provideOneHandedController(Context context, ShellController shellController, WindowManager windowManager, DisplayController displayController, WindowManager windowManager, DisplayController displayController, DisplayLayout displayLayout, TaskStackListenerImpl taskStackListener, DisplayLayout displayLayout, TaskStackListenerImpl taskStackListener, UiEventLogger uiEventLogger, InteractionJankMonitor jankMonitor, UiEventLogger uiEventLogger, InteractionJankMonitor jankMonitor, @ShellMainThread ShellExecutor mainExecutor, @ShellMainThread Handler mainHandler) { @ShellMainThread ShellExecutor mainExecutor, @ShellMainThread Handler mainHandler) { return OneHandedController.create(context, windowManager, displayController, displayLayout, return OneHandedController.create(context, shellController, windowManager, taskStackListener, jankMonitor, uiEventLogger, mainExecutor, mainHandler); displayController, displayLayout, taskStackListener, jankMonitor, uiEventLogger, mainExecutor, mainHandler); } } // // Loading Loading @@ -242,7 +246,8 @@ public abstract class WMShellModule { @WMSingleton @WMSingleton @Provides @Provides static Optional<Pip> providePip(Context context, DisplayController displayController, static Optional<Pip> providePip(Context context, ShellController shellController, DisplayController displayController, PipAppOpsListener pipAppOpsListener, PipBoundsAlgorithm pipBoundsAlgorithm, PipAppOpsListener pipAppOpsListener, PipBoundsAlgorithm pipBoundsAlgorithm, PipKeepClearAlgorithm pipKeepClearAlgorithm, PipBoundsState pipBoundsState, PipKeepClearAlgorithm pipKeepClearAlgorithm, PipBoundsState pipBoundsState, PipMotionHelper pipMotionHelper, PipMediaController pipMediaController, PipMotionHelper pipMotionHelper, PipMediaController pipMediaController, Loading @@ -254,7 +259,7 @@ public abstract class WMShellModule { PipParamsChangedForwarder pipParamsChangedForwarder, PipParamsChangedForwarder pipParamsChangedForwarder, Optional<OneHandedController> oneHandedController, Optional<OneHandedController> oneHandedController, @ShellMainThread ShellExecutor mainExecutor) { @ShellMainThread ShellExecutor mainExecutor) { return Optional.ofNullable(PipController.create(context, displayController, return Optional.ofNullable(PipController.create(context, shellController, displayController, pipAppOpsListener, pipBoundsAlgorithm, pipKeepClearAlgorithm, pipBoundsState, pipAppOpsListener, pipBoundsAlgorithm, pipKeepClearAlgorithm, pipBoundsState, pipMotionHelper, pipMotionHelper, pipMediaController, phonePipMenuController, pipTaskOrganizer, pipTransitionState, pipMediaController, phonePipMenuController, pipTaskOrganizer, pipTransitionState, Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +12 −17 Original line number Original line Diff line number Diff line Loading @@ -101,6 +101,8 @@ import com.android.wm.shell.draganddrop.DragAndDropController; import com.android.wm.shell.onehanded.OneHandedController; import com.android.wm.shell.onehanded.OneHandedController; import com.android.wm.shell.onehanded.OneHandedTransitionCallback; import com.android.wm.shell.onehanded.OneHandedTransitionCallback; import com.android.wm.shell.pip.PinnedStackListenerForwarder; import com.android.wm.shell.pip.PinnedStackListenerForwarder; import com.android.wm.shell.sysui.ConfigurationChangeListener; import com.android.wm.shell.sysui.ShellController; import java.io.PrintWriter; import java.io.PrintWriter; import java.util.ArrayList; import java.util.ArrayList; Loading @@ -119,7 +121,7 @@ import java.util.function.IntConsumer; * * * The controller manages addition, removal, and visible state of bubbles on screen. * The controller manages addition, removal, and visible state of bubbles on screen. */ */ public class BubbleController { public class BubbleController implements ConfigurationChangeListener { private static final String TAG = TAG_WITH_CLASS_NAME ? "BubbleController" : TAG_BUBBLES; private static final String TAG = TAG_WITH_CLASS_NAME ? "BubbleController" : TAG_BUBBLES; Loading Loading @@ -155,6 +157,7 @@ public class BubbleController { private final DisplayController mDisplayController; private final DisplayController mDisplayController; private final TaskViewTransitions mTaskViewTransitions; private final TaskViewTransitions mTaskViewTransitions; private final SyncTransactionQueue mSyncQueue; private final SyncTransactionQueue mSyncQueue; private final ShellController mShellController; // Used to post to main UI thread // Used to post to main UI thread private final ShellExecutor mMainExecutor; private final ShellExecutor mMainExecutor; Loading Loading @@ -224,6 +227,7 @@ public class BubbleController { public BubbleController(Context context, public BubbleController(Context context, ShellController shellController, BubbleData data, BubbleData data, @Nullable BubbleStackView.SurfaceSynchronizer synchronizer, @Nullable BubbleStackView.SurfaceSynchronizer synchronizer, FloatingContentCoordinator floatingContentCoordinator, FloatingContentCoordinator floatingContentCoordinator, Loading @@ -246,6 +250,7 @@ public class BubbleController { TaskViewTransitions taskViewTransitions, TaskViewTransitions taskViewTransitions, SyncTransactionQueue syncQueue) { SyncTransactionQueue syncQueue) { mContext = context; mContext = context; mShellController = shellController; mLauncherApps = launcherApps; mLauncherApps = launcherApps; mBarService = statusBarService == null mBarService = statusBarService == null ? IStatusBarService.Stub.asInterface( ? IStatusBarService.Stub.asInterface( Loading Loading @@ -414,6 +419,8 @@ public class BubbleController { // Clear out any persisted bubbles on disk that no longer have a valid user. // Clear out any persisted bubbles on disk that no longer have a valid user. List<UserInfo> users = mUserManager.getAliveUsers(); List<UserInfo> users = mUserManager.getAliveUsers(); mDataRepository.sanitizeBubbles(users); mDataRepository.sanitizeBubbles(users); mShellController.addConfigurationChangeListener(this); } } @VisibleForTesting @VisibleForTesting Loading Loading @@ -798,7 +805,8 @@ public class BubbleController { mSavedBubbleKeysPerUser.remove(userId); mSavedBubbleKeysPerUser.remove(userId); } } private void updateForThemeChanges() { @Override public void onThemeChanged() { if (mStackView != null) { if (mStackView != null) { mStackView.onThemeChanged(); mStackView.onThemeChanged(); } } Loading @@ -818,7 +826,8 @@ public class BubbleController { } } } } private void onConfigChanged(Configuration newConfig) { @Override public void onConfigurationChanged(Configuration newConfig) { if (mBubblePositioner != null) { if (mBubblePositioner != null) { mBubblePositioner.update(); mBubblePositioner.update(); } } Loading Loading @@ -1677,13 +1686,6 @@ public class BubbleController { }); }); } } @Override public void updateForThemeChanges() { mMainExecutor.execute(() -> { BubbleController.this.updateForThemeChanges(); }); } @Override @Override public void expandStackAndSelectBubble(BubbleEntry entry) { public void expandStackAndSelectBubble(BubbleEntry entry) { mMainExecutor.execute(() -> { mMainExecutor.execute(() -> { Loading Loading @@ -1822,13 +1824,6 @@ public class BubbleController { }); }); } } @Override public void onConfigChanged(Configuration newConfig) { mMainExecutor.execute(() -> { BubbleController.this.onConfigChanged(newConfig); }); } @Override @Override public void onNotificationPanelExpandedChanged(boolean expanded) { public void onNotificationPanelExpandedChanged(boolean expanded) { mMainExecutor.execute( mMainExecutor.execute( Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java +0 −10 Original line number Original line Diff line number Diff line Loading @@ -107,9 +107,6 @@ public interface Bubbles { /** Tell the stack of bubbles to collapse. */ /** Tell the stack of bubbles to collapse. */ void collapseStack(); void collapseStack(); /** Tell the controller need update its UI to fit theme. */ void updateForThemeChanges(); /** /** * Request the stack expand if needed, then select the specified Bubble as current. * Request the stack expand if needed, then select the specified Bubble as current. * If no bubble exists for this entry, one is created. * If no bubble exists for this entry, one is created. Loading Loading @@ -255,13 +252,6 @@ public interface Bubbles { */ */ void onUserRemoved(int removedUserId); void onUserRemoved(int removedUserId); /** * Called when config changed. * * @param newConfig the new config. */ void onConfigChanged(Configuration newConfig); /** Description of current bubble state. */ /** Description of current bubble state. */ void dump(PrintWriter pw, String[] args); void dump(PrintWriter pw, String[] args); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/TvPipModule.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -48,6 +48,7 @@ import com.android.wm.shell.pip.tv.TvPipNotificationController; import com.android.wm.shell.pip.tv.TvPipTaskOrganizer; import com.android.wm.shell.pip.tv.TvPipTaskOrganizer; import com.android.wm.shell.pip.tv.TvPipTransition; import com.android.wm.shell.pip.tv.TvPipTransition; import com.android.wm.shell.splitscreen.SplitScreenController; import com.android.wm.shell.splitscreen.SplitScreenController; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.transition.Transitions; import java.util.Optional; import java.util.Optional; Loading @@ -64,6 +65,7 @@ public abstract class TvPipModule { @Provides @Provides static Optional<Pip> providePip( static Optional<Pip> providePip( Context context, Context context, ShellController shellController, TvPipBoundsState tvPipBoundsState, TvPipBoundsState tvPipBoundsState, TvPipBoundsAlgorithm tvPipBoundsAlgorithm, TvPipBoundsAlgorithm tvPipBoundsAlgorithm, TvPipBoundsController tvPipBoundsController, TvPipBoundsController tvPipBoundsController, Loading @@ -81,6 +83,7 @@ public abstract class TvPipModule { return Optional.of( return Optional.of( TvPipController.create( TvPipController.create( context, context, shellController, tvPipBoundsState, tvPipBoundsState, tvPipBoundsAlgorithm, tvPipBoundsAlgorithm, tvPipBoundsController, tvPipBoundsController, Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +29 −6 Original line number Original line Diff line number Diff line Loading @@ -83,6 +83,8 @@ import com.android.wm.shell.startingsurface.StartingSurface; import com.android.wm.shell.startingsurface.StartingWindowController; import com.android.wm.shell.startingsurface.StartingWindowController; import com.android.wm.shell.startingsurface.StartingWindowTypeAlgorithm; import com.android.wm.shell.startingsurface.StartingWindowTypeAlgorithm; import com.android.wm.shell.startingsurface.phone.PhoneStartingWindowTypeAlgorithm; import com.android.wm.shell.startingsurface.phone.PhoneStartingWindowTypeAlgorithm; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.sysui.ShellInterface; import com.android.wm.shell.tasksurfacehelper.TaskSurfaceHelper; import com.android.wm.shell.tasksurfacehelper.TaskSurfaceHelper; import com.android.wm.shell.tasksurfacehelper.TaskSurfaceHelperController; import com.android.wm.shell.tasksurfacehelper.TaskSurfaceHelperController; import com.android.wm.shell.transition.ShellTransitions; import com.android.wm.shell.transition.ShellTransitions; Loading Loading @@ -160,10 +162,13 @@ public abstract class WMShellBaseModule { @WMSingleton @WMSingleton @Provides @Provides static DragAndDropController provideDragAndDropController(Context context, static DragAndDropController provideDragAndDropController(Context context, DisplayController displayController, UiEventLogger uiEventLogger, ShellController shellController, IconProvider iconProvider, @ShellMainThread ShellExecutor mainExecutor) { DisplayController displayController, return new DragAndDropController(context, displayController, uiEventLogger, iconProvider, UiEventLogger uiEventLogger, mainExecutor); IconProvider iconProvider, @ShellMainThread ShellExecutor mainExecutor) { return new DragAndDropController(context, shellController, displayController, uiEventLogger, iconProvider, mainExecutor); } } @WMSingleton @WMSingleton Loading Loading @@ -378,9 +383,11 @@ public abstract class WMShellBaseModule { @WMSingleton @WMSingleton @Provides @Provides static Optional<HideDisplayCutoutController> provideHideDisplayCutoutController(Context context, static Optional<HideDisplayCutoutController> provideHideDisplayCutoutController(Context context, DisplayController displayController, @ShellMainThread ShellExecutor mainExecutor) { ShellController shellController, DisplayController displayController, @ShellMainThread ShellExecutor mainExecutor) { return Optional.ofNullable( return Optional.ofNullable( HideDisplayCutoutController.create(context, displayController, mainExecutor)); HideDisplayCutoutController.create(context, shellController, displayController, mainExecutor)); } } // // Loading Loading @@ -634,6 +641,22 @@ public abstract class WMShellBaseModule { return Optional.of(new ActivityEmbeddingController(context, transitions)); return Optional.of(new ActivityEmbeddingController(context, transitions)); } } // // SysUI -> Shell interface // @WMSingleton @Provides static ShellInterface provideShellSysuiCallbacks(ShellController shellController) { return shellController.asShell(); } @WMSingleton @Provides static ShellController provideShellController(@ShellMainThread ShellExecutor mainExecutor) { return new ShellController(mainExecutor); } // // // Misc // Misc // // Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +10 −5 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,7 @@ import com.android.wm.shell.pip.phone.PipMotionHelper; import com.android.wm.shell.pip.phone.PipTouchHandler; import com.android.wm.shell.pip.phone.PipTouchHandler; import com.android.wm.shell.recents.RecentTasksController; import com.android.wm.shell.recents.RecentTasksController; import com.android.wm.shell.splitscreen.SplitScreenController; import com.android.wm.shell.splitscreen.SplitScreenController; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.unfold.ShellUnfoldProgressProvider; import com.android.wm.shell.unfold.ShellUnfoldProgressProvider; import com.android.wm.shell.unfold.UnfoldAnimationController; import com.android.wm.shell.unfold.UnfoldAnimationController; Loading Loading @@ -134,6 +135,7 @@ public abstract class WMShellModule { @WMSingleton @WMSingleton @Provides @Provides static BubbleController provideBubbleController(Context context, static BubbleController provideBubbleController(Context context, ShellController shellController, BubbleData data, BubbleData data, FloatingContentCoordinator floatingContentCoordinator, FloatingContentCoordinator floatingContentCoordinator, IStatusBarService statusBarService, IStatusBarService statusBarService, Loading @@ -153,7 +155,7 @@ public abstract class WMShellModule { @ShellBackgroundThread ShellExecutor bgExecutor, @ShellBackgroundThread ShellExecutor bgExecutor, TaskViewTransitions taskViewTransitions, TaskViewTransitions taskViewTransitions, SyncTransactionQueue syncQueue) { SyncTransactionQueue syncQueue) { return new BubbleController(context, data, null /* synchronizer */, return new BubbleController(context, shellController, data, null /* synchronizer */, floatingContentCoordinator, floatingContentCoordinator, new BubbleDataRepository(context, launcherApps, mainExecutor), new BubbleDataRepository(context, launcherApps, mainExecutor), statusBarService, windowManager, windowManagerShellWrapper, userManager, statusBarService, windowManager, windowManagerShellWrapper, userManager, Loading Loading @@ -205,12 +207,14 @@ public abstract class WMShellModule { @Provides @Provides @DynamicOverride @DynamicOverride static OneHandedController provideOneHandedController(Context context, static OneHandedController provideOneHandedController(Context context, ShellController shellController, WindowManager windowManager, DisplayController displayController, WindowManager windowManager, DisplayController displayController, DisplayLayout displayLayout, TaskStackListenerImpl taskStackListener, DisplayLayout displayLayout, TaskStackListenerImpl taskStackListener, UiEventLogger uiEventLogger, InteractionJankMonitor jankMonitor, UiEventLogger uiEventLogger, InteractionJankMonitor jankMonitor, @ShellMainThread ShellExecutor mainExecutor, @ShellMainThread Handler mainHandler) { @ShellMainThread ShellExecutor mainExecutor, @ShellMainThread Handler mainHandler) { return OneHandedController.create(context, windowManager, displayController, displayLayout, return OneHandedController.create(context, shellController, windowManager, taskStackListener, jankMonitor, uiEventLogger, mainExecutor, mainHandler); displayController, displayLayout, taskStackListener, jankMonitor, uiEventLogger, mainExecutor, mainHandler); } } // // Loading Loading @@ -242,7 +246,8 @@ public abstract class WMShellModule { @WMSingleton @WMSingleton @Provides @Provides static Optional<Pip> providePip(Context context, DisplayController displayController, static Optional<Pip> providePip(Context context, ShellController shellController, DisplayController displayController, PipAppOpsListener pipAppOpsListener, PipBoundsAlgorithm pipBoundsAlgorithm, PipAppOpsListener pipAppOpsListener, PipBoundsAlgorithm pipBoundsAlgorithm, PipKeepClearAlgorithm pipKeepClearAlgorithm, PipBoundsState pipBoundsState, PipKeepClearAlgorithm pipKeepClearAlgorithm, PipBoundsState pipBoundsState, PipMotionHelper pipMotionHelper, PipMediaController pipMediaController, PipMotionHelper pipMotionHelper, PipMediaController pipMediaController, Loading @@ -254,7 +259,7 @@ public abstract class WMShellModule { PipParamsChangedForwarder pipParamsChangedForwarder, PipParamsChangedForwarder pipParamsChangedForwarder, Optional<OneHandedController> oneHandedController, Optional<OneHandedController> oneHandedController, @ShellMainThread ShellExecutor mainExecutor) { @ShellMainThread ShellExecutor mainExecutor) { return Optional.ofNullable(PipController.create(context, displayController, return Optional.ofNullable(PipController.create(context, shellController, displayController, pipAppOpsListener, pipBoundsAlgorithm, pipKeepClearAlgorithm, pipBoundsState, pipAppOpsListener, pipBoundsAlgorithm, pipKeepClearAlgorithm, pipBoundsState, pipMotionHelper, pipMotionHelper, pipMediaController, phonePipMenuController, pipTaskOrganizer, pipTransitionState, pipMediaController, phonePipMenuController, pipTaskOrganizer, pipTransitionState, Loading