Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -4735,7 +4735,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (down) { if (down) { // There may have other embedded activities on the same Task. Try to move the // There may have other embedded activities on the same Task. Try to move the // focus before processing the back event. // focus before processing the back event. mWindowManagerInternal.moveFocusToTopEmbeddedWindowIfNeeded(); mWindowManagerInternal.moveFocusToAdjacentEmbeddedActivityIfNeeded(); mBackKeyHandled = false; mBackKeyHandled = false; } else { } else { if (!hasLongPressOnBackBehavior()) { if (!hasLongPressOnBackBehavior()) { Loading services/core/java/com/android/server/wm/ActivityRecord.java +14 −0 Original line number Original line Diff line number Diff line Loading @@ -11011,6 +11011,20 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A return new Point(windowLayout.minWidth, windowLayout.minHeight); return new Point(windowLayout.minWidth, windowLayout.minHeight); } } /** * Returns the {@link #createTime} if the top window is the `base` window. Note that do not * use the window creation time because the window could be re-created when the activity * relaunched if configuration changed. * <p> * Otherwise, return the creation time of the top window. */ long getLastWindowCreateTime() { final WindowState window = getWindow(win -> true); return window != null && window.mAttrs.type != TYPE_BASE_APPLICATION ? window.getCreateTime() : createTime; } /** /** * Adjust the source rect hint in {@link #pictureInPictureArgs} by window bounds since * Adjust the source rect hint in {@link #pictureInPictureArgs} by window bounds since * it is relative to its root view (see also b/235599028). * it is relative to its root view (see also b/235599028). Loading services/core/java/com/android/server/wm/BackNavigationController.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -165,7 +165,7 @@ class BackNavigationController { } } // Move focus to the top embedded window if possible // Move focus to the top embedded window if possible if (mWindowManagerService.moveFocusToTopEmbeddedWindow(window)) { if (mWindowManagerService.moveFocusToAdjacentEmbeddedWindow(window)) { window = wmService.getFocusedWindowLocked(); window = wmService.getFocusedWindowLocked(); if (window == null) { if (window == null) { Slog.e(TAG, "New focused window is null, returning null."); Slog.e(TAG, "New focused window is null, returning null."); Loading services/core/java/com/android/server/wm/Task.java +0 −2 Original line number Original line Diff line number Diff line Loading @@ -3753,11 +3753,9 @@ class Task extends TaskFragment { // Boost the adjacent TaskFragment for dimmer if needed. // Boost the adjacent TaskFragment for dimmer if needed. final TaskFragment taskFragment = wc.asTaskFragment(); final TaskFragment taskFragment = wc.asTaskFragment(); if (taskFragment != null && taskFragment.isEmbedded()) { if (taskFragment != null && taskFragment.isEmbedded()) { taskFragment.mDimmerSurfaceBoosted = false; final TaskFragment adjacentTf = taskFragment.getAdjacentTaskFragment(); final TaskFragment adjacentTf = taskFragment.getAdjacentTaskFragment(); if (adjacentTf != null && adjacentTf.shouldBoostDimmer()) { if (adjacentTf != null && adjacentTf.shouldBoostDimmer()) { adjacentTf.assignLayer(t, layer++); adjacentTf.assignLayer(t, layer++); adjacentTf.mDimmerSurfaceBoosted = true; } } } } Loading services/core/java/com/android/server/wm/TaskFragment.java +0 −3 Original line number Original line Diff line number Diff line Loading @@ -216,9 +216,6 @@ class TaskFragment extends WindowContainer<WindowContainer> { Dimmer mDimmer = Dimmer.DIMMER_REFACTOR Dimmer mDimmer = Dimmer.DIMMER_REFACTOR ? new SmoothDimmer(this) : new LegacyDimmer(this); ? new SmoothDimmer(this) : new LegacyDimmer(this); /** {@code true} if the dimmer surface is boosted. {@code false} otherwise. */ boolean mDimmerSurfaceBoosted; /** Apply the dim layer on the embedded TaskFragment. */ /** Apply the dim layer on the embedded TaskFragment. */ static final int EMBEDDED_DIM_AREA_TASK_FRAGMENT = 0; static final int EMBEDDED_DIM_AREA_TASK_FRAGMENT = 0; Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -4735,7 +4735,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (down) { if (down) { // There may have other embedded activities on the same Task. Try to move the // There may have other embedded activities on the same Task. Try to move the // focus before processing the back event. // focus before processing the back event. mWindowManagerInternal.moveFocusToTopEmbeddedWindowIfNeeded(); mWindowManagerInternal.moveFocusToAdjacentEmbeddedActivityIfNeeded(); mBackKeyHandled = false; mBackKeyHandled = false; } else { } else { if (!hasLongPressOnBackBehavior()) { if (!hasLongPressOnBackBehavior()) { Loading
services/core/java/com/android/server/wm/ActivityRecord.java +14 −0 Original line number Original line Diff line number Diff line Loading @@ -11011,6 +11011,20 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A return new Point(windowLayout.minWidth, windowLayout.minHeight); return new Point(windowLayout.minWidth, windowLayout.minHeight); } } /** * Returns the {@link #createTime} if the top window is the `base` window. Note that do not * use the window creation time because the window could be re-created when the activity * relaunched if configuration changed. * <p> * Otherwise, return the creation time of the top window. */ long getLastWindowCreateTime() { final WindowState window = getWindow(win -> true); return window != null && window.mAttrs.type != TYPE_BASE_APPLICATION ? window.getCreateTime() : createTime; } /** /** * Adjust the source rect hint in {@link #pictureInPictureArgs} by window bounds since * Adjust the source rect hint in {@link #pictureInPictureArgs} by window bounds since * it is relative to its root view (see also b/235599028). * it is relative to its root view (see also b/235599028). Loading
services/core/java/com/android/server/wm/BackNavigationController.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -165,7 +165,7 @@ class BackNavigationController { } } // Move focus to the top embedded window if possible // Move focus to the top embedded window if possible if (mWindowManagerService.moveFocusToTopEmbeddedWindow(window)) { if (mWindowManagerService.moveFocusToAdjacentEmbeddedWindow(window)) { window = wmService.getFocusedWindowLocked(); window = wmService.getFocusedWindowLocked(); if (window == null) { if (window == null) { Slog.e(TAG, "New focused window is null, returning null."); Slog.e(TAG, "New focused window is null, returning null."); Loading
services/core/java/com/android/server/wm/Task.java +0 −2 Original line number Original line Diff line number Diff line Loading @@ -3753,11 +3753,9 @@ class Task extends TaskFragment { // Boost the adjacent TaskFragment for dimmer if needed. // Boost the adjacent TaskFragment for dimmer if needed. final TaskFragment taskFragment = wc.asTaskFragment(); final TaskFragment taskFragment = wc.asTaskFragment(); if (taskFragment != null && taskFragment.isEmbedded()) { if (taskFragment != null && taskFragment.isEmbedded()) { taskFragment.mDimmerSurfaceBoosted = false; final TaskFragment adjacentTf = taskFragment.getAdjacentTaskFragment(); final TaskFragment adjacentTf = taskFragment.getAdjacentTaskFragment(); if (adjacentTf != null && adjacentTf.shouldBoostDimmer()) { if (adjacentTf != null && adjacentTf.shouldBoostDimmer()) { adjacentTf.assignLayer(t, layer++); adjacentTf.assignLayer(t, layer++); adjacentTf.mDimmerSurfaceBoosted = true; } } } } Loading
services/core/java/com/android/server/wm/TaskFragment.java +0 −3 Original line number Original line Diff line number Diff line Loading @@ -216,9 +216,6 @@ class TaskFragment extends WindowContainer<WindowContainer> { Dimmer mDimmer = Dimmer.DIMMER_REFACTOR Dimmer mDimmer = Dimmer.DIMMER_REFACTOR ? new SmoothDimmer(this) : new LegacyDimmer(this); ? new SmoothDimmer(this) : new LegacyDimmer(this); /** {@code true} if the dimmer surface is boosted. {@code false} otherwise. */ boolean mDimmerSurfaceBoosted; /** Apply the dim layer on the embedded TaskFragment. */ /** Apply the dim layer on the embedded TaskFragment. */ static final int EMBEDDED_DIM_AREA_TASK_FRAGMENT = 0; static final int EMBEDDED_DIM_AREA_TASK_FRAGMENT = 0; Loading