Loading services/core/java/com/android/server/wm/RootWindowContainer.java +3 −6 Original line number Diff line number Diff line Loading @@ -1948,7 +1948,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> final IntArray rootTaskIdsToRestore = mUserVisibleRootTasks.get(userId); boolean homeInFront = false; if (Flags.enableTopVisibleRootTaskPerUserTracking()) { if (rootTaskIdsToRestore == null) { if (rootTaskIdsToRestore == null || rootTaskIdsToRestore.size() == 0) { // If there are no root tasks saved, try restore id 0 which should create and launch // the home task. handleRootTaskLaunchOnUserSwitch(/* restoreRootTaskId */INVALID_TASK_ID); Loading @@ -1958,12 +1958,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent> handleRootTaskLaunchOnUserSwitch(rootTaskIdsToRestore.get(i)); } // Check if the top task is type home if (rootTaskIdsToRestore.size() > 0) { final int topRootTaskId = rootTaskIdsToRestore.get( rootTaskIdsToRestore.size() - 1); final int topRootTaskId = rootTaskIdsToRestore.get(rootTaskIdsToRestore.size() - 1); homeInFront = isHomeTask(topRootTaskId); } } } else { handleRootTaskLaunchOnUserSwitch(restoreRootTaskId); // Check if the top task is type home Loading Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +3 −6 Original line number Diff line number Diff line Loading @@ -1948,7 +1948,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> final IntArray rootTaskIdsToRestore = mUserVisibleRootTasks.get(userId); boolean homeInFront = false; if (Flags.enableTopVisibleRootTaskPerUserTracking()) { if (rootTaskIdsToRestore == null) { if (rootTaskIdsToRestore == null || rootTaskIdsToRestore.size() == 0) { // If there are no root tasks saved, try restore id 0 which should create and launch // the home task. handleRootTaskLaunchOnUserSwitch(/* restoreRootTaskId */INVALID_TASK_ID); Loading @@ -1958,12 +1958,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent> handleRootTaskLaunchOnUserSwitch(rootTaskIdsToRestore.get(i)); } // Check if the top task is type home if (rootTaskIdsToRestore.size() > 0) { final int topRootTaskId = rootTaskIdsToRestore.get( rootTaskIdsToRestore.size() - 1); final int topRootTaskId = rootTaskIdsToRestore.get(rootTaskIdsToRestore.size() - 1); homeInFront = isHomeTask(topRootTaskId); } } } else { handleRootTaskLaunchOnUserSwitch(restoreRootTaskId); // Check if the top task is type home Loading