diff options
| author | 2022-02-22 08:31:31 +0000 | |
|---|---|---|
| committer | 2022-02-22 08:31:31 +0000 | |
| commit | fe0504b2a9be76191d45f31f76e41174573f438c (patch) | |
| tree | d620cc34a3017f58d22096025965c7a4001537de | |
| parent | bd8fb4581ee0eee739d31e429bea0692e4c21cb3 (diff) | |
| parent | 80159d3ed22f42e7a21f592ddc9849f9af6f3247 (diff) | |
Merge "Fix content insets calculation error when taking task snapshot."
| -rw-r--r-- | services/core/java/com/android/server/wm/TaskSnapshotController.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/TaskSnapshotController.java b/services/core/java/com/android/server/wm/TaskSnapshotController.java index a518222c3bde..71893f49481f 100644 --- a/services/core/java/com/android/server/wm/TaskSnapshotController.java +++ b/services/core/java/com/android/server/wm/TaskSnapshotController.java @@ -288,7 +288,7 @@ class TaskSnapshotController { } final ActivityRecord activity = result.first; final WindowState mainWindow = result.second; - final Rect contentInsets = getSystemBarInsets(task.getBounds(), + final Rect contentInsets = getSystemBarInsets(mainWindow.getFrame(), mainWindow.getInsetsStateWithVisibilityOverride()); InsetUtils.addInsets(contentInsets, activity.getLetterboxInsets()); @@ -554,7 +554,7 @@ class TaskSnapshotController { final LayoutParams attrs = mainWindow.getAttrs(); final Rect taskBounds = task.getBounds(); final InsetsState insetsState = mainWindow.getInsetsStateWithVisibilityOverride(); - final Rect systemBarInsets = getSystemBarInsets(taskBounds, insetsState); + final Rect systemBarInsets = getSystemBarInsets(mainWindow.getFrame(), insetsState); final SystemBarBackgroundPainter decorPainter = new SystemBarBackgroundPainter(attrs.flags, attrs.privateFlags, attrs.insetsFlags.appearance, task.getTaskDescription(), mHighResTaskSnapshotScale, insetsState); |