Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipMenuController.java→libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipMenuController.java +9 −8 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * Copyright (C) 2024 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. Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.wm.shell.pip; package com.android.wm.shell.common.pip; import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY; Loading @@ -33,12 +33,13 @@ import android.view.SurfaceControl; import android.view.WindowManager; import com.android.wm.shell.R; import com.android.wm.shell.ShellTaskOrganizer; import java.util.List; /** * Interface to allow {@link com.android.wm.shell.pip.PipTaskOrganizer} to call into * PiP menu when certain events happen (task appear/vanish, PiP move, etc.) * Interface to interact with PiP menu when certain events happen * (task appear/vanish, PiP move, etc.). */ public interface PipMenuController { Loading @@ -52,15 +53,15 @@ public interface PipMenuController { float ALPHA_NO_CHANGE = -1f; /** * Called when * {@link PipTaskOrganizer#onTaskAppeared(RunningTaskInfo, SurfaceControl)} * Called when out implementation of * {@link ShellTaskOrganizer.TaskListener#onTaskAppeared(RunningTaskInfo, SurfaceControl)} * is called. */ void attach(SurfaceControl leash); /** * Called when * {@link PipTaskOrganizer#onTaskVanished(RunningTaskInfo)} is called. * Called when our implementation of * {@link ShellTaskOrganizer.TaskListener#onTaskVanished(RunningTaskInfo)} is called. */ void detach(); Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip2Module.java +17 −0 Original line number Diff line number Diff line Loading @@ -18,18 +18,23 @@ package com.android.wm.shell.dagger.pip; import android.annotation.NonNull; import android.content.Context; import android.os.Handler; import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.DisplayController; import com.android.wm.shell.common.DisplayInsetsController; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.SystemWindows; import com.android.wm.shell.common.annotations.ShellMainThread; import com.android.wm.shell.common.pip.PipBoundsAlgorithm; import com.android.wm.shell.common.pip.PipBoundsState; import com.android.wm.shell.common.pip.PipDisplayLayoutState; import com.android.wm.shell.common.pip.PipMediaController; import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.common.pip.PipUtils; import com.android.wm.shell.dagger.WMShellBaseModule; import com.android.wm.shell.dagger.WMSingleton; import com.android.wm.shell.pip2.phone.PhonePipMenuController; import com.android.wm.shell.pip2.phone.PipController; import com.android.wm.shell.pip2.phone.PipScheduler; import com.android.wm.shell.pip2.phone.PipTransition; Loading Loading @@ -86,4 +91,16 @@ public abstract class Pip2Module { @ShellMainThread ShellExecutor mainExecutor) { return new PipScheduler(context, pipBoundsState, mainExecutor); } @WMSingleton @Provides static PhonePipMenuController providePipPhoneMenuController(Context context, PipBoundsState pipBoundsState, PipMediaController pipMediaController, SystemWindows systemWindows, PipUiEventLogger pipUiEventLogger, @ShellMainThread ShellExecutor mainExecutor, @ShellMainThread Handler mainHandler) { return new PhonePipMenuController(context, pipBoundsState, pipMediaController, systemWindows, pipUiEventLogger, mainExecutor, mainHandler); } } libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ import com.android.wm.shell.common.annotations.ShellMainThread; import com.android.wm.shell.common.pip.PipBoundsAlgorithm; import com.android.wm.shell.common.pip.PipBoundsState; import com.android.wm.shell.common.pip.PipDisplayLayoutState; import com.android.wm.shell.common.pip.PipMenuController; import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.common.pip.PipUtils; import com.android.wm.shell.pip.phone.PipMotionHelper; Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.pip.PipBoundsAlgorithm; import com.android.wm.shell.common.pip.PipBoundsState; import com.android.wm.shell.common.pip.PipDisplayLayoutState; import com.android.wm.shell.common.pip.PipMenuController; import com.android.wm.shell.common.pip.PipUtils; import com.android.wm.shell.protolog.ShellProtoLogGroup; import com.android.wm.shell.splitscreen.SplitScreenController; Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import androidx.annotation.NonNull; import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.pip.PipBoundsAlgorithm; import com.android.wm.shell.common.pip.PipBoundsState; import com.android.wm.shell.common.pip.PipMenuController; import com.android.wm.shell.common.split.SplitScreenUtils; import com.android.wm.shell.sysui.ShellInit; import com.android.wm.shell.transition.Transitions; Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipMenuController.java→libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipMenuController.java +9 −8 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * Copyright (C) 2024 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. Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.wm.shell.pip; package com.android.wm.shell.common.pip; import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY; Loading @@ -33,12 +33,13 @@ import android.view.SurfaceControl; import android.view.WindowManager; import com.android.wm.shell.R; import com.android.wm.shell.ShellTaskOrganizer; import java.util.List; /** * Interface to allow {@link com.android.wm.shell.pip.PipTaskOrganizer} to call into * PiP menu when certain events happen (task appear/vanish, PiP move, etc.) * Interface to interact with PiP menu when certain events happen * (task appear/vanish, PiP move, etc.). */ public interface PipMenuController { Loading @@ -52,15 +53,15 @@ public interface PipMenuController { float ALPHA_NO_CHANGE = -1f; /** * Called when * {@link PipTaskOrganizer#onTaskAppeared(RunningTaskInfo, SurfaceControl)} * Called when out implementation of * {@link ShellTaskOrganizer.TaskListener#onTaskAppeared(RunningTaskInfo, SurfaceControl)} * is called. */ void attach(SurfaceControl leash); /** * Called when * {@link PipTaskOrganizer#onTaskVanished(RunningTaskInfo)} is called. * Called when our implementation of * {@link ShellTaskOrganizer.TaskListener#onTaskVanished(RunningTaskInfo)} is called. */ void detach(); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip2Module.java +17 −0 Original line number Diff line number Diff line Loading @@ -18,18 +18,23 @@ package com.android.wm.shell.dagger.pip; import android.annotation.NonNull; import android.content.Context; import android.os.Handler; import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.DisplayController; import com.android.wm.shell.common.DisplayInsetsController; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.SystemWindows; import com.android.wm.shell.common.annotations.ShellMainThread; import com.android.wm.shell.common.pip.PipBoundsAlgorithm; import com.android.wm.shell.common.pip.PipBoundsState; import com.android.wm.shell.common.pip.PipDisplayLayoutState; import com.android.wm.shell.common.pip.PipMediaController; import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.common.pip.PipUtils; import com.android.wm.shell.dagger.WMShellBaseModule; import com.android.wm.shell.dagger.WMSingleton; import com.android.wm.shell.pip2.phone.PhonePipMenuController; import com.android.wm.shell.pip2.phone.PipController; import com.android.wm.shell.pip2.phone.PipScheduler; import com.android.wm.shell.pip2.phone.PipTransition; Loading Loading @@ -86,4 +91,16 @@ public abstract class Pip2Module { @ShellMainThread ShellExecutor mainExecutor) { return new PipScheduler(context, pipBoundsState, mainExecutor); } @WMSingleton @Provides static PhonePipMenuController providePipPhoneMenuController(Context context, PipBoundsState pipBoundsState, PipMediaController pipMediaController, SystemWindows systemWindows, PipUiEventLogger pipUiEventLogger, @ShellMainThread ShellExecutor mainExecutor, @ShellMainThread Handler mainHandler) { return new PhonePipMenuController(context, pipBoundsState, pipMediaController, systemWindows, pipUiEventLogger, mainExecutor, mainHandler); } }
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ import com.android.wm.shell.common.annotations.ShellMainThread; import com.android.wm.shell.common.pip.PipBoundsAlgorithm; import com.android.wm.shell.common.pip.PipBoundsState; import com.android.wm.shell.common.pip.PipDisplayLayoutState; import com.android.wm.shell.common.pip.PipMenuController; import com.android.wm.shell.common.pip.PipUiEventLogger; import com.android.wm.shell.common.pip.PipUtils; import com.android.wm.shell.pip.phone.PipMotionHelper; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.pip.PipBoundsAlgorithm; import com.android.wm.shell.common.pip.PipBoundsState; import com.android.wm.shell.common.pip.PipDisplayLayoutState; import com.android.wm.shell.common.pip.PipMenuController; import com.android.wm.shell.common.pip.PipUtils; import com.android.wm.shell.protolog.ShellProtoLogGroup; import com.android.wm.shell.splitscreen.SplitScreenController; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import androidx.annotation.NonNull; import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.pip.PipBoundsAlgorithm; import com.android.wm.shell.common.pip.PipBoundsState; import com.android.wm.shell.common.pip.PipMenuController; import com.android.wm.shell.common.split.SplitScreenUtils; import com.android.wm.shell.sysui.ShellInit; import com.android.wm.shell.transition.Transitions; Loading