Loading services/core/java/com/android/server/wm/ActivityStack.java +0 −14 Original line number Diff line number Diff line Loading @@ -148,7 +148,6 @@ import android.util.EventLog; import android.util.IntArray; import android.util.Log; import android.util.Slog; import android.util.SparseArray; import android.util.proto.ProtoOutputStream; import android.view.Display; Loading Loading @@ -377,8 +376,6 @@ class ActivityStack extends ConfigurationContainer { /** Stores the override windowing-mode from before a transient mode change (eg. split) */ private int mRestoreOverrideWindowingMode = WINDOWING_MODE_UNDEFINED; private final SparseArray<Rect> mTmpBounds = new SparseArray<>(); private final SparseArray<Rect> mTmpInsetBounds = new SparseArray<>(); private final Rect mTmpRect = new Rect(); private final Rect mTmpRect2 = new Rect(); private final Rect mTmpRect3 = new Rect(); Loading Loading @@ -5000,22 +4997,11 @@ class ActivityStack extends ConfigurationContainer { // Update override configurations of all tasks in the stack. final Rect taskBounds = tempTaskBounds != null ? tempTaskBounds : bounds; mTmpBounds.clear(); mTmpInsetBounds.clear(); for (int i = mTaskHistory.size() - 1; i >= 0; i--) { final TaskRecord task = mTaskHistory.get(i); if (task.isResizeable()) { task.updateOverrideConfiguration(taskBounds, tempTaskInsetBounds); } if (task.hasDisplayedBounds()) { mTmpBounds.put(task.taskId, task.getDisplayedBounds()); mTmpInsetBounds.put(task.taskId, task.getRequestedOverrideBounds()); } else { mTmpBounds.put(task.taskId, task.getRequestedOverrideBounds()); mTmpInsetBounds.put(task.taskId, null); } } setBounds(bounds); Loading services/core/java/com/android/server/wm/TaskStack.java +0 −45 Original line number Diff line number Diff line Loading @@ -66,7 +66,6 @@ import android.os.RemoteException; import android.util.DisplayMetrics; import android.util.EventLog; import android.util.Slog; import android.util.SparseArray; import android.util.proto.ProtoOutputStream; import android.view.DisplayCutout; import android.view.DisplayInfo; Loading Loading @@ -186,33 +185,6 @@ public class TaskStack extends WindowContainer<Task> implements return mChildren.get(mChildren.size() - 1); } /** * Set the bounds of the stack and its containing tasks. * @param stackBounds New stack bounds. Passing in null sets the bounds to fullscreen. * @param taskBounds Bounds for individual tasks, keyed by task id. * @param taskTempInsetBounds Inset bounds for individual tasks, keyed by task id. * @return True if the stack bounds was changed. * */ boolean setBounds( Rect stackBounds, SparseArray<Rect> taskBounds, SparseArray<Rect> taskTempInsetBounds) { setBounds(stackBounds); // Update bounds of containing tasks. for (int taskNdx = mChildren.size() - 1; taskNdx >= 0; --taskNdx) { final Task task = mChildren.get(taskNdx); final Rect insetBounds = taskTempInsetBounds != null ? taskTempInsetBounds.get(task.mTaskId) : null; if (insetBounds != null) { task.setBounds(insetBounds); task.setOverrideDisplayedBounds(taskBounds.get(task.mTaskId)); } else { task.setBounds(taskBounds.get(task.mTaskId)); task.setOverrideDisplayedBounds(null); } } return true; } void prepareFreezingTaskBounds() { for (int taskNdx = mChildren.size() - 1; taskNdx >= 0; --taskNdx) { final Task task = mChildren.get(taskNdx); Loading Loading @@ -798,23 +770,6 @@ public class TaskStack extends WindowContainer<Task> implements scheduleAnimation(); } /** * Re-sizes a stack and its containing tasks. * * @param bounds New stack bounds. Passing in null sets the bounds to fullscreen. * @param taskBounds Bounds for tasks in the resized stack, keyed by task id. * @param taskTempInsetBounds Inset bounds for individual tasks, keyed by task id. */ void resize(Rect bounds, SparseArray<Rect> taskBounds, SparseArray<Rect> taskTempInsetBounds) { // We might trigger a configuration change. Save the current task bounds for freezing. prepareFreezingTaskBounds(); if (setBounds(bounds, taskBounds, taskTempInsetBounds) && isVisible()) { getDisplayContent().setLayoutNeeded(); mWmService.mWindowPlacerLocked.performSurfacePlacement(); } } /** * Calculate an amount by which to expand the stack bounds in each direction. * Used to make room for shadows in the pinned windowing mode. Loading Loading
services/core/java/com/android/server/wm/ActivityStack.java +0 −14 Original line number Diff line number Diff line Loading @@ -148,7 +148,6 @@ import android.util.EventLog; import android.util.IntArray; import android.util.Log; import android.util.Slog; import android.util.SparseArray; import android.util.proto.ProtoOutputStream; import android.view.Display; Loading Loading @@ -377,8 +376,6 @@ class ActivityStack extends ConfigurationContainer { /** Stores the override windowing-mode from before a transient mode change (eg. split) */ private int mRestoreOverrideWindowingMode = WINDOWING_MODE_UNDEFINED; private final SparseArray<Rect> mTmpBounds = new SparseArray<>(); private final SparseArray<Rect> mTmpInsetBounds = new SparseArray<>(); private final Rect mTmpRect = new Rect(); private final Rect mTmpRect2 = new Rect(); private final Rect mTmpRect3 = new Rect(); Loading Loading @@ -5000,22 +4997,11 @@ class ActivityStack extends ConfigurationContainer { // Update override configurations of all tasks in the stack. final Rect taskBounds = tempTaskBounds != null ? tempTaskBounds : bounds; mTmpBounds.clear(); mTmpInsetBounds.clear(); for (int i = mTaskHistory.size() - 1; i >= 0; i--) { final TaskRecord task = mTaskHistory.get(i); if (task.isResizeable()) { task.updateOverrideConfiguration(taskBounds, tempTaskInsetBounds); } if (task.hasDisplayedBounds()) { mTmpBounds.put(task.taskId, task.getDisplayedBounds()); mTmpInsetBounds.put(task.taskId, task.getRequestedOverrideBounds()); } else { mTmpBounds.put(task.taskId, task.getRequestedOverrideBounds()); mTmpInsetBounds.put(task.taskId, null); } } setBounds(bounds); Loading
services/core/java/com/android/server/wm/TaskStack.java +0 −45 Original line number Diff line number Diff line Loading @@ -66,7 +66,6 @@ import android.os.RemoteException; import android.util.DisplayMetrics; import android.util.EventLog; import android.util.Slog; import android.util.SparseArray; import android.util.proto.ProtoOutputStream; import android.view.DisplayCutout; import android.view.DisplayInfo; Loading Loading @@ -186,33 +185,6 @@ public class TaskStack extends WindowContainer<Task> implements return mChildren.get(mChildren.size() - 1); } /** * Set the bounds of the stack and its containing tasks. * @param stackBounds New stack bounds. Passing in null sets the bounds to fullscreen. * @param taskBounds Bounds for individual tasks, keyed by task id. * @param taskTempInsetBounds Inset bounds for individual tasks, keyed by task id. * @return True if the stack bounds was changed. * */ boolean setBounds( Rect stackBounds, SparseArray<Rect> taskBounds, SparseArray<Rect> taskTempInsetBounds) { setBounds(stackBounds); // Update bounds of containing tasks. for (int taskNdx = mChildren.size() - 1; taskNdx >= 0; --taskNdx) { final Task task = mChildren.get(taskNdx); final Rect insetBounds = taskTempInsetBounds != null ? taskTempInsetBounds.get(task.mTaskId) : null; if (insetBounds != null) { task.setBounds(insetBounds); task.setOverrideDisplayedBounds(taskBounds.get(task.mTaskId)); } else { task.setBounds(taskBounds.get(task.mTaskId)); task.setOverrideDisplayedBounds(null); } } return true; } void prepareFreezingTaskBounds() { for (int taskNdx = mChildren.size() - 1; taskNdx >= 0; --taskNdx) { final Task task = mChildren.get(taskNdx); Loading Loading @@ -798,23 +770,6 @@ public class TaskStack extends WindowContainer<Task> implements scheduleAnimation(); } /** * Re-sizes a stack and its containing tasks. * * @param bounds New stack bounds. Passing in null sets the bounds to fullscreen. * @param taskBounds Bounds for tasks in the resized stack, keyed by task id. * @param taskTempInsetBounds Inset bounds for individual tasks, keyed by task id. */ void resize(Rect bounds, SparseArray<Rect> taskBounds, SparseArray<Rect> taskTempInsetBounds) { // We might trigger a configuration change. Save the current task bounds for freezing. prepareFreezingTaskBounds(); if (setBounds(bounds, taskBounds, taskTempInsetBounds) && isVisible()) { getDisplayContent().setLayoutNeeded(); mWmService.mWindowPlacerLocked.performSurfacePlacement(); } } /** * Calculate an amount by which to expand the stack bounds in each direction. * Used to make room for shadows in the pinned windowing mode. Loading