Loading libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java +29 −3 Original line number Diff line number Diff line Loading @@ -90,7 +90,8 @@ import java.util.stream.Collectors; */ public class RecentTasksController implements TaskStackListenerCallback, RemoteCallable<RecentTasksController>, DesktopRepository.ActiveTasksListener, TaskStackTransitionObserver.TaskStackTransitionObserverListener, UserChangeListener { TaskStackTransitionObserver.TaskStackTransitionObserverListener, UserChangeListener, DesktopRepository.DeskChangeListener { private static final String TAG = RecentTasksController.class.getSimpleName(); // When the multiple desktops feature is disabled, all freeform tasks are lumped together into Loading Loading @@ -202,8 +203,13 @@ public class RecentTasksController implements TaskStackListenerCallback, mShellCommandHandler.addCommandCallback("recents", mRecentsShellCommandHandler, this); mUserId = ActivityManager.getCurrentUser(); mDesktopUserRepositories.ifPresent( desktopUserRepositories -> desktopUserRepositories.getCurrent().addActiveTaskListener(this)); desktopUserRepositories -> { desktopUserRepositories.getCurrent().addActiveTaskListener(this); if (mDesktopState.enableMultipleDesktops()) { desktopUserRepositories.getCurrent().addDeskChangeListener(this, mMainExecutor); } }); mTaskStackListener.addListener(this); mTaskStackTransitionObserver.addTaskStackTransitionObserverListener(this, mMainExecutor); Loading Loading @@ -980,6 +986,26 @@ public class RecentTasksController implements TaskStackListenerCallback, currentUserRepository.addActiveTaskListener(this); } @Override public void onDeskAdded(int displayId, int deskId) { notifyRecentTasksChanged(); } @Override public void onDeskRemoved(int displayId, int deskId) { notifyRecentTasksChanged(); } @Override public void onActiveDeskChanged(int displayId, int newActiveDeskId, int oldActiveDeskId) { // No-op for now, as only desk additions/removals affect the recent tasks list directly. } @Override public void onCanCreateDesksChanged(boolean canCreateDesks) { // No-op for now. } /** * The interface for calls from outside the host process. */ Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java +29 −3 Original line number Diff line number Diff line Loading @@ -90,7 +90,8 @@ import java.util.stream.Collectors; */ public class RecentTasksController implements TaskStackListenerCallback, RemoteCallable<RecentTasksController>, DesktopRepository.ActiveTasksListener, TaskStackTransitionObserver.TaskStackTransitionObserverListener, UserChangeListener { TaskStackTransitionObserver.TaskStackTransitionObserverListener, UserChangeListener, DesktopRepository.DeskChangeListener { private static final String TAG = RecentTasksController.class.getSimpleName(); // When the multiple desktops feature is disabled, all freeform tasks are lumped together into Loading Loading @@ -202,8 +203,13 @@ public class RecentTasksController implements TaskStackListenerCallback, mShellCommandHandler.addCommandCallback("recents", mRecentsShellCommandHandler, this); mUserId = ActivityManager.getCurrentUser(); mDesktopUserRepositories.ifPresent( desktopUserRepositories -> desktopUserRepositories.getCurrent().addActiveTaskListener(this)); desktopUserRepositories -> { desktopUserRepositories.getCurrent().addActiveTaskListener(this); if (mDesktopState.enableMultipleDesktops()) { desktopUserRepositories.getCurrent().addDeskChangeListener(this, mMainExecutor); } }); mTaskStackListener.addListener(this); mTaskStackTransitionObserver.addTaskStackTransitionObserverListener(this, mMainExecutor); Loading Loading @@ -980,6 +986,26 @@ public class RecentTasksController implements TaskStackListenerCallback, currentUserRepository.addActiveTaskListener(this); } @Override public void onDeskAdded(int displayId, int deskId) { notifyRecentTasksChanged(); } @Override public void onDeskRemoved(int displayId, int deskId) { notifyRecentTasksChanged(); } @Override public void onActiveDeskChanged(int displayId, int newActiveDeskId, int oldActiveDeskId) { // No-op for now, as only desk additions/removals affect the recent tasks list directly. } @Override public void onCanCreateDesksChanged(boolean canCreateDesks) { // No-op for now. } /** * The interface for calls from outside the host process. */ Loading