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

Commit c8dca90a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents a6d0f1f7 67d93c24
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);