Merge "Fix content insets calculation error when taking task snapshot."
This commit is contained in:
@@ -288,7 +288,7 @@ class TaskSnapshotController {
|
|||||||
}
|
}
|
||||||
final ActivityRecord activity = result.first;
|
final ActivityRecord activity = result.first;
|
||||||
final WindowState mainWindow = result.second;
|
final WindowState mainWindow = result.second;
|
||||||
final Rect contentInsets = getSystemBarInsets(task.getBounds(),
|
final Rect contentInsets = getSystemBarInsets(mainWindow.getFrame(),
|
||||||
mainWindow.getInsetsStateWithVisibilityOverride());
|
mainWindow.getInsetsStateWithVisibilityOverride());
|
||||||
InsetUtils.addInsets(contentInsets, activity.getLetterboxInsets());
|
InsetUtils.addInsets(contentInsets, activity.getLetterboxInsets());
|
||||||
|
|
||||||
@@ -554,7 +554,7 @@ class TaskSnapshotController {
|
|||||||
final LayoutParams attrs = mainWindow.getAttrs();
|
final LayoutParams attrs = mainWindow.getAttrs();
|
||||||
final Rect taskBounds = task.getBounds();
|
final Rect taskBounds = task.getBounds();
|
||||||
final InsetsState insetsState = mainWindow.getInsetsStateWithVisibilityOverride();
|
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,
|
final SystemBarBackgroundPainter decorPainter = new SystemBarBackgroundPainter(attrs.flags,
|
||||||
attrs.privateFlags, attrs.insetsFlags.appearance, task.getTaskDescription(),
|
attrs.privateFlags, attrs.insetsFlags.appearance, task.getTaskDescription(),
|
||||||
mHighResTaskSnapshotScale, insetsState);
|
mHighResTaskSnapshotScale, insetsState);
|
||||||
|
|||||||
Reference in New Issue
Block a user