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

Commit d4ac4a83 authored by linkai's avatar linkai
Browse files

Fix HDR dimming issues when split screen switching.



Bug:360380695
Test:Manual

Change-Id: I05e4e5f87b6134138c309e6fb5e1542c428b8739
Signed-off-by: default avatarlinkai <linkai@xiaomi.com>
parent 65bab500
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -42,6 +42,7 @@ public class ScreenshotUtils {
                    .setSourceCrop(crop)
                    .setSourceCrop(crop)
                    .setCaptureSecureLayers(true)
                    .setCaptureSecureLayers(true)
                    .setAllowProtected(true)
                    .setAllowProtected(true)
                    .setHintForSeamlessTransition(true)
                    .build()));
                    .build()));
    }
    }


@@ -78,6 +79,9 @@ public class ScreenshotUtils {
            mTransaction.setColorSpace(mScreenshot, buffer.getColorSpace());
            mTransaction.setColorSpace(mScreenshot, buffer.getColorSpace());
            mTransaction.reparent(mScreenshot, mParentSurfaceControl);
            mTransaction.reparent(mScreenshot, mParentSurfaceControl);
            mTransaction.setLayer(mScreenshot, mLayer);
            mTransaction.setLayer(mScreenshot, mLayer);
            if (buffer.containsHdrLayers()) {
                mTransaction.setDimmingEnabled(mScreenshot, false);
            }
            mTransaction.show(mScreenshot);
            mTransaction.show(mScreenshot);
            mTransaction.apply();
            mTransaction.apply();
        }
        }