Loading services/core/java/com/android/server/am/ActivityStack.java +23 −15 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.am; import static android.app.ActivityManager.FREEFORM_WORKSPACE_STACK_ID; import static android.app.ActivityManager.FULLSCREEN_WORKSPACE_STACK_ID; import static android.app.ActivityManager.HOME_STACK_ID; import static android.content.pm.ActivityInfo.FLAG_SHOW_FOR_ALL_USERS; Loading Loading @@ -2671,6 +2672,12 @@ final class ActivityStack { ActivityRecord next = topRunningActivityLocked(null); final String myReason = reason + " adjustFocus"; if (next != r) { if (next != null && mStackId == FREEFORM_WORKSPACE_STACK_ID) { // For freeform stack we always keep the focus within the stack as long as // there is a running activity in the stack that we can adjust focus to. mService.setFocusedActivityLocked(next, myReason); return; } else { final TaskRecord task = r.task; if (r.frontOfTask && task == topTask() && task.isOverHomeStack()) { // For non-fullscreen stack, we want to move the focus to the next visible Loading @@ -2689,6 +2696,7 @@ final class ActivityStack { } } } } final ActivityRecord top = mStackSupervisor.topRunningActivityLocked(); if (top != null) { Loading Loading
services/core/java/com/android/server/am/ActivityStack.java +23 −15 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.am; import static android.app.ActivityManager.FREEFORM_WORKSPACE_STACK_ID; import static android.app.ActivityManager.FULLSCREEN_WORKSPACE_STACK_ID; import static android.app.ActivityManager.HOME_STACK_ID; import static android.content.pm.ActivityInfo.FLAG_SHOW_FOR_ALL_USERS; Loading Loading @@ -2671,6 +2672,12 @@ final class ActivityStack { ActivityRecord next = topRunningActivityLocked(null); final String myReason = reason + " adjustFocus"; if (next != r) { if (next != null && mStackId == FREEFORM_WORKSPACE_STACK_ID) { // For freeform stack we always keep the focus within the stack as long as // there is a running activity in the stack that we can adjust focus to. mService.setFocusedActivityLocked(next, myReason); return; } else { final TaskRecord task = r.task; if (r.frontOfTask && task == topTask() && task.isOverHomeStack()) { // For non-fullscreen stack, we want to move the focus to the next visible Loading @@ -2689,6 +2696,7 @@ final class ActivityStack { } } } } final ActivityRecord top = mStackSupervisor.topRunningActivityLocked(); if (top != null) { Loading