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

Commit 7517cb89 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12305894 from 10bf2e16 to 24Q4-release

Change-Id: I4ac4e4b4d86333b3f1f01a6f5e71763f972919c4
parents c15686d6 10bf2e16
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -7459,15 +7459,15 @@ public class AppOpsManager {
        }
        }


        /**
        /**
         * Similar to {@link #onOpChanged(String, String, int)} but includes the device for which
         * Similar to {@link #onOpChanged(String, String)} but includes user and the device for
         * the op mode has changed.
         * which the op mode has changed.
         *
         *
         * <p> Implement this method if callbacks are required on all devices.
         * <p> Implement this method if callbacks are required on all devices.
         * If not implemented explicitly, the default implementation will notify for op changes
         * If not implemented explicitly, the default implementation will notify for op changes
         * on the default device {@link VirtualDeviceManager#PERSISTENT_DEVICE_ID_DEFAULT} only.
         * on the default device only.
         *
         *
         * <p> If implemented, {@link #onOpChanged(String, String, int)}
         * <p> If implemented, {@link #onOpChanged(String, String)} will not be called
         * will not be called automatically.
         * automatically.
         *
         *
         * @param op The Op that changed.
         * @param op The Op that changed.
         * @param packageName Package of the app whose Op changed.
         * @param packageName Package of the app whose Op changed.
+2 −1
Original line number Original line Diff line number Diff line
@@ -1339,7 +1339,7 @@ public final class Display {
    public HdrCapabilities getHdrCapabilities() {
    public HdrCapabilities getHdrCapabilities() {
        synchronized (mLock) {
        synchronized (mLock) {
            updateDisplayInfoLocked();
            updateDisplayInfoLocked();
            if (mDisplayInfo.hdrCapabilities == null) {
            if (mDisplayInfo.hdrCapabilities == null || mDisplayInfo.isForceSdr) {
                return null;
                return null;
            }
            }
            int[] supportedHdrTypes;
            int[] supportedHdrTypes;
@@ -1361,6 +1361,7 @@ public final class Display {
                    supportedHdrTypes[index++] = enabledType;
                    supportedHdrTypes[index++] = enabledType;
                }
                }
            }
            }

            return new HdrCapabilities(supportedHdrTypes,
            return new HdrCapabilities(supportedHdrTypes,
                    mDisplayInfo.hdrCapabilities.mMaxLuminance,
                    mDisplayInfo.hdrCapabilities.mMaxLuminance,
                    mDisplayInfo.hdrCapabilities.mMaxAverageLuminance,
                    mDisplayInfo.hdrCapabilities.mMaxAverageLuminance,
+9 −0
Original line number Original line Diff line number Diff line
@@ -230,6 +230,9 @@ public final class DisplayInfo implements Parcelable {
    /** The formats disabled by user **/
    /** The formats disabled by user **/
    public int[] userDisabledHdrTypes = {};
    public int[] userDisabledHdrTypes = {};


    /** When true, all HDR capabilities are disabled **/
    public boolean isForceSdr;

    /**
    /**
     * Indicates whether the display can be switched into a mode with minimal post
     * Indicates whether the display can be switched into a mode with minimal post
     * processing.
     * processing.
@@ -440,6 +443,7 @@ public final class DisplayInfo implements Parcelable {
                && colorMode == other.colorMode
                && colorMode == other.colorMode
                && Arrays.equals(supportedColorModes, other.supportedColorModes)
                && Arrays.equals(supportedColorModes, other.supportedColorModes)
                && Objects.equals(hdrCapabilities, other.hdrCapabilities)
                && Objects.equals(hdrCapabilities, other.hdrCapabilities)
                && isForceSdr == other.isForceSdr
                && Arrays.equals(userDisabledHdrTypes, other.userDisabledHdrTypes)
                && Arrays.equals(userDisabledHdrTypes, other.userDisabledHdrTypes)
                && minimalPostProcessingSupported == other.minimalPostProcessingSupported
                && minimalPostProcessingSupported == other.minimalPostProcessingSupported
                && logicalDensityDpi == other.logicalDensityDpi
                && logicalDensityDpi == other.logicalDensityDpi
@@ -502,6 +506,7 @@ public final class DisplayInfo implements Parcelable {
        supportedColorModes = Arrays.copyOf(
        supportedColorModes = Arrays.copyOf(
                other.supportedColorModes, other.supportedColorModes.length);
                other.supportedColorModes, other.supportedColorModes.length);
        hdrCapabilities = other.hdrCapabilities;
        hdrCapabilities = other.hdrCapabilities;
        isForceSdr = other.isForceSdr;
        userDisabledHdrTypes = other.userDisabledHdrTypes;
        userDisabledHdrTypes = other.userDisabledHdrTypes;
        minimalPostProcessingSupported = other.minimalPostProcessingSupported;
        minimalPostProcessingSupported = other.minimalPostProcessingSupported;
        logicalDensityDpi = other.logicalDensityDpi;
        logicalDensityDpi = other.logicalDensityDpi;
@@ -567,6 +572,7 @@ public final class DisplayInfo implements Parcelable {
            supportedColorModes[i] = source.readInt();
            supportedColorModes[i] = source.readInt();
        }
        }
        hdrCapabilities = source.readParcelable(null, android.view.Display.HdrCapabilities.class);
        hdrCapabilities = source.readParcelable(null, android.view.Display.HdrCapabilities.class);
        isForceSdr = source.readBoolean();
        minimalPostProcessingSupported = source.readBoolean();
        minimalPostProcessingSupported = source.readBoolean();
        logicalDensityDpi = source.readInt();
        logicalDensityDpi = source.readInt();
        physicalXDpi = source.readFloat();
        physicalXDpi = source.readFloat();
@@ -636,6 +642,7 @@ public final class DisplayInfo implements Parcelable {
            dest.writeInt(supportedColorModes[i]);
            dest.writeInt(supportedColorModes[i]);
        }
        }
        dest.writeParcelable(hdrCapabilities, flags);
        dest.writeParcelable(hdrCapabilities, flags);
        dest.writeBoolean(isForceSdr);
        dest.writeBoolean(minimalPostProcessingSupported);
        dest.writeBoolean(minimalPostProcessingSupported);
        dest.writeInt(logicalDensityDpi);
        dest.writeInt(logicalDensityDpi);
        dest.writeFloat(physicalXDpi);
        dest.writeFloat(physicalXDpi);
@@ -874,6 +881,8 @@ public final class DisplayInfo implements Parcelable {
        sb.append(Arrays.toString(appsSupportedModes));
        sb.append(Arrays.toString(appsSupportedModes));
        sb.append(", hdrCapabilities ");
        sb.append(", hdrCapabilities ");
        sb.append(hdrCapabilities);
        sb.append(hdrCapabilities);
        sb.append(", isForceSdr ");
        sb.append(isForceSdr);
        sb.append(", userDisabledHdrTypes ");
        sb.append(", userDisabledHdrTypes ");
        sb.append(Arrays.toString(userDisabledHdrTypes));
        sb.append(Arrays.toString(userDisabledHdrTypes));
        sb.append(", minimalPostProcessingSupported ");
        sb.append(", minimalPostProcessingSupported ");
+4 −2
Original line number Original line Diff line number Diff line
@@ -141,7 +141,6 @@ import android.os.RemoteCallback;
import android.os.RemoteException;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemClock;
import android.os.Trace;
import android.os.Trace;
import android.os.Vibrator;
import android.service.credentials.CredentialProviderService;
import android.service.credentials.CredentialProviderService;
import android.sysprop.DisplayProperties;
import android.sysprop.DisplayProperties;
import android.text.InputType;
import android.text.InputType;
@@ -34156,7 +34155,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * REQUESTED_FRAME_RATE_CATEGORY_NORMAL, REQUESTED_FRAME_RATE_CATEGORY_HIGH.
     * REQUESTED_FRAME_RATE_CATEGORY_NORMAL, REQUESTED_FRAME_RATE_CATEGORY_HIGH.
     * Keep in mind that the preferred frame rate affects the frame rate for the next frame,
     * Keep in mind that the preferred frame rate affects the frame rate for the next frame,
     * so use this method carefully. It's important to note that the preference is valid as
     * so use this method carefully. It's important to note that the preference is valid as
     * long as the View is invalidated.
     * long as the View is invalidated. Please also be aware that the requested frame rate
     * will not propagate to child views when this API is used on a ViewGroup.
     *
     *
     * @param frameRate the preferred frame rate of the view.
     * @param frameRate the preferred frame rate of the view.
     */
     */
