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

Commit 6c886797 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5674532 from 2cfa0242 to qt-c2f2-release

Change-Id: I4b4290d7bce9a45a38f75852fbf10a4a51f0a758
parents 3afe1e25 2cfa0242
Loading
Loading
Loading
Loading
+0 −42
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import android.content.res.Configuration;
import android.graphics.BlendMode;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.HardwareRenderer;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.PorterDuff;
@@ -202,29 +201,6 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb

    private SurfaceControl.Transaction mRtTransaction = new SurfaceControl.Transaction();

    /**
     * A callback which reflects an alpha value of this view onto the underlying surfaces.
     *
     * <p class="note"><strong>Note:</strong> This doesn't have to be defined as a member variable,
     * but can be defined as an inline lambda when calling ViewRootImpl#registerRtFrameCallback().
     * However when we do so, the callback is triggered only for a few times and stops working for
     * some reason. It's suspected that there is a problem around garbage collection, and until
     * the cause is fixed, we will keep this callback in a member variable.</p>
    */
    private HardwareRenderer.FrameDrawingCallback mSetSurfaceAlphaCallback = frame -> {
        final ViewRootImpl viewRoot = getViewRootImpl();
        if (viewRoot == null || viewRoot.mSurface == null || !viewRoot.mSurface.isValid()) {
            // In this case, the alpha value is reflected on the screen in #updateSurface() later.
            return;
        }

        final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
        t.setAlpha(mSurfaceControl, getAlpha());
        t.deferTransactionUntilSurface(mSurfaceControl, viewRoot.mSurface, frame);
        t.setEarlyWakeup();
        t.apply();
    };

    public SurfaceView(Context context) {
        this(context, null);
    }
@@ -312,17 +288,6 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb
        updateSurface();
    }

    @Override
    public void setAlpha(float alpha) {
        super.setAlpha(alpha);
        final ViewRootImpl viewRoot = getViewRootImpl();
        if (viewRoot == null) {
            return;
        }
        viewRoot.registerRtFrameCallback(mSetSurfaceAlphaCallback);
        invalidate();
    }

    private void performDrawFinished() {
        if (mPendingReportDraws > 0) {
            mDrawFinished = true;
@@ -682,13 +647,6 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb
                        }
                        updateBackgroundVisibilityInTransaction(viewRoot.getSurfaceControl());

                        // Alpha value change is handled in setAlpha() directly using a local
                        // transaction. However it can happen that setAlpha() is called while
                        // local transactions cannot be applied, so the value is stored in a View
                        // but not yet reflected on the Surface.
                        mSurfaceControl.setAlpha(getAlpha());
                        mBackgroundControl.setAlpha(getAlpha());

                        // While creating the surface, we will set it's initial
                        // geometry. Outside of that though, we should generally
                        // leave it to the RenderThread.
+6 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ public final class SystemUiDeviceConfigFlags {
     */
    public static final String PROPERTY_PERMISSIONS_HUB_ENABLED = "permissions_hub_enabled";

    // Flags related to Assistant Handles
    // Flags related to Assistant

    /**
     * (String) Which behavior mode for the Assistant Handles to use.
@@ -190,5 +190,10 @@ public final class SystemUiDeviceConfigFlags {
    public static final String ASSIST_HANDLES_SUPPRESS_ON_APPS =
            "assist_handles_suppress_on_apps";

    /**
     * Allow touch passthrough above assist area during a session.
     */
    public static final String ASSIST_TAP_PASSTHROUGH = "assist_tap_passthrough";

    private SystemUiDeviceConfigFlags() { }
}
+1 −1
Original line number Diff line number Diff line
@@ -380,7 +380,7 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame
        // don't want the navigation bar background be moving around when resizing in docked mode.
        // However, we need it for the transitions into/out of docked mode.
        if (mNavigationBarColor != null && fullscreen) {
            DecorView.getNavigationBarRect(width, height, stableInsets, systemInsets, mTmpRect);
            DecorView.getNavigationBarRect(width, height, stableInsets, systemInsets, mTmpRect, 1f);
            mNavigationBarColor.setBounds(mTmpRect);
            mNavigationBarColor.draw(canvas);
        }
+7 −4
Original line number Diff line number Diff line
@@ -1080,10 +1080,13 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
    }

    public static void getNavigationBarRect(int canvasWidth, int canvasHeight, Rect stableInsets,
            Rect contentInsets, Rect outRect) {
        final int bottomInset = getColorViewBottomInset(stableInsets.bottom, contentInsets.bottom);
        final int leftInset = getColorViewLeftInset(stableInsets.left, contentInsets.left);
        final int rightInset = getColorViewLeftInset(stableInsets.right, contentInsets.right);
            Rect contentInsets, Rect outRect, float scale) {
        final int bottomInset =
                (int) (getColorViewBottomInset(stableInsets.bottom, contentInsets.bottom) * scale);
        final int leftInset =
                (int) (getColorViewLeftInset(stableInsets.left, contentInsets.left) * scale);
        final int rightInset =
                (int) (getColorViewLeftInset(stableInsets.right, contentInsets.right) * scale);
        final int size = getNavBarSize(bottomInset, rightInset, leftInset);
        if (isNavBarToRightEdge(bottomInset, rightInset)) {
            outRect.set(canvasWidth - size, 0, canvasWidth, canvasHeight);
+5 −0
Original line number Diff line number Diff line
@@ -2380,6 +2380,11 @@ enum PageId {
    // Note: Only shows up on first time toggle
    DIALOG_DARK_UI_INFO = 1740;

    // OPEN: Settings > About phone > Legal information > Google Play system update licenses
    // CATEGORY: SETTINGS
    // OS: Q
    MODULE_LICENSES_DASHBOARD = 1746;

    // OPEN: Settings > System > Gestures > Global Actions Panel
    // CATEGORY: SETTINGS
    // OS: Q
Loading