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

Commit 3b15e533 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5694913 from 3b077cbf to qt-c2f2-release

Change-Id: I6d69255721ebe7f2d53ae3978fc565cd4c38e6c0
parents b02028fb 3b077cbf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -53,7 +53,8 @@ import java.util.function.Consumer;
 * the availability of roles. Instead, they should always query if the role is available using
 * {@link #isRoleAvailable(String)} before trying to do anything with it. Some predefined role names
 * are available as constants in this class, and a list of possibly available roles can be found in
 * the AndroidX Libraries.
 * the <a href="{@docRoot}reference/androidx/core/role/package-summary.html">AndroidX Role
 * library</a>.
 * <p>
 * There can be multiple applications qualifying for a role, but only a subset of them can become
 * role holders. To qualify for a role, an application must meet certain requirements, including
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ public class ZygoteProcess {
     * not be used if the devices has a DeviceConfig profile pushed to it that contains a value for
     * this key.
     */
    private static final String USAP_POOL_ENABLED_DEFAULT = "true";
    private static final String USAP_POOL_ENABLED_DEFAULT = "false";

    /**
     * The name of the socket used to communicate with the primary zygote.
+24 −5
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.NonNull;
import android.annotation.UnsupportedAppUsage;
import android.content.res.CompatibilityInfo.Translator;
import android.graphics.Canvas;
import android.graphics.ColorSpace;
import android.graphics.GraphicBuffer;
import android.graphics.Matrix;
import android.graphics.RecordingCanvas;
@@ -80,7 +81,8 @@ public class Surface implements Parcelable {
    private static native long nativeGetNextFrameNumber(long nativeObject);
    private static native int nativeSetScalingMode(long nativeObject, int scalingMode);
    private static native int nativeForceScopedDisconnect(long nativeObject);
    private static native int nativeAttachAndQueueBuffer(long nativeObject, GraphicBuffer buffer);
    private static native int nativeAttachAndQueueBufferWithColorSpace(long nativeObject,
            GraphicBuffer buffer, int colorSpaceId);

    private static native int nativeSetSharedBufferModeEnabled(long nativeObject, boolean enabled);
    private static native int nativeSetAutoRefreshEnabled(long nativeObject, boolean enabled);
@@ -699,20 +701,37 @@ public class Surface implements Parcelable {
    }

    /**
     * Transfer ownership of buffer and present it on the Surface.
     * Transfer ownership of buffer with a color space and present it on the Surface.
     * The supported color spaces are SRGB and Display P3, other color spaces will be
     * treated as SRGB.
     * @hide
     */
    public void attachAndQueueBuffer(GraphicBuffer buffer) {
    public void attachAndQueueBufferWithColorSpace(GraphicBuffer buffer, ColorSpace colorSpace) {
        synchronized (mLock) {
            checkNotReleasedLocked();
            int err = nativeAttachAndQueueBuffer(mNativeObject, buffer);
            if (colorSpace == null) {
                colorSpace = ColorSpace.get(ColorSpace.Named.SRGB);
            }
            int err = nativeAttachAndQueueBufferWithColorSpace(mNativeObject, buffer,
                    colorSpace.getId());
            if (err != 0) {
                throw new RuntimeException(
                        "Failed to attach and queue buffer to Surface (bad object?)");
                        "Failed to attach and queue buffer to Surface (bad object?), "
                        + "native error: " + err);
            }
        }
    }

    /**
     * Deprecated, use attachAndQueueBufferWithColorSpace instead.
     * Transfer ownership of buffer and present it on the Surface.
     * The color space of the buffer is treated as SRGB.
     * @hide
     */
    public void attachAndQueueBuffer(GraphicBuffer buffer) {
        attachAndQueueBufferWithColorSpace(buffer, ColorSpace.get(ColorSpace.Named.SRGB));
    }

    /**
     * Returns whether or not this Surface is backed by a single-buffered SurfaceTexture
     * @hide
+2 −1
Original line number Diff line number Diff line
@@ -1866,7 +1866,8 @@ public final class SurfaceControl implements Parcelable {
        final ScreenshotGraphicBuffer buffer = screenshotToBuffer(display, sourceCrop, width,
                height, useIdentityTransform, rotation);
        try {
            consumer.attachAndQueueBuffer(buffer.getGraphicBuffer());
            consumer.attachAndQueueBufferWithColorSpace(buffer.getGraphicBuffer(),
                    buffer.getColorSpace());
        } catch (RuntimeException e) {
            Log.w(TAG, "Failed to take screenshot - " + e.getMessage());
        }
+7 −1
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ public final class SystemUiDeviceConfigFlags {
     */
    public static final String ASSIST_HANDLES_SHOWN_FREQUENCY_THRESHOLD_MS =
            "assist_handles_shown_frequency_threshold_ms";

    // Flag related to clock face

    /**
@@ -188,6 +189,11 @@ public final class SystemUiDeviceConfigFlags {
     */
    public static final String ASSIST_TAP_PASSTHROUGH = "assist_tap_passthrough";

    /**
     * (bool) Whether to show handles when taught.
     */
    public static final String ASSIST_HANDLES_SHOW_WHEN_TAUGHT = "assist_handles_show_when_taught";

    /**
     * (bool) Whether to use the new BrightLineFalsingManager.
     */
Loading