Loading core/java/android/window/SnapshotDrawerUtils.java +10 −5 Original line number Diff line number Diff line Loading @@ -151,10 +151,12 @@ public class SnapshotDrawerUtils { @VisibleForTesting public void setFrames(Rect frame, Rect systemBarInsets) { mFrame.set(frame); mSystemBarInsets.set(systemBarInsets); mSizeMismatch = (mFrame.width() != mSnapshotW || mFrame.height() != mSnapshotH); if (!Flags.drawSnapshotAspectRatioMatch() && systemBarInsets != null) { mSystemBarInsets.set(systemBarInsets); mSystemBarBackgroundPainter.setInsets(systemBarInsets); } } private void drawSnapshot(boolean releaseAfterDraw) { Log.v(TAG, "Drawing snapshot surface sizeMismatch=" + mSizeMismatch); Loading Loading @@ -394,9 +396,12 @@ public class SnapshotDrawerUtils { final ActivityManager.RunningTaskInfo runningTaskInfo = info.taskInfo; final ActivityManager.TaskDescription taskDescription = getOrCreateTaskDescription(runningTaskInfo); Rect systemBarInsets = null; if (!Flags.drawSnapshotAspectRatioMatch()) { drawSurface.initiateSystemBarPainter(lp.flags, lp.privateFlags, attrs.insetsFlags.appearance, taskDescription, info.requestedVisibleTypes); final Rect systemBarInsets = getSystemBarInsets(windowBounds, topWindowInsetsState); systemBarInsets = getSystemBarInsets(windowBounds, topWindowInsetsState); } drawSurface.setFrames(windowBounds, systemBarInsets); drawSurface.drawSnapshot(releaseAfterDraw); } Loading Loading
core/java/android/window/SnapshotDrawerUtils.java +10 −5 Original line number Diff line number Diff line Loading @@ -151,10 +151,12 @@ public class SnapshotDrawerUtils { @VisibleForTesting public void setFrames(Rect frame, Rect systemBarInsets) { mFrame.set(frame); mSystemBarInsets.set(systemBarInsets); mSizeMismatch = (mFrame.width() != mSnapshotW || mFrame.height() != mSnapshotH); if (!Flags.drawSnapshotAspectRatioMatch() && systemBarInsets != null) { mSystemBarInsets.set(systemBarInsets); mSystemBarBackgroundPainter.setInsets(systemBarInsets); } } private void drawSnapshot(boolean releaseAfterDraw) { Log.v(TAG, "Drawing snapshot surface sizeMismatch=" + mSizeMismatch); Loading Loading @@ -394,9 +396,12 @@ public class SnapshotDrawerUtils { final ActivityManager.RunningTaskInfo runningTaskInfo = info.taskInfo; final ActivityManager.TaskDescription taskDescription = getOrCreateTaskDescription(runningTaskInfo); Rect systemBarInsets = null; if (!Flags.drawSnapshotAspectRatioMatch()) { drawSurface.initiateSystemBarPainter(lp.flags, lp.privateFlags, attrs.insetsFlags.appearance, taskDescription, info.requestedVisibleTypes); final Rect systemBarInsets = getSystemBarInsets(windowBounds, topWindowInsetsState); systemBarInsets = getSystemBarInsets(windowBounds, topWindowInsetsState); } drawSurface.setFrames(windowBounds, systemBarInsets); drawSurface.drawSnapshot(releaseAfterDraw); } Loading