Merge "Ensure snapshot orientation matches snapshot buffer size" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-06-18 19:46:34 +00:00
committed by Android (Google) Code Review

View File

@@ -306,7 +306,8 @@ class TaskSnapshotController {
final boolean isWindowTranslucent = mainWindow.getAttrs().format != PixelFormat.OPAQUE;
return new TaskSnapshot(
appWindowToken.mActivityComponent, screenshotBuffer.getGraphicBuffer(),
screenshotBuffer.getColorSpace(), appWindowToken.getConfiguration().orientation,
screenshotBuffer.getColorSpace(),
appWindowToken.getTask().getConfiguration().orientation,
getInsets(mainWindow), isLowRamDevice /* reduced */, scaleFraction /* scale */,
true /* isRealSnapshot */, task.getWindowingMode(), getSystemUiVisibility(task),
!appWindowToken.fillsParent() || isWindowTranslucent);
@@ -394,10 +395,11 @@ class TaskSnapshotController {
if (hwBitmap == null) {
return null;
}
// Note, the app theme snapshot is never translucent because we enforce a non-translucent
// color above
return new TaskSnapshot(topChild.mActivityComponent, hwBitmap.createGraphicBufferHandle(),
hwBitmap.getColorSpace(), topChild.getConfiguration().orientation,
hwBitmap.getColorSpace(), topChild.getTask().getConfiguration().orientation,
getInsets(mainWindow), ActivityManager.isLowRamDeviceStatic() /* reduced */,
1.0f /* scale */, false /* isRealSnapshot */, task.getWindowingMode(),
getSystemUiVisibility(task), false);