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

Commit 7cc369cf authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Merge branch '2432-a14-black_rot_backdrop' into 'a14'

feat: Fully resolve black backdrop on rotate

See merge request e/os/android_frameworks_base!265
parents a966bfb5 90867bf3
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ class ScreenRotationAnimation {
                        .build();

                t.setLayer(mBackColorSurface, -1);
                t.setColor(mBackColorSurface, new float[]{mStartLuma, mStartLuma, mStartLuma});
                t.setColor(mBackColorSurface, new float[]{0.0f, 0.0f, 0.0f});
                t.show(mBackColorSurface);
            }

@@ -346,8 +346,8 @@ class ScreenRotationAnimation {
        int colorTransitionMs = mContext.getResources().getInteger(
                R.integer.config_screen_rotation_color_transition);
        final float[] rgbTmpFloat = new float[3];
        final int startColor = Color.rgb(mStartLuma, mStartLuma, mStartLuma);
        final int endColor = Color.rgb(mEndLuma, mEndLuma, mEndLuma);
        final int startColor = Color.rgb(0, 0, 0);
        final int endColor = Color.rgb(0, 0, 0);
        final long duration = colorTransitionMs * (long) animationScale;
        final Transaction t = mTransactionPool.acquire();

+1 −1
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ class ScreenRotationAnimation {
            // disable dimming effect to get avoid of hdr content being dimmed during animation.
            t.setDimmingEnabled(mScreenshotLayer, !screenshotBuffer.containsHdrLayers());
            t.setLayer(mBackColorSurface, -1);
            t.setColor(mBackColorSurface, new float[]{mStartLuma, mStartLuma, mStartLuma});
            t.setColor(mBackColorSurface, new float[]{0.0f, 0.0f, 0.0f});
            t.setAlpha(mBackColorSurface, 1);
            t.setBuffer(mScreenshotLayer, hardwareBuffer);
            t.setColorSpace(mScreenshotLayer, screenshotBuffer.getColorSpace());