@@ -34175,6 +34175,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * REQUESTED_FRAME_RATE_CATEGORY_NO_PREFERENCE, REQUESTED_FRAME_RATE_CATEGORY_LOW,
     * REQUESTED_FRAME_RATE_CATEGORY_NO_PREFERENCE, REQUESTED_FRAME_RATE_CATEGORY_LOW,
     * REQUESTED_FRAME_RATE_CATEGORY_NORMAL, and REQUESTED_FRAME_RATE_CATEGORY_HIGH.
     * REQUESTED_FRAME_RATE_CATEGORY_NORMAL, and REQUESTED_FRAME_RATE_CATEGORY_HIGH.
     * Note that the frame rate value is valid as long as the View is invalidated.
     * Note that the frame rate value is valid as long as the View is invalidated.
     * Please also be aware that the requested frame rate will not propagate to
     * child views when this API is used on a ViewGroup.
     *
     *
     * @return REQUESTED_FRAME_RATE_CATEGORY_DEFAULT by default,
     * @return REQUESTED_FRAME_RATE_CATEGORY_DEFAULT by default,
     * or value passed to {@link #setRequestedFrameRate(float)}.
     * or value passed to {@link #setRequestedFrameRate(float)}.
+14 −29
Original line number Original line Diff line number Diff line
@@ -631,21 +631,20 @@ public class ZygoteInit {
     */
     */
    private static Runnable forkSystemServer(String abiList, String socketName,
    private static Runnable forkSystemServer(String abiList, String socketName,
            ZygoteServer zygoteServer) {
            ZygoteServer zygoteServer) {
        long capabilities = posixCapabilitiesAsBits(
        long capabilities =
                OsConstants.CAP_IPC_LOCK,
                (1L << OsConstants.CAP_IPC_LOCK) |
                OsConstants.CAP_KILL,
                (1L << OsConstants.CAP_KILL) |
                OsConstants.CAP_NET_ADMIN,
                (1L << OsConstants.CAP_NET_ADMIN) |
                OsConstants.CAP_NET_BIND_SERVICE,
                (1L << OsConstants.CAP_NET_BIND_SERVICE) |
                OsConstants.CAP_NET_BROADCAST,
                (1L << OsConstants.CAP_NET_BROADCAST) |
                OsConstants.CAP_NET_RAW,
                (1L << OsConstants.CAP_NET_RAW) |
                OsConstants.CAP_SYS_MODULE,
                (1L << OsConstants.CAP_SYS_MODULE) |
                OsConstants.CAP_SYS_NICE,
                (1L << OsConstants.CAP_SYS_NICE) |
                OsConstants.CAP_SYS_PTRACE,
                (1L << OsConstants.CAP_SYS_PTRACE) |
                OsConstants.CAP_SYS_TIME,
                (1L << OsConstants.CAP_SYS_TIME) |
                OsConstants.CAP_SYS_TTY_CONFIG,
                (1L << OsConstants.CAP_SYS_TTY_CONFIG) |
                OsConstants.CAP_WAKE_ALARM,
                (1L << OsConstants.CAP_WAKE_ALARM) |
                OsConstants.CAP_BLOCK_SUSPEND
                (1L << OsConstants.CAP_BLOCK_SUSPEND);
        );
        /* Containers run without some capabilities, so drop any caps that are not available. */
        /* Containers run without some capabilities, so drop any caps that are not available. */
        StructCapUserHeader header = new StructCapUserHeader(
        StructCapUserHeader header = new StructCapUserHeader(
                OsConstants._LINUX_CAPABILITY_VERSION_3, 0);
                OsConstants._LINUX_CAPABILITY_VERSION_3, 0);
@@ -741,20 +740,6 @@ public class ZygoteInit {
        return null;
        return null;
    }
    }


    /**
     * Gets the bit array representation of the provided list of POSIX capabilities.
     */
    private static long posixCapabilitiesAsBits(int... capabilities) {
        long result = 0;
        for (int capability : capabilities) {
            if ((capability < 0) || (capability > OsConstants.CAP_LAST_CAP)) {
                throw new IllegalArgumentException(String.valueOf(capability));
            }
            result |= (1L << capability);
        }
        return result;
    }

    /**
    /**
     * This is the entry point for a Zygote process.  It creates the Zygote server, loads resources,
     * This is the entry point for a Zygote process.  It creates the Zygote server, loads resources,
     * and handles other tasks related to preparing the process for forking into applications.
     * and handles other tasks related to preparing the process for forking into applications.
Loading