Loading services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +7 −11 Original line number Diff line number Diff line Loading @@ -1451,6 +1451,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { mUserLeaving = true; } mService.deferWindowLayout(); final Transition newTransition = task.mTransitionController.isShellTransitionsEnabled() ? task.mTransitionController.isCollecting() ? null : task.mTransitionController.createTransition(TRANSIT_TO_FRONT) : null; Loading @@ -1458,9 +1459,6 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { reason = reason + " findTaskToMoveToFront"; boolean reparented = false; if (task.isResizeable() && canUseActivityOptionsLaunchBounds(options)) { final Rect bounds = options.getLaunchBounds(); task.setBounds(bounds); Task targetRootTask = mRootWindowContainer.getOrCreateRootTask(null, options, task, ON_TOP); Loading @@ -1473,14 +1471,11 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { // task.reparent() should already placed the task on top, // still need moveTaskToFrontLocked() below for any transition settings. } if (targetRootTask.shouldResizeRootTaskWithLaunchBounds()) { targetRootTask.resize(bounds, !PRESERVE_WINDOWS, !DEFER_RESUME); } else { // WM resizeTask must be done after the task is moved to the correct stack, // The resizeTask must be done after the task is moved to the correct root task, // because Task's setBounds() also updates dim layer's bounds, but that has // dependency on the root task. task.resize(false /* relayout */, false /* forced */); } final Rect bounds = options.getLaunchBounds(); task.setBounds(bounds); } if (!reparented) { Loading Loading @@ -1510,6 +1505,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { } } finally { mUserLeaving = false; mService.continueWindowLayout(); } } Loading services/core/java/com/android/server/wm/DisplayContent.java +0 −1 Original line number Diff line number Diff line Loading @@ -500,7 +500,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // Accessed directly by all users. private boolean mLayoutNeeded; int pendingLayoutChanges; boolean mLayoutAndAssignWindowLayersScheduled; /** * Used to gate application window layout until we have sent the complete configuration. Loading services/core/java/com/android/server/wm/InsetsSourceProvider.java +0 −6 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ import static com.android.server.wm.InsetsSourceProviderProto.SEAMLESS_ROTATING; import static com.android.server.wm.InsetsSourceProviderProto.SERVER_VISIBLE; import static com.android.server.wm.InsetsSourceProviderProto.SOURCE; import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_INSETS_CONTROL; import static com.android.server.wm.WindowManagerService.H.LAYOUT_AND_ASSIGN_WINDOW_LAYERS_IF_NEEDED; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -508,11 +507,6 @@ abstract class InsetsSourceProvider { return; } mClientVisible = clientVisible; if (!mDisplayContent.mLayoutAndAssignWindowLayersScheduled) { mDisplayContent.mLayoutAndAssignWindowLayersScheduled = true; mDisplayContent.mWmService.mH.obtainMessage( LAYOUT_AND_ASSIGN_WINDOW_LAYERS_IF_NEEDED, mDisplayContent).sendToTarget(); } updateVisibility(); } Loading services/core/java/com/android/server/wm/Task.java +1 −48 Original line number Diff line number Diff line Loading @@ -423,9 +423,6 @@ class Task extends TaskFragment { // This number will be assigned when we evaluate OOM scores for all visible tasks. int mLayerRank = LAYER_RANK_INVISIBLE; /** Helper object used for updating override configuration. */ private Configuration mTmpConfig = new Configuration(); /* Unique identifier for this task. */ final int mTaskId; /* User for which this task was created. */ Loading Loading @@ -796,16 +793,11 @@ class Task extends TaskFragment { Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "resizeTask_" + mTaskId); boolean updatedConfig = false; mTmpConfig.setTo(getResolvedOverrideConfiguration()); if (setBounds(bounds) != BOUNDS_CHANGE_NONE) { updatedConfig = !mTmpConfig.equals(getResolvedOverrideConfiguration()); } // This variable holds information whether the configuration didn't change in a // significant way and the activity was kept the way it was. If it's false, it means // the activity had to be relaunched due to configuration change. boolean kept = true; if (updatedConfig) { if (setBounds(bounds, forced) != BOUNDS_CHANGE_NONE) { final ActivityRecord r = topRunningActivityLocked(); if (r != null) { kept = r.ensureActivityConfiguration(0 /* globalChanges */, Loading @@ -822,8 +814,6 @@ class Task extends TaskFragment { } } } resize(kept, forced); saveLaunchingStateIfNeeded(); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); Loading Loading @@ -2693,12 +2683,6 @@ class Task extends TaskFragment { return canSpecifyOrientation() && getDisplayArea().canSpecifyOrientation(orientation); } void resize(boolean relayout, boolean forced) { if (setBounds(getRequestedOverrideBounds(), forced) != BOUNDS_CHANGE_NONE && relayout) { getDisplayContent().layoutAndAssignWindowLayersIfNeeded(); } } @Override void onDisplayChanged(DisplayContent dc) { final boolean isRootTask = isRootTask(); Loading Loading @@ -4750,14 +4734,6 @@ class Task extends TaskFragment { } } /** * Returns true if this root task should be resized to match the bounds specified by * {@link ActivityOptions#setLaunchBounds} when launching an activity into the root task. */ boolean shouldResizeRootTaskWithLaunchBounds() { return inPinnedWindowingMode(); } void checkTranslucentActivityWaiting(ActivityRecord top) { if (mTranslucentActivityWaiting != top) { mUndrawnActivitiesBelowTopTranslucent.clear(); Loading Loading @@ -5582,29 +5558,6 @@ class Task extends TaskFragment { return true; } // TODO: Can only be called from special methods in ActivityTaskSupervisor. // Need to consolidate those calls points into this resize method so anyone can call directly. void resize(Rect displayedBounds, boolean preserveWindows, boolean deferResume) { Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "task.resize_" + getRootTaskId()); mAtmService.deferWindowLayout(); try { // TODO: Why not just set this on the root task directly vs. on each tasks? // Update override configurations of all tasks in the root task. forAllTasks(task -> { if (task.isResizeable()) { task.setBounds(displayedBounds); } }, true /* traverseTopToBottom */); if (!deferResume) { ensureVisibleActivitiesConfiguration(topRunningActivity(), preserveWindows); } } finally { mAtmService.continueWindowLayout(); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } } boolean willActivityBeVisible(IBinder token) { final ActivityRecord r = ActivityRecord.forTokenLocked(token); if (r == null) { Loading services/core/java/com/android/server/wm/WallpaperController.java +1 −3 Original line number Diff line number Diff line Loading @@ -756,9 +756,7 @@ class WallpaperController { private void updateWallpaperTokens(boolean visible) { for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { final WallpaperWindowToken token = mWallpaperTokens.get(curTokenNdx); if (token.updateWallpaperWindows(visible)) { token.mDisplayContent.assignWindowLayers(false /* setLayoutNeeded */); } token.updateWallpaperWindows(visible); } } Loading Loading
services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +7 −11 Original line number Diff line number Diff line Loading @@ -1451,6 +1451,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { mUserLeaving = true; } mService.deferWindowLayout(); final Transition newTransition = task.mTransitionController.isShellTransitionsEnabled() ? task.mTransitionController.isCollecting() ? null : task.mTransitionController.createTransition(TRANSIT_TO_FRONT) : null; Loading @@ -1458,9 +1459,6 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { reason = reason + " findTaskToMoveToFront"; boolean reparented = false; if (task.isResizeable() && canUseActivityOptionsLaunchBounds(options)) { final Rect bounds = options.getLaunchBounds(); task.setBounds(bounds); Task targetRootTask = mRootWindowContainer.getOrCreateRootTask(null, options, task, ON_TOP); Loading @@ -1473,14 +1471,11 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { // task.reparent() should already placed the task on top, // still need moveTaskToFrontLocked() below for any transition settings. } if (targetRootTask.shouldResizeRootTaskWithLaunchBounds()) { targetRootTask.resize(bounds, !PRESERVE_WINDOWS, !DEFER_RESUME); } else { // WM resizeTask must be done after the task is moved to the correct stack, // The resizeTask must be done after the task is moved to the correct root task, // because Task's setBounds() also updates dim layer's bounds, but that has // dependency on the root task. task.resize(false /* relayout */, false /* forced */); } final Rect bounds = options.getLaunchBounds(); task.setBounds(bounds); } if (!reparented) { Loading Loading @@ -1510,6 +1505,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { } } finally { mUserLeaving = false; mService.continueWindowLayout(); } } Loading
services/core/java/com/android/server/wm/DisplayContent.java +0 −1 Original line number Diff line number Diff line Loading @@ -500,7 +500,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // Accessed directly by all users. private boolean mLayoutNeeded; int pendingLayoutChanges; boolean mLayoutAndAssignWindowLayersScheduled; /** * Used to gate application window layout until we have sent the complete configuration. Loading
services/core/java/com/android/server/wm/InsetsSourceProvider.java +0 −6 Original line number Diff line number Diff line Loading @@ -33,7 +33,6 @@ import static com.android.server.wm.InsetsSourceProviderProto.SEAMLESS_ROTATING; import static com.android.server.wm.InsetsSourceProviderProto.SERVER_VISIBLE; import static com.android.server.wm.InsetsSourceProviderProto.SOURCE; import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_INSETS_CONTROL; import static com.android.server.wm.WindowManagerService.H.LAYOUT_AND_ASSIGN_WINDOW_LAYERS_IF_NEEDED; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -508,11 +507,6 @@ abstract class InsetsSourceProvider { return; } mClientVisible = clientVisible; if (!mDisplayContent.mLayoutAndAssignWindowLayersScheduled) { mDisplayContent.mLayoutAndAssignWindowLayersScheduled = true; mDisplayContent.mWmService.mH.obtainMessage( LAYOUT_AND_ASSIGN_WINDOW_LAYERS_IF_NEEDED, mDisplayContent).sendToTarget(); } updateVisibility(); } Loading
services/core/java/com/android/server/wm/Task.java +1 −48 Original line number Diff line number Diff line Loading @@ -423,9 +423,6 @@ class Task extends TaskFragment { // This number will be assigned when we evaluate OOM scores for all visible tasks. int mLayerRank = LAYER_RANK_INVISIBLE; /** Helper object used for updating override configuration. */ private Configuration mTmpConfig = new Configuration(); /* Unique identifier for this task. */ final int mTaskId; /* User for which this task was created. */ Loading Loading @@ -796,16 +793,11 @@ class Task extends TaskFragment { Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "resizeTask_" + mTaskId); boolean updatedConfig = false; mTmpConfig.setTo(getResolvedOverrideConfiguration()); if (setBounds(bounds) != BOUNDS_CHANGE_NONE) { updatedConfig = !mTmpConfig.equals(getResolvedOverrideConfiguration()); } // This variable holds information whether the configuration didn't change in a // significant way and the activity was kept the way it was. If it's false, it means // the activity had to be relaunched due to configuration change. boolean kept = true; if (updatedConfig) { if (setBounds(bounds, forced) != BOUNDS_CHANGE_NONE) { final ActivityRecord r = topRunningActivityLocked(); if (r != null) { kept = r.ensureActivityConfiguration(0 /* globalChanges */, Loading @@ -822,8 +814,6 @@ class Task extends TaskFragment { } } } resize(kept, forced); saveLaunchingStateIfNeeded(); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); Loading Loading @@ -2693,12 +2683,6 @@ class Task extends TaskFragment { return canSpecifyOrientation() && getDisplayArea().canSpecifyOrientation(orientation); } void resize(boolean relayout, boolean forced) { if (setBounds(getRequestedOverrideBounds(), forced) != BOUNDS_CHANGE_NONE && relayout) { getDisplayContent().layoutAndAssignWindowLayersIfNeeded(); } } @Override void onDisplayChanged(DisplayContent dc) { final boolean isRootTask = isRootTask(); Loading Loading @@ -4750,14 +4734,6 @@ class Task extends TaskFragment { } } /** * Returns true if this root task should be resized to match the bounds specified by * {@link ActivityOptions#setLaunchBounds} when launching an activity into the root task. */ boolean shouldResizeRootTaskWithLaunchBounds() { return inPinnedWindowingMode(); } void checkTranslucentActivityWaiting(ActivityRecord top) { if (mTranslucentActivityWaiting != top) { mUndrawnActivitiesBelowTopTranslucent.clear(); Loading Loading @@ -5582,29 +5558,6 @@ class Task extends TaskFragment { return true; } // TODO: Can only be called from special methods in ActivityTaskSupervisor. // Need to consolidate those calls points into this resize method so anyone can call directly. void resize(Rect displayedBounds, boolean preserveWindows, boolean deferResume) { Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "task.resize_" + getRootTaskId()); mAtmService.deferWindowLayout(); try { // TODO: Why not just set this on the root task directly vs. on each tasks? // Update override configurations of all tasks in the root task. forAllTasks(task -> { if (task.isResizeable()) { task.setBounds(displayedBounds); } }, true /* traverseTopToBottom */); if (!deferResume) { ensureVisibleActivitiesConfiguration(topRunningActivity(), preserveWindows); } } finally { mAtmService.continueWindowLayout(); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } } boolean willActivityBeVisible(IBinder token) { final ActivityRecord r = ActivityRecord.forTokenLocked(token); if (r == null) { Loading
services/core/java/com/android/server/wm/WallpaperController.java +1 −3 Original line number Diff line number Diff line Loading @@ -756,9 +756,7 @@ class WallpaperController { private void updateWallpaperTokens(boolean visible) { for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { final WallpaperWindowToken token = mWallpaperTokens.get(curTokenNdx); if (token.updateWallpaperWindows(visible)) { token.mDisplayContent.assignWindowLayers(false /* setLayoutNeeded */); } token.updateWallpaperWindows(visible); } } Loading