Loading services/core/java/com/android/server/wm/ActivityStack.java +0 −10 Original line number Diff line number Diff line Loading @@ -1010,16 +1010,6 @@ class ActivityStack extends Task { } } boolean isTopActivityFocusable() { final ActivityRecord r = topRunningActivity(); return r != null ? r.isFocusable() : (isFocusable() && getWindowConfiguration().canReceiveKeys()); } boolean isFocusableAndVisible() { return isTopActivityFocusable() && shouldBeVisible(null /* starting */); } // TODO: Should each user have there own stacks? @Override void switchUser(int userId) { Loading services/core/java/com/android/server/wm/Task.java +17 −0 Original line number Diff line number Diff line Loading @@ -3334,6 +3334,16 @@ class Task extends WindowContainer<WindowContainer> { }); } boolean isTopActivityFocusable() { final ActivityRecord r = topRunningActivity(); return r != null ? r.isFocusable() : (isFocusable() && getWindowConfiguration().canReceiveKeys()); } boolean isFocusableAndVisible() { return isTopActivityFocusable() && shouldBeVisible(null /* starting */); } void positionChildAtTop(ActivityRecord child) { positionChildAt(child, POSITION_TOP); } Loading Loading @@ -4552,7 +4562,14 @@ class Task extends WindowContainer<WindowContainer> { if (mForceHiddenFlags == newFlags) { return false; } final boolean wasHidden = isForceHidden(); mForceHiddenFlags = newFlags; if (wasHidden && isFocusableAndVisible()) { // The change in force-hidden state will change visibility without triggering a stack // order change, so we should reset the preferred top focusable stack to ensure it's not // used if a new activity is started from this task. getDisplayArea().resetPreferredTopFocusableStackIfBelow(this); } return true; } Loading services/core/java/com/android/server/wm/TaskDisplayArea.java +7 −0 Original line number Diff line number Diff line Loading @@ -680,6 +680,13 @@ final class TaskDisplayArea extends DisplayArea<ActivityStack> { onStackOrderChanged(stack); } void resetPreferredTopFocusableStackIfBelow(Task task) { if (mPreferredTopFocusableStack != null && mPreferredTopFocusableStack.compareTo(task) < 0) { mPreferredTopFocusableStack = null; } } void positionStackAt(int position, ActivityStack child, boolean includingParents) { positionChildAt(position, child, includingParents); mDisplayContent.layoutAndAssignWindowLayersIfNeeded(); Loading Loading
services/core/java/com/android/server/wm/ActivityStack.java +0 −10 Original line number Diff line number Diff line Loading @@ -1010,16 +1010,6 @@ class ActivityStack extends Task { } } boolean isTopActivityFocusable() { final ActivityRecord r = topRunningActivity(); return r != null ? r.isFocusable() : (isFocusable() && getWindowConfiguration().canReceiveKeys()); } boolean isFocusableAndVisible() { return isTopActivityFocusable() && shouldBeVisible(null /* starting */); } // TODO: Should each user have there own stacks? @Override void switchUser(int userId) { Loading
services/core/java/com/android/server/wm/Task.java +17 −0 Original line number Diff line number Diff line Loading @@ -3334,6 +3334,16 @@ class Task extends WindowContainer<WindowContainer> { }); } boolean isTopActivityFocusable() { final ActivityRecord r = topRunningActivity(); return r != null ? r.isFocusable() : (isFocusable() && getWindowConfiguration().canReceiveKeys()); } boolean isFocusableAndVisible() { return isTopActivityFocusable() && shouldBeVisible(null /* starting */); } void positionChildAtTop(ActivityRecord child) { positionChildAt(child, POSITION_TOP); } Loading Loading @@ -4552,7 +4562,14 @@ class Task extends WindowContainer<WindowContainer> { if (mForceHiddenFlags == newFlags) { return false; } final boolean wasHidden = isForceHidden(); mForceHiddenFlags = newFlags; if (wasHidden && isFocusableAndVisible()) { // The change in force-hidden state will change visibility without triggering a stack // order change, so we should reset the preferred top focusable stack to ensure it's not // used if a new activity is started from this task. getDisplayArea().resetPreferredTopFocusableStackIfBelow(this); } return true; } Loading
services/core/java/com/android/server/wm/TaskDisplayArea.java +7 −0 Original line number Diff line number Diff line Loading @@ -680,6 +680,13 @@ final class TaskDisplayArea extends DisplayArea<ActivityStack> { onStackOrderChanged(stack); } void resetPreferredTopFocusableStackIfBelow(Task task) { if (mPreferredTopFocusableStack != null && mPreferredTopFocusableStack.compareTo(task) < 0) { mPreferredTopFocusableStack = null; } } void positionStackAt(int position, ActivityStack child, boolean includingParents) { positionChildAt(position, child, includingParents); mDisplayContent.layoutAndAssignWindowLayersIfNeeded(); Loading