Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54774cad authored by Winson Chung's avatar Winson Chung Committed by android-build-merger
Browse files

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

am: c8dca90a

Change-Id: I0a59b32ffbc70d24f4a1cfd911aa85287d3e3c32
parents e41abff8 c8dca90a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);