Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMComponent.java +6 −2 Original line number Diff line number Diff line Loading @@ -36,12 +36,13 @@ import com.android.wm.shell.splitscreen.SplitScreen; import com.android.wm.shell.startingsurface.StartingSurface; import com.android.wm.shell.sysui.ShellInterface; import com.android.wm.shell.taskview.TaskViewFactory; import com.android.wm.shell.windowdecor.viewholder.AppHandles; import java.util.Optional; import dagger.BindsInstance; import dagger.Subcomponent; import java.util.Optional; /** * Dagger Subcomponent for WindowManager. This class explicitly describes the interfaces exported * from the WM component into the SysUI component, and references the specific dependencies Loading Loading @@ -120,6 +121,9 @@ public interface WMComponent { @WMSingleton Optional<AppZoomOut> getAppZoomOut(); @WMSingleton Optional<AppHandles> getAppHandles(); // Injector methods to support field injection /** Injector method for {@link BubbleBarExpandedView}. */ Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +16 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,8 @@ import com.android.wm.shell.unfold.ShellUnfoldProgressProvider; import com.android.wm.shell.unfold.UnfoldAnimationController; import com.android.wm.shell.unfold.UnfoldTransitionHandler; import com.android.wm.shell.windowdecor.WindowDecorViewModel; import com.android.wm.shell.windowdecor.viewholder.AppHandleNotifier; import com.android.wm.shell.windowdecor.viewholder.AppHandles; import dagger.BindsOptionalOf; import dagger.Lazy; Loading Loading @@ -1113,6 +1115,19 @@ public abstract class WMShellBaseModule { transitions); } // // AppHandle // @WMSingleton @Provides static Optional<AppHandles> provideAppHandles(Optional<AppHandleNotifier> appHandleNotifier) { return appHandleNotifier.map(AppHandleNotifier::asAppHandleImpl); } @BindsOptionalOf abstract AppHandleNotifier getAppHandleNotifier(); // // Misc // Loading Loading @@ -1142,6 +1157,7 @@ public abstract class WMShellBaseModule { Optional<RecentsTransitionHandler> recentsTransitionHandlerOptional, Optional<OneHandedController> oneHandedControllerOptional, Optional<AppZoomOutController> appZoomOutControllerOptional, Optional<AppHandles> appHandlesOptional, Optional<HideDisplayCutoutController> hideDisplayCutoutControllerOptional, Optional<ActivityEmbeddingController> activityEmbeddingOptional, Optional<MixedTransitionHandler> mixedTransitionHandler, Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +15 −7 Original line number Diff line number Diff line Loading @@ -190,20 +190,20 @@ import com.android.wm.shell.windowdecor.common.viewhost.WindowDecorViewHostSuppl import com.android.wm.shell.windowdecor.education.DesktopWindowingEducationPromoController; import com.android.wm.shell.windowdecor.education.DesktopWindowingEducationTooltipController; import com.android.wm.shell.windowdecor.tiling.DesktopTilingDecorViewModel; import com.android.wm.shell.windowdecor.viewholder.AppHandleNotifier; import java.util.ArrayList; import java.util.List; import java.util.Optional; import dagger.Binds; import dagger.Lazy; import dagger.Module; import dagger.Provides; import kotlinx.coroutines.CoroutineScope; import kotlinx.coroutines.ExperimentalCoroutinesApi; import kotlinx.coroutines.MainCoroutineDispatcher; import java.util.ArrayList; import java.util.List; import java.util.Optional; /** * Provides dependencies from {@link com.android.wm.shell}, these dependencies are only accessible * from components within the WM subcomponent (can be explicitly exposed to the SysUIComponent, see Loading Loading @@ -1132,7 +1132,8 @@ public abstract class WMShellModule { Optional<CompatUIHandler> compatUI, DesksOrganizer desksOrganizer, DesktopState desktopState, DesktopConfig desktopConfig DesktopConfig desktopConfig, AppHandleNotifier appHandleNotifier ) { if (!desktopState.canEnterDesktopModeOrShowAppHandle()) { return Optional.empty(); Loading @@ -1151,7 +1152,7 @@ public abstract class WMShellModule { desktopModeUiEventLogger, taskResourceLoader, recentsTransitionHandler, desktopModeCompatPolicy, desktopTilingDecorViewModel, multiDisplayDragMoveIndicatorController, compatUI.orElse(null), desksOrganizer, desktopState, desktopConfig)); desksOrganizer, desktopState, desktopConfig, appHandleNotifier)); } @WMSingleton Loading Loading @@ -1481,6 +1482,13 @@ public abstract class WMShellModule { desktopState)); } @WMSingleton @Provides static AppHandleNotifier provideAppHandleNotifier( @ShellMainThread ShellExecutor shellExecutor) { return new AppHandleNotifier(shellExecutor); } @WMSingleton @Provides static AppHandleEducationDatastoreRepository provideAppHandleEducationDatastoreRepository( Loading libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java +3 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ public enum ShellProtoLogGroup implements IProtoLogGroup { Consts.TAG_WM_COMPAT_UI), WM_SHELL_APP_COMPAT(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false, Consts.TAG_WM_APP_COMPAT), WM_SHELL_APP_HANDLES(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false, Consts.TAG_WM_APP_HANDLES), TEST_GROUP(true, true, false, "WindowManagerShellProtoLogTest"); private final boolean mEnabled; Loading Loading @@ -141,6 +143,7 @@ public enum ShellProtoLogGroup implements IProtoLogGroup { private static final String TAG_WM_COMPAT_UI = "CompatUi"; private static final String TAG_WM_APP_COMPAT = "AppCompat"; private static final String TAG_WM_BUBBLES = "Bubbles"; private static final String TAG_WM_APP_HANDLES = "AppHandles"; private static final boolean ENABLE_DEBUG = true; private static final boolean ENABLE_LOG_TO_PROTO_DEBUG = true; Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +7 −3 Original line number Diff line number Diff line Loading @@ -155,6 +155,7 @@ import com.android.wm.shell.windowdecor.extension.InsetsStateKt; import com.android.wm.shell.windowdecor.extension.TaskInfoKt; import com.android.wm.shell.windowdecor.tiling.DesktopTilingDecorViewModel; import com.android.wm.shell.windowdecor.tiling.SnapEventHandler; import com.android.wm.shell.windowdecor.viewholder.AppHandleNotifier; import com.android.wm.shell.windowdecor.viewholder.AppHandleViewHolder; import com.android.wm.shell.windowdecor.viewholder.AppHeaderViewHolder; Loading Loading @@ -317,7 +318,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, CompatUIHandler compatUI, DesksOrganizer desksOrganizer, DesktopState desktopState, DesktopConfig desktopConfig) { DesktopConfig desktopConfig, AppHandleNotifier appHandleNotifier) { this( context, shellExecutor, Loading Loading @@ -368,7 +370,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, compatUI, desksOrganizer, desktopState, desktopConfig); desktopConfig, appHandleNotifier); } @VisibleForTesting Loading Loading @@ -422,7 +425,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, CompatUIHandler compatUI, DesksOrganizer desksOrganizer, DesktopState desktopState, DesktopConfig desktopConfig) { DesktopConfig desktopConfig, AppHandleNotifier appHandleNotifier) { mContext = context; mMainExecutor = shellExecutor; mMainHandler = mainHandler; Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMComponent.java +6 −2 Original line number Diff line number Diff line Loading @@ -36,12 +36,13 @@ import com.android.wm.shell.splitscreen.SplitScreen; import com.android.wm.shell.startingsurface.StartingSurface; import com.android.wm.shell.sysui.ShellInterface; import com.android.wm.shell.taskview.TaskViewFactory; import com.android.wm.shell.windowdecor.viewholder.AppHandles; import java.util.Optional; import dagger.BindsInstance; import dagger.Subcomponent; import java.util.Optional; /** * Dagger Subcomponent for WindowManager. This class explicitly describes the interfaces exported * from the WM component into the SysUI component, and references the specific dependencies Loading Loading @@ -120,6 +121,9 @@ public interface WMComponent { @WMSingleton Optional<AppZoomOut> getAppZoomOut(); @WMSingleton Optional<AppHandles> getAppHandles(); // Injector methods to support field injection /** Injector method for {@link BubbleBarExpandedView}. */ Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +16 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,8 @@ import com.android.wm.shell.unfold.ShellUnfoldProgressProvider; import com.android.wm.shell.unfold.UnfoldAnimationController; import com.android.wm.shell.unfold.UnfoldTransitionHandler; import com.android.wm.shell.windowdecor.WindowDecorViewModel; import com.android.wm.shell.windowdecor.viewholder.AppHandleNotifier; import com.android.wm.shell.windowdecor.viewholder.AppHandles; import dagger.BindsOptionalOf; import dagger.Lazy; Loading Loading @@ -1113,6 +1115,19 @@ public abstract class WMShellBaseModule { transitions); } // // AppHandle // @WMSingleton @Provides static Optional<AppHandles> provideAppHandles(Optional<AppHandleNotifier> appHandleNotifier) { return appHandleNotifier.map(AppHandleNotifier::asAppHandleImpl); } @BindsOptionalOf abstract AppHandleNotifier getAppHandleNotifier(); // // Misc // Loading Loading @@ -1142,6 +1157,7 @@ public abstract class WMShellBaseModule { Optional<RecentsTransitionHandler> recentsTransitionHandlerOptional, Optional<OneHandedController> oneHandedControllerOptional, Optional<AppZoomOutController> appZoomOutControllerOptional, Optional<AppHandles> appHandlesOptional, Optional<HideDisplayCutoutController> hideDisplayCutoutControllerOptional, Optional<ActivityEmbeddingController> activityEmbeddingOptional, Optional<MixedTransitionHandler> mixedTransitionHandler, Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +15 −7 Original line number Diff line number Diff line Loading @@ -190,20 +190,20 @@ import com.android.wm.shell.windowdecor.common.viewhost.WindowDecorViewHostSuppl import com.android.wm.shell.windowdecor.education.DesktopWindowingEducationPromoController; import com.android.wm.shell.windowdecor.education.DesktopWindowingEducationTooltipController; import com.android.wm.shell.windowdecor.tiling.DesktopTilingDecorViewModel; import com.android.wm.shell.windowdecor.viewholder.AppHandleNotifier; import java.util.ArrayList; import java.util.List; import java.util.Optional; import dagger.Binds; import dagger.Lazy; import dagger.Module; import dagger.Provides; import kotlinx.coroutines.CoroutineScope; import kotlinx.coroutines.ExperimentalCoroutinesApi; import kotlinx.coroutines.MainCoroutineDispatcher; import java.util.ArrayList; import java.util.List; import java.util.Optional; /** * Provides dependencies from {@link com.android.wm.shell}, these dependencies are only accessible * from components within the WM subcomponent (can be explicitly exposed to the SysUIComponent, see Loading Loading @@ -1132,7 +1132,8 @@ public abstract class WMShellModule { Optional<CompatUIHandler> compatUI, DesksOrganizer desksOrganizer, DesktopState desktopState, DesktopConfig desktopConfig DesktopConfig desktopConfig, AppHandleNotifier appHandleNotifier ) { if (!desktopState.canEnterDesktopModeOrShowAppHandle()) { return Optional.empty(); Loading @@ -1151,7 +1152,7 @@ public abstract class WMShellModule { desktopModeUiEventLogger, taskResourceLoader, recentsTransitionHandler, desktopModeCompatPolicy, desktopTilingDecorViewModel, multiDisplayDragMoveIndicatorController, compatUI.orElse(null), desksOrganizer, desktopState, desktopConfig)); desksOrganizer, desktopState, desktopConfig, appHandleNotifier)); } @WMSingleton Loading Loading @@ -1481,6 +1482,13 @@ public abstract class WMShellModule { desktopState)); } @WMSingleton @Provides static AppHandleNotifier provideAppHandleNotifier( @ShellMainThread ShellExecutor shellExecutor) { return new AppHandleNotifier(shellExecutor); } @WMSingleton @Provides static AppHandleEducationDatastoreRepository provideAppHandleEducationDatastoreRepository( Loading
libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java +3 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ public enum ShellProtoLogGroup implements IProtoLogGroup { Consts.TAG_WM_COMPAT_UI), WM_SHELL_APP_COMPAT(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false, Consts.TAG_WM_APP_COMPAT), WM_SHELL_APP_HANDLES(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false, Consts.TAG_WM_APP_HANDLES), TEST_GROUP(true, true, false, "WindowManagerShellProtoLogTest"); private final boolean mEnabled; Loading Loading @@ -141,6 +143,7 @@ public enum ShellProtoLogGroup implements IProtoLogGroup { private static final String TAG_WM_COMPAT_UI = "CompatUi"; private static final String TAG_WM_APP_COMPAT = "AppCompat"; private static final String TAG_WM_BUBBLES = "Bubbles"; private static final String TAG_WM_APP_HANDLES = "AppHandles"; private static final boolean ENABLE_DEBUG = true; private static final boolean ENABLE_LOG_TO_PROTO_DEBUG = true; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +7 −3 Original line number Diff line number Diff line Loading @@ -155,6 +155,7 @@ import com.android.wm.shell.windowdecor.extension.InsetsStateKt; import com.android.wm.shell.windowdecor.extension.TaskInfoKt; import com.android.wm.shell.windowdecor.tiling.DesktopTilingDecorViewModel; import com.android.wm.shell.windowdecor.tiling.SnapEventHandler; import com.android.wm.shell.windowdecor.viewholder.AppHandleNotifier; import com.android.wm.shell.windowdecor.viewholder.AppHandleViewHolder; import com.android.wm.shell.windowdecor.viewholder.AppHeaderViewHolder; Loading Loading @@ -317,7 +318,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, CompatUIHandler compatUI, DesksOrganizer desksOrganizer, DesktopState desktopState, DesktopConfig desktopConfig) { DesktopConfig desktopConfig, AppHandleNotifier appHandleNotifier) { this( context, shellExecutor, Loading Loading @@ -368,7 +370,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, compatUI, desksOrganizer, desktopState, desktopConfig); desktopConfig, appHandleNotifier); } @VisibleForTesting Loading Loading @@ -422,7 +425,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, CompatUIHandler compatUI, DesksOrganizer desksOrganizer, DesktopState desktopState, DesktopConfig desktopConfig) { DesktopConfig desktopConfig, AppHandleNotifier appHandleNotifier) { mContext = context; mMainExecutor = shellExecutor; mMainHandler = mainHandler; Loading