Loading packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +10 −4 Original line number Diff line number Diff line Loading @@ -378,13 +378,19 @@ public class SystemServicesProxy { ActivityManager.StackInfo stackInfo = null; try { stackInfo = mIam.getStackInfo(DOCKED_STACK_ID); if (stackInfo != null && stackInfo.userId != getCurrentUser()) { return false; } } catch (RemoteException e) { e.printStackTrace(); } return stackInfo != null; if (stackInfo != null) { int userId = getCurrentUser(); boolean hasUserTask = false; for (int i = stackInfo.taskUserIds.length - 1; i >= 0 && !hasUserTask; i--) { hasUserTask = (stackInfo.taskUserIds[i] == userId); } return hasUserTask; } return false; } /** Loading services/core/java/com/android/server/wm/WindowManagerService.java +22 −0 Original line number Diff line number Diff line Loading @@ -5349,7 +5349,29 @@ public class WindowManagerService extends IWindowManager.Stub rebuildAppWindowListLocked(displayContent); } mWindowPlacerLocked.performSurfacePlacement(); // Notify whether the docked stack exists for the current user getDefaultDisplayContentLocked().mDividerControllerLocked .notifyDockedStackExistsChanged(hasDockedTasksForUser(newUserId)); } } /** * Returns whether there is a docked task for the current user. */ boolean hasDockedTasksForUser(int userId) { final TaskStack stack = mStackIdToStack.get(DOCKED_STACK_ID); if (stack == null) { return false; } final ArrayList<Task> tasks = stack.getTasks(); boolean hasUserTask = false; for (int i = tasks.size() - 1; i >= 0 && !hasUserTask; i--) { final Task task = tasks.get(i); hasUserTask = (task.mUserId == userId); } return hasUserTask; } /* Called by WindowState */ Loading Loading
packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +10 −4 Original line number Diff line number Diff line Loading @@ -378,13 +378,19 @@ public class SystemServicesProxy { ActivityManager.StackInfo stackInfo = null; try { stackInfo = mIam.getStackInfo(DOCKED_STACK_ID); if (stackInfo != null && stackInfo.userId != getCurrentUser()) { return false; } } catch (RemoteException e) { e.printStackTrace(); } return stackInfo != null; if (stackInfo != null) { int userId = getCurrentUser(); boolean hasUserTask = false; for (int i = stackInfo.taskUserIds.length - 1; i >= 0 && !hasUserTask; i--) { hasUserTask = (stackInfo.taskUserIds[i] == userId); } return hasUserTask; } return false; } /** Loading
services/core/java/com/android/server/wm/WindowManagerService.java +22 −0 Original line number Diff line number Diff line Loading @@ -5349,7 +5349,29 @@ public class WindowManagerService extends IWindowManager.Stub rebuildAppWindowListLocked(displayContent); } mWindowPlacerLocked.performSurfacePlacement(); // Notify whether the docked stack exists for the current user getDefaultDisplayContentLocked().mDividerControllerLocked .notifyDockedStackExistsChanged(hasDockedTasksForUser(newUserId)); } } /** * Returns whether there is a docked task for the current user. */ boolean hasDockedTasksForUser(int userId) { final TaskStack stack = mStackIdToStack.get(DOCKED_STACK_ID); if (stack == null) { return false; } final ArrayList<Task> tasks = stack.getTasks(); boolean hasUserTask = false; for (int i = tasks.size() - 1; i >= 0 && !hasUserTask; i--) { final Task task = tasks.get(i); hasUserTask = (task.mUserId == userId); } return hasUserTask; } /* Called by WindowState */ Loading