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

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

Merge "ViewRootImpl: Correct opaque flag usage" into sc-dev

parents cb3e9c2b 776dd9e5
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2783,7 +2783,7 @@ public final class ViewRootImpl implements ViewParent,
                        & WindowManagerGlobal.RELAYOUT_RES_DRAG_RESIZING_DOCKED) != 0;
                final boolean dragResizing = freeformResizing || dockedResizing;
                if (mSurfaceControl.isValid()) {
                    updateOpacity(params, dragResizing);
                    updateOpacity(mWindowAttributes, dragResizing);
                }

                if (DEBUG_LAYOUT) Log.v(mTag, "relayout: frame=" + frame.toShortString()
@@ -7749,9 +7749,10 @@ public final class ViewRootImpl implements ViewParent,
        return relayoutResult;
    }

    private void updateOpacity(@Nullable WindowManager.LayoutParams params, boolean dragResizing) {
    private void updateOpacity(WindowManager.LayoutParams params, boolean dragResizing) {
        boolean opaque = false;
        if (params != null && !PixelFormat.formatHasAlpha(params.format)

        if (!PixelFormat.formatHasAlpha(params.format)
                // Don't make surface with surfaceInsets opaque as they display a
                // translucent shadow.
                && params.surfaceInsets.left == 0
+2 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.hardware.display.DisplayManager;
import android.os.IBinder;
@@ -215,6 +216,7 @@ public class StartingSurfaceDrawer {
                WindowManager.LayoutParams.TYPE_APPLICATION_STARTING);
        params.setFitInsetsSides(0);
        params.setFitInsetsTypes(0);
        params.format = PixelFormat.TRANSLUCENT;
        int windowFlags = WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
                | WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
                | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN