Loading services/core/java/com/android/server/wm/TaskSnapshotController.java +13 −6 Original line number Diff line number Diff line Loading @@ -236,7 +236,7 @@ class TaskSnapshotController { return null; } return new TaskSnapshot(buffer, top.getConfiguration().orientation, minRect(mainWindow.mContentInsets, mainWindow.mStableInsets), getInsetsFromTaskBounds(mainWindow, task), isLowRamDevice /* reduced */, scaleFraction /* scale */); } Loading @@ -244,11 +244,18 @@ class TaskSnapshotController { return mIsRunningOnWear || mIsRunningOnTv || mIsRunningOnIoT; } private Rect minRect(Rect rect1, Rect rect2) { return new Rect(Math.min(rect1.left, rect2.left), Math.min(rect1.top, rect2.top), Math.min(rect1.right, rect2.right), Math.min(rect1.bottom, rect2.bottom)); private Rect getInsetsFromTaskBounds(WindowState state, Task task) { final Rect r = new Rect(); r.set(state.getContentFrameLw()); r.intersectUnchecked(state.getStableFrameLw()); final Rect taskBounds = task.getBounds(); r.set(Math.max(0, r.left - taskBounds.left), Math.max(0, r.top - taskBounds.top), Math.max(0, taskBounds.right - r.right), Math.max(0, taskBounds.bottom - r.bottom)); return r; } /** Loading services/core/java/com/android/server/wm/TaskSnapshotSurface.java +2 −1 Original line number Diff line number Diff line Loading @@ -349,8 +349,9 @@ class TaskSnapshotSurface implements StartingSurface { // Let's remove all system decorations except the status bar, but only if the task is at the // very top of the screen. final boolean isTop = mTaskBounds.top == 0 && mFrame.top == 0; rect.inset((int) (insets.left * mSnapshot.getScale()), mTaskBounds.top != 0 ? (int) (insets.top * mSnapshot.getScale()) : 0, isTop ? 0 : (int) (insets.top * mSnapshot.getScale()), (int) (insets.right * mSnapshot.getScale()), (int) (insets.bottom * mSnapshot.getScale())); return rect; Loading Loading
services/core/java/com/android/server/wm/TaskSnapshotController.java +13 −6 Original line number Diff line number Diff line Loading @@ -236,7 +236,7 @@ class TaskSnapshotController { return null; } return new TaskSnapshot(buffer, top.getConfiguration().orientation, minRect(mainWindow.mContentInsets, mainWindow.mStableInsets), getInsetsFromTaskBounds(mainWindow, task), isLowRamDevice /* reduced */, scaleFraction /* scale */); } Loading @@ -244,11 +244,18 @@ class TaskSnapshotController { return mIsRunningOnWear || mIsRunningOnTv || mIsRunningOnIoT; } private Rect minRect(Rect rect1, Rect rect2) { return new Rect(Math.min(rect1.left, rect2.left), Math.min(rect1.top, rect2.top), Math.min(rect1.right, rect2.right), Math.min(rect1.bottom, rect2.bottom)); private Rect getInsetsFromTaskBounds(WindowState state, Task task) { final Rect r = new Rect(); r.set(state.getContentFrameLw()); r.intersectUnchecked(state.getStableFrameLw()); final Rect taskBounds = task.getBounds(); r.set(Math.max(0, r.left - taskBounds.left), Math.max(0, r.top - taskBounds.top), Math.max(0, taskBounds.right - r.right), Math.max(0, taskBounds.bottom - r.bottom)); return r; } /** Loading
services/core/java/com/android/server/wm/TaskSnapshotSurface.java +2 −1 Original line number Diff line number Diff line Loading @@ -349,8 +349,9 @@ class TaskSnapshotSurface implements StartingSurface { // Let's remove all system decorations except the status bar, but only if the task is at the // very top of the screen. final boolean isTop = mTaskBounds.top == 0 && mFrame.top == 0; rect.inset((int) (insets.left * mSnapshot.getScale()), mTaskBounds.top != 0 ? (int) (insets.top * mSnapshot.getScale()) : 0, isTop ? 0 : (int) (insets.top * mSnapshot.getScale()), (int) (insets.right * mSnapshot.getScale()), (int) (insets.bottom * mSnapshot.getScale())); return rect; Loading