Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +16 −1 Original line number Original line Diff line number Diff line Loading @@ -87,6 +87,7 @@ import com.android.wm.shell.performance.PerfHintController; import com.android.wm.shell.recents.RecentTasks; import com.android.wm.shell.recents.RecentTasks; import com.android.wm.shell.recents.RecentTasksController; import com.android.wm.shell.recents.RecentTasksController; import com.android.wm.shell.recents.RecentsTransitionHandler; import com.android.wm.shell.recents.RecentsTransitionHandler; import com.android.wm.shell.recents.TaskStackTransitionObserver; import com.android.wm.shell.shared.DesktopModeStatus; import com.android.wm.shell.shared.DesktopModeStatus; import com.android.wm.shell.shared.ShellTransitions; import com.android.wm.shell.shared.ShellTransitions; import com.android.wm.shell.shared.annotations.ShellAnimationThread; import com.android.wm.shell.shared.annotations.ShellAnimationThread; Loading Loading @@ -619,12 +620,13 @@ public abstract class WMShellBaseModule { TaskStackListenerImpl taskStackListener, TaskStackListenerImpl taskStackListener, ActivityTaskManager activityTaskManager, ActivityTaskManager activityTaskManager, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, TaskStackTransitionObserver taskStackTransitionObserver, @ShellMainThread ShellExecutor mainExecutor @ShellMainThread ShellExecutor mainExecutor ) { ) { return Optional.ofNullable( return Optional.ofNullable( RecentTasksController.create(context, shellInit, shellController, RecentTasksController.create(context, shellInit, shellController, shellCommandHandler, taskStackListener, activityTaskManager, shellCommandHandler, taskStackListener, activityTaskManager, desktopModeTaskRepository, mainExecutor)); desktopModeTaskRepository, taskStackTransitionObserver, mainExecutor)); } } @BindsOptionalOf @BindsOptionalOf Loading Loading @@ -923,6 +925,19 @@ public abstract class WMShellBaseModule { }); }); } } // // Task Stack // @WMSingleton @Provides static TaskStackTransitionObserver provideTaskStackTransitionObserver( Lazy<Transitions> transitions, ShellInit shellInit ) { return new TaskStackTransitionObserver(transitions, shellInit); } // // // Misc // Misc // // Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -664,7 +664,8 @@ public abstract class WMShellModule { @Provides @Provides static Object provideIndependentShellComponentsToCreate( static Object provideIndependentShellComponentsToCreate( DragAndDropController dragAndDropController, DragAndDropController dragAndDropController, Optional<DesktopTasksTransitionObserver> desktopTasksTransitionObserverOptional) { Optional<DesktopTasksTransitionObserver> desktopTasksTransitionObserverOptional ) { return new Object(); return new Object(); } } } } libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentTasksListener.aidl +4 −1 Original line number Original line Diff line number Diff line Loading @@ -42,4 +42,7 @@ oneway interface IRecentTasksListener { * Called when a running task changes. * Called when a running task changes. */ */ void onRunningTaskChanged(in RunningTaskInfo taskInfo); void onRunningTaskChanged(in RunningTaskInfo taskInfo); /** A task has moved to front. */ oneway void onTaskMovedToFront(in RunningTaskInfo taskInfo); } } No newline at end of file libs/WindowManager/Shell/src/com/android/wm/shell/recents/OWNERS 0 → 100644 +6 −0 Original line number Original line Diff line number Diff line # WM shell sub-module task stack owners uysalorhan@google.com samcackett@google.com alexchau@google.com silvajordan@google.com uwaisashraf@google.com No newline at end of file libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java +39 −2 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.app.ActivityTaskManager.INVALID_TASK_ID; import static android.content.pm.PackageManager.FEATURE_PC; import static android.content.pm.PackageManager.FEATURE_PC; import static com.android.window.flags.Flags.enableDesktopWindowingTaskbarRunningApps; import static com.android.window.flags.Flags.enableDesktopWindowingTaskbarRunningApps; import static com.android.window.flags.Flags.enableTaskStackObserverInShell; import static com.android.wm.shell.sysui.ShellSharedConstants.KEY_EXTRA_SHELL_RECENT_TASKS; import static com.android.wm.shell.sysui.ShellSharedConstants.KEY_EXTRA_SHELL_RECENT_TASKS; import android.app.ActivityManager; import android.app.ActivityManager; Loading Loading @@ -57,6 +58,7 @@ import com.android.wm.shell.shared.annotations.ShellMainThread; import com.android.wm.shell.sysui.ShellCommandHandler; import com.android.wm.shell.sysui.ShellCommandHandler; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.sysui.ShellInit; import com.android.wm.shell.sysui.ShellInit; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.util.GroupedRecentTaskInfo; import com.android.wm.shell.util.GroupedRecentTaskInfo; import com.android.wm.shell.util.SplitBounds; import com.android.wm.shell.util.SplitBounds; Loading @@ -73,7 +75,8 @@ import java.util.function.Consumer; * Manages the recent task list from the system, caching it as necessary. * Manages the recent task list from the system, caching it as necessary. */ */ public class RecentTasksController implements TaskStackListenerCallback, public class RecentTasksController implements TaskStackListenerCallback, RemoteCallable<RecentTasksController>, DesktopModeTaskRepository.ActiveTasksListener { RemoteCallable<RecentTasksController>, DesktopModeTaskRepository.ActiveTasksListener, TaskStackTransitionObserver.TaskStackTransitionObserverListener { private static final String TAG = RecentTasksController.class.getSimpleName(); private static final String TAG = RecentTasksController.class.getSimpleName(); private final Context mContext; private final Context mContext; Loading @@ -84,6 +87,7 @@ public class RecentTasksController implements TaskStackListenerCallback, private final TaskStackListenerImpl mTaskStackListener; private final TaskStackListenerImpl mTaskStackListener; private final RecentTasksImpl mImpl = new RecentTasksImpl(); private final RecentTasksImpl mImpl = new RecentTasksImpl(); private final ActivityTaskManager mActivityTaskManager; private final ActivityTaskManager mActivityTaskManager; private final TaskStackTransitionObserver mTaskStackTransitionObserver; private RecentsTransitionHandler mTransitionHandler = null; private RecentsTransitionHandler mTransitionHandler = null; private IRecentTasksListener mListener; private IRecentTasksListener mListener; private final boolean mPcFeatureEnabled; private final boolean mPcFeatureEnabled; Loading Loading @@ -112,13 +116,15 @@ public class RecentTasksController implements TaskStackListenerCallback, TaskStackListenerImpl taskStackListener, TaskStackListenerImpl taskStackListener, ActivityTaskManager activityTaskManager, ActivityTaskManager activityTaskManager, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, TaskStackTransitionObserver taskStackTransitionObserver, @ShellMainThread ShellExecutor mainExecutor @ShellMainThread ShellExecutor mainExecutor ) { ) { if (!context.getResources().getBoolean(com.android.internal.R.bool.config_hasRecents)) { if (!context.getResources().getBoolean(com.android.internal.R.bool.config_hasRecents)) { return null; return null; } } return new RecentTasksController(context, shellInit, shellController, shellCommandHandler, return new RecentTasksController(context, shellInit, shellController, shellCommandHandler, taskStackListener, activityTaskManager, desktopModeTaskRepository, mainExecutor); taskStackListener, activityTaskManager, desktopModeTaskRepository, taskStackTransitionObserver, mainExecutor); } } RecentTasksController(Context context, RecentTasksController(Context context, Loading @@ -128,6 +134,7 @@ public class RecentTasksController implements TaskStackListenerCallback, TaskStackListenerImpl taskStackListener, TaskStackListenerImpl taskStackListener, ActivityTaskManager activityTaskManager, ActivityTaskManager activityTaskManager, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, TaskStackTransitionObserver taskStackTransitionObserver, ShellExecutor mainExecutor) { ShellExecutor mainExecutor) { mContext = context; mContext = context; mShellController = shellController; mShellController = shellController; Loading @@ -136,6 +143,7 @@ public class RecentTasksController implements TaskStackListenerCallback, mPcFeatureEnabled = mContext.getPackageManager().hasSystemFeature(FEATURE_PC); mPcFeatureEnabled = mContext.getPackageManager().hasSystemFeature(FEATURE_PC); mTaskStackListener = taskStackListener; mTaskStackListener = taskStackListener; mDesktopModeTaskRepository = desktopModeTaskRepository; mDesktopModeTaskRepository = desktopModeTaskRepository; mTaskStackTransitionObserver = taskStackTransitionObserver; mMainExecutor = mainExecutor; mMainExecutor = mainExecutor; shellInit.addInitCallback(this::onInit, this); shellInit.addInitCallback(this::onInit, this); } } Loading @@ -154,6 +162,10 @@ public class RecentTasksController implements TaskStackListenerCallback, mShellCommandHandler.addDumpCallback(this::dump, this); mShellCommandHandler.addDumpCallback(this::dump, this); mTaskStackListener.addListener(this); mTaskStackListener.addListener(this); mDesktopModeTaskRepository.ifPresent(it -> it.addActiveTaskListener(this)); mDesktopModeTaskRepository.ifPresent(it -> it.addActiveTaskListener(this)); if (Transitions.ENABLE_SHELL_TRANSITIONS) { mTaskStackTransitionObserver.addTaskStackTransitionObserverListener(this, mMainExecutor); } } } void setTransitionHandler(RecentsTransitionHandler handler) { void setTransitionHandler(RecentsTransitionHandler handler) { Loading Loading @@ -267,6 +279,12 @@ public class RecentTasksController implements TaskStackListenerCallback, notifyRecentTasksChanged(); notifyRecentTasksChanged(); } } @Override public void onTaskMovedToFrontThroughTransition( ActivityManager.RunningTaskInfo runningTaskInfo) { notifyTaskMovedToFront(runningTaskInfo); } @VisibleForTesting @VisibleForTesting void notifyRecentTasksChanged() { void notifyRecentTasksChanged() { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENT_TASKS, "Notify recent tasks changed"); ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENT_TASKS, "Notify recent tasks changed"); Loading Loading @@ -328,6 +346,19 @@ public class RecentTasksController implements TaskStackListenerCallback, } } } } private void notifyTaskMovedToFront(ActivityManager.RunningTaskInfo taskInfo) { if (mListener == null || !enableTaskStackObserverInShell() || taskInfo.realActivity == null) { return; } try { mListener.onTaskMovedToFront(taskInfo); } catch (RemoteException e) { Slog.w(TAG, "Failed call onTaskMovedToFront", e); } } private boolean shouldEnableRunningTasksForDesktopMode() { private boolean shouldEnableRunningTasksForDesktopMode() { return mPcFeatureEnabled return mPcFeatureEnabled || (DesktopModeStatus.canEnterDesktopMode(mContext) || (DesktopModeStatus.canEnterDesktopMode(mContext) Loading Loading @@ -464,6 +495,7 @@ public class RecentTasksController implements TaskStackListenerCallback, } } return null; return null; } } public void dump(@NonNull PrintWriter pw, String prefix) { public void dump(@NonNull PrintWriter pw, String prefix) { final String innerPrefix = prefix + " "; final String innerPrefix = prefix + " "; pw.println(prefix + TAG); pw.println(prefix + TAG); Loading Loading @@ -547,6 +579,11 @@ public class RecentTasksController implements TaskStackListenerCallback, public void onRunningTaskChanged(ActivityManager.RunningTaskInfo taskInfo) { public void onRunningTaskChanged(ActivityManager.RunningTaskInfo taskInfo) { mListener.call(l -> l.onRunningTaskChanged(taskInfo)); mListener.call(l -> l.onRunningTaskChanged(taskInfo)); } } @Override public void onTaskMovedToFront(ActivityManager.RunningTaskInfo taskInfo) { mListener.call(l -> l.onTaskMovedToFront(taskInfo)); } }; }; public IRecentTasksImpl(RecentTasksController controller) { public IRecentTasksImpl(RecentTasksController controller) { Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +16 −1 Original line number Original line Diff line number Diff line Loading @@ -87,6 +87,7 @@ import com.android.wm.shell.performance.PerfHintController; import com.android.wm.shell.recents.RecentTasks; import com.android.wm.shell.recents.RecentTasks; import com.android.wm.shell.recents.RecentTasksController; import com.android.wm.shell.recents.RecentTasksController; import com.android.wm.shell.recents.RecentsTransitionHandler; import com.android.wm.shell.recents.RecentsTransitionHandler; import com.android.wm.shell.recents.TaskStackTransitionObserver; import com.android.wm.shell.shared.DesktopModeStatus; import com.android.wm.shell.shared.DesktopModeStatus; import com.android.wm.shell.shared.ShellTransitions; import com.android.wm.shell.shared.ShellTransitions; import com.android.wm.shell.shared.annotations.ShellAnimationThread; import com.android.wm.shell.shared.annotations.ShellAnimationThread; Loading Loading @@ -619,12 +620,13 @@ public abstract class WMShellBaseModule { TaskStackListenerImpl taskStackListener, TaskStackListenerImpl taskStackListener, ActivityTaskManager activityTaskManager, ActivityTaskManager activityTaskManager, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, TaskStackTransitionObserver taskStackTransitionObserver, @ShellMainThread ShellExecutor mainExecutor @ShellMainThread ShellExecutor mainExecutor ) { ) { return Optional.ofNullable( return Optional.ofNullable( RecentTasksController.create(context, shellInit, shellController, RecentTasksController.create(context, shellInit, shellController, shellCommandHandler, taskStackListener, activityTaskManager, shellCommandHandler, taskStackListener, activityTaskManager, desktopModeTaskRepository, mainExecutor)); desktopModeTaskRepository, taskStackTransitionObserver, mainExecutor)); } } @BindsOptionalOf @BindsOptionalOf Loading Loading @@ -923,6 +925,19 @@ public abstract class WMShellBaseModule { }); }); } } // // Task Stack // @WMSingleton @Provides static TaskStackTransitionObserver provideTaskStackTransitionObserver( Lazy<Transitions> transitions, ShellInit shellInit ) { return new TaskStackTransitionObserver(transitions, shellInit); } // // // Misc // Misc // // Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -664,7 +664,8 @@ public abstract class WMShellModule { @Provides @Provides static Object provideIndependentShellComponentsToCreate( static Object provideIndependentShellComponentsToCreate( DragAndDropController dragAndDropController, DragAndDropController dragAndDropController, Optional<DesktopTasksTransitionObserver> desktopTasksTransitionObserverOptional) { Optional<DesktopTasksTransitionObserver> desktopTasksTransitionObserverOptional ) { return new Object(); return new Object(); } } } }
libs/WindowManager/Shell/src/com/android/wm/shell/recents/IRecentTasksListener.aidl +4 −1 Original line number Original line Diff line number Diff line Loading @@ -42,4 +42,7 @@ oneway interface IRecentTasksListener { * Called when a running task changes. * Called when a running task changes. */ */ void onRunningTaskChanged(in RunningTaskInfo taskInfo); void onRunningTaskChanged(in RunningTaskInfo taskInfo); /** A task has moved to front. */ oneway void onTaskMovedToFront(in RunningTaskInfo taskInfo); } } No newline at end of file
libs/WindowManager/Shell/src/com/android/wm/shell/recents/OWNERS 0 → 100644 +6 −0 Original line number Original line Diff line number Diff line # WM shell sub-module task stack owners uysalorhan@google.com samcackett@google.com alexchau@google.com silvajordan@google.com uwaisashraf@google.com No newline at end of file
libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java +39 −2 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.app.ActivityTaskManager.INVALID_TASK_ID; import static android.content.pm.PackageManager.FEATURE_PC; import static android.content.pm.PackageManager.FEATURE_PC; import static com.android.window.flags.Flags.enableDesktopWindowingTaskbarRunningApps; import static com.android.window.flags.Flags.enableDesktopWindowingTaskbarRunningApps; import static com.android.window.flags.Flags.enableTaskStackObserverInShell; import static com.android.wm.shell.sysui.ShellSharedConstants.KEY_EXTRA_SHELL_RECENT_TASKS; import static com.android.wm.shell.sysui.ShellSharedConstants.KEY_EXTRA_SHELL_RECENT_TASKS; import android.app.ActivityManager; import android.app.ActivityManager; Loading Loading @@ -57,6 +58,7 @@ import com.android.wm.shell.shared.annotations.ShellMainThread; import com.android.wm.shell.sysui.ShellCommandHandler; import com.android.wm.shell.sysui.ShellCommandHandler; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.sysui.ShellController; import com.android.wm.shell.sysui.ShellInit; import com.android.wm.shell.sysui.ShellInit; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.util.GroupedRecentTaskInfo; import com.android.wm.shell.util.GroupedRecentTaskInfo; import com.android.wm.shell.util.SplitBounds; import com.android.wm.shell.util.SplitBounds; Loading @@ -73,7 +75,8 @@ import java.util.function.Consumer; * Manages the recent task list from the system, caching it as necessary. * Manages the recent task list from the system, caching it as necessary. */ */ public class RecentTasksController implements TaskStackListenerCallback, public class RecentTasksController implements TaskStackListenerCallback, RemoteCallable<RecentTasksController>, DesktopModeTaskRepository.ActiveTasksListener { RemoteCallable<RecentTasksController>, DesktopModeTaskRepository.ActiveTasksListener, TaskStackTransitionObserver.TaskStackTransitionObserverListener { private static final String TAG = RecentTasksController.class.getSimpleName(); private static final String TAG = RecentTasksController.class.getSimpleName(); private final Context mContext; private final Context mContext; Loading @@ -84,6 +87,7 @@ public class RecentTasksController implements TaskStackListenerCallback, private final TaskStackListenerImpl mTaskStackListener; private final TaskStackListenerImpl mTaskStackListener; private final RecentTasksImpl mImpl = new RecentTasksImpl(); private final RecentTasksImpl mImpl = new RecentTasksImpl(); private final ActivityTaskManager mActivityTaskManager; private final ActivityTaskManager mActivityTaskManager; private final TaskStackTransitionObserver mTaskStackTransitionObserver; private RecentsTransitionHandler mTransitionHandler = null; private RecentsTransitionHandler mTransitionHandler = null; private IRecentTasksListener mListener; private IRecentTasksListener mListener; private final boolean mPcFeatureEnabled; private final boolean mPcFeatureEnabled; Loading Loading @@ -112,13 +116,15 @@ public class RecentTasksController implements TaskStackListenerCallback, TaskStackListenerImpl taskStackListener, TaskStackListenerImpl taskStackListener, ActivityTaskManager activityTaskManager, ActivityTaskManager activityTaskManager, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, TaskStackTransitionObserver taskStackTransitionObserver, @ShellMainThread ShellExecutor mainExecutor @ShellMainThread ShellExecutor mainExecutor ) { ) { if (!context.getResources().getBoolean(com.android.internal.R.bool.config_hasRecents)) { if (!context.getResources().getBoolean(com.android.internal.R.bool.config_hasRecents)) { return null; return null; } } return new RecentTasksController(context, shellInit, shellController, shellCommandHandler, return new RecentTasksController(context, shellInit, shellController, shellCommandHandler, taskStackListener, activityTaskManager, desktopModeTaskRepository, mainExecutor); taskStackListener, activityTaskManager, desktopModeTaskRepository, taskStackTransitionObserver, mainExecutor); } } RecentTasksController(Context context, RecentTasksController(Context context, Loading @@ -128,6 +134,7 @@ public class RecentTasksController implements TaskStackListenerCallback, TaskStackListenerImpl taskStackListener, TaskStackListenerImpl taskStackListener, ActivityTaskManager activityTaskManager, ActivityTaskManager activityTaskManager, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, Optional<DesktopModeTaskRepository> desktopModeTaskRepository, TaskStackTransitionObserver taskStackTransitionObserver, ShellExecutor mainExecutor) { ShellExecutor mainExecutor) { mContext = context; mContext = context; mShellController = shellController; mShellController = shellController; Loading @@ -136,6 +143,7 @@ public class RecentTasksController implements TaskStackListenerCallback, mPcFeatureEnabled = mContext.getPackageManager().hasSystemFeature(FEATURE_PC); mPcFeatureEnabled = mContext.getPackageManager().hasSystemFeature(FEATURE_PC); mTaskStackListener = taskStackListener; mTaskStackListener = taskStackListener; mDesktopModeTaskRepository = desktopModeTaskRepository; mDesktopModeTaskRepository = desktopModeTaskRepository; mTaskStackTransitionObserver = taskStackTransitionObserver; mMainExecutor = mainExecutor; mMainExecutor = mainExecutor; shellInit.addInitCallback(this::onInit, this); shellInit.addInitCallback(this::onInit, this); } } Loading @@ -154,6 +162,10 @@ public class RecentTasksController implements TaskStackListenerCallback, mShellCommandHandler.addDumpCallback(this::dump, this); mShellCommandHandler.addDumpCallback(this::dump, this); mTaskStackListener.addListener(this); mTaskStackListener.addListener(this); mDesktopModeTaskRepository.ifPresent(it -> it.addActiveTaskListener(this)); mDesktopModeTaskRepository.ifPresent(it -> it.addActiveTaskListener(this)); if (Transitions.ENABLE_SHELL_TRANSITIONS) { mTaskStackTransitionObserver.addTaskStackTransitionObserverListener(this, mMainExecutor); } } } void setTransitionHandler(RecentsTransitionHandler handler) { void setTransitionHandler(RecentsTransitionHandler handler) { Loading Loading @@ -267,6 +279,12 @@ public class RecentTasksController implements TaskStackListenerCallback, notifyRecentTasksChanged(); notifyRecentTasksChanged(); } } @Override public void onTaskMovedToFrontThroughTransition( ActivityManager.RunningTaskInfo runningTaskInfo) { notifyTaskMovedToFront(runningTaskInfo); } @VisibleForTesting @VisibleForTesting void notifyRecentTasksChanged() { void notifyRecentTasksChanged() { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENT_TASKS, "Notify recent tasks changed"); ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENT_TASKS, "Notify recent tasks changed"); Loading Loading @@ -328,6 +346,19 @@ public class RecentTasksController implements TaskStackListenerCallback, } } } } private void notifyTaskMovedToFront(ActivityManager.RunningTaskInfo taskInfo) { if (mListener == null || !enableTaskStackObserverInShell() || taskInfo.realActivity == null) { return; } try { mListener.onTaskMovedToFront(taskInfo); } catch (RemoteException e) { Slog.w(TAG, "Failed call onTaskMovedToFront", e); } } private boolean shouldEnableRunningTasksForDesktopMode() { private boolean shouldEnableRunningTasksForDesktopMode() { return mPcFeatureEnabled return mPcFeatureEnabled || (DesktopModeStatus.canEnterDesktopMode(mContext) || (DesktopModeStatus.canEnterDesktopMode(mContext) Loading Loading @@ -464,6 +495,7 @@ public class RecentTasksController implements TaskStackListenerCallback, } } return null; return null; } } public void dump(@NonNull PrintWriter pw, String prefix) { public void dump(@NonNull PrintWriter pw, String prefix) { final String innerPrefix = prefix + " "; final String innerPrefix = prefix + " "; pw.println(prefix + TAG); pw.println(prefix + TAG); Loading Loading @@ -547,6 +579,11 @@ public class RecentTasksController implements TaskStackListenerCallback, public void onRunningTaskChanged(ActivityManager.RunningTaskInfo taskInfo) { public void onRunningTaskChanged(ActivityManager.RunningTaskInfo taskInfo) { mListener.call(l -> l.onRunningTaskChanged(taskInfo)); mListener.call(l -> l.onRunningTaskChanged(taskInfo)); } } @Override public void onTaskMovedToFront(ActivityManager.RunningTaskInfo taskInfo) { mListener.call(l -> l.onTaskMovedToFront(taskInfo)); } }; }; public IRecentTasksImpl(RecentTasksController controller) { public IRecentTasksImpl(RecentTasksController controller) { Loading