Loading libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java +11 −8 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ import android.os.Bundle; import android.os.RemoteException; import android.util.Slog; import android.util.SparseIntArray; import android.window.DesktopExperienceFlags; import android.window.DesktopModeFlags; import android.window.WindowContainerToken; import android.window.WindowContainerTransaction; Loading Loading @@ -580,10 +579,10 @@ public class RecentTasksController implements TaskStackListenerCallback, * displays, without adding any desk tasks. This is a preparation step so that tasks can be * added to these desks in `generateList()`. * * This is needed since with the `ENABLE_MULTIPLE_DESKTOPS_BACKEND` flag, we want to include * desk even if they're empty (i.e. have no tasks). * This is needed since with the multiple-desktops flags, we want to include desk even if * they're empty (i.e. have no tasks). * * @param multipleDesktopsEnabled whether the multiple desktops backend feature is enabled. * @param multipleDesktopsEnabled whether the multiple desktops feature is enabled. */ private void initializeDesksMap(boolean multipleDesktopsEnabled) { mTmpDesks.clear(); Loading @@ -610,8 +609,13 @@ public class RecentTasksController implements TaskStackListenerCallback, private Desk getOrCreateDesk(int deskId) { var desk = mTmpDesks.get(deskId); if (desk == null) { desk = new Desk(deskId, mDesktopUserRepositories.get().getCurrent().getDisplayForDesk(deskId)); final int displayId; if (deskId == INVALID_DESK_ID) { displayId = INVALID_DISPLAY; } else { displayId = mDesktopUserRepositories.get().getCurrent().getDisplayForDesk(deskId); } desk = new Desk(deskId, displayId); mTmpDesks.put(deskId, desk); } return desk; Loading Loading @@ -644,8 +648,7 @@ public class RecentTasksController implements TaskStackListenerCallback, ProtoLog.v(WM_SHELL_TASK_OBSERVER, "RecentTasksController.generateList(%s)", reason); } final boolean multipleDesktopsEnabled = DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue(); final boolean multipleDesktopsEnabled = mDesktopState.enableMultipleDesktops(); initializeDesksMap(multipleDesktopsEnabled); // When the multiple desktops feature is enabled, we include all desks even if they're Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java +11 −8 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ import android.os.Bundle; import android.os.RemoteException; import android.util.Slog; import android.util.SparseIntArray; import android.window.DesktopExperienceFlags; import android.window.DesktopModeFlags; import android.window.WindowContainerToken; import android.window.WindowContainerTransaction; Loading Loading @@ -580,10 +579,10 @@ public class RecentTasksController implements TaskStackListenerCallback, * displays, without adding any desk tasks. This is a preparation step so that tasks can be * added to these desks in `generateList()`. * * This is needed since with the `ENABLE_MULTIPLE_DESKTOPS_BACKEND` flag, we want to include * desk even if they're empty (i.e. have no tasks). * This is needed since with the multiple-desktops flags, we want to include desk even if * they're empty (i.e. have no tasks). * * @param multipleDesktopsEnabled whether the multiple desktops backend feature is enabled. * @param multipleDesktopsEnabled whether the multiple desktops feature is enabled. */ private void initializeDesksMap(boolean multipleDesktopsEnabled) { mTmpDesks.clear(); Loading @@ -610,8 +609,13 @@ public class RecentTasksController implements TaskStackListenerCallback, private Desk getOrCreateDesk(int deskId) { var desk = mTmpDesks.get(deskId); if (desk == null) { desk = new Desk(deskId, mDesktopUserRepositories.get().getCurrent().getDisplayForDesk(deskId)); final int displayId; if (deskId == INVALID_DESK_ID) { displayId = INVALID_DISPLAY; } else { displayId = mDesktopUserRepositories.get().getCurrent().getDisplayForDesk(deskId); } desk = new Desk(deskId, displayId); mTmpDesks.put(deskId, desk); } return desk; Loading Loading @@ -644,8 +648,7 @@ public class RecentTasksController implements TaskStackListenerCallback, ProtoLog.v(WM_SHELL_TASK_OBSERVER, "RecentTasksController.generateList(%s)", reason); } final boolean multipleDesktopsEnabled = DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue(); final boolean multipleDesktopsEnabled = mDesktopState.enableMultipleDesktops(); initializeDesksMap(multipleDesktopsEnabled); // When the multiple desktops feature is enabled, we include all desks even if they're Loading