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

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

Snap for 8557720 from 25fdad82 to tm-qpr1-release

Change-Id: I6b8a794312b1e7cdf22e9e79b19e6a81131f6466
parents c9e35bc2 25fdad82
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -45,7 +45,9 @@ import java.util.Set;
 * referenced in the manifest via {@code android:localeConfig} on
 * {@code <application>}.
 *
 * For more information, see TODO(b/214154050): add link to guide
 * <p>For more information, see
 * <a href="https://developer.android.com/about/versions/13/features/app-languages#use-localeconfig">
 * the section on per-app language preferences</a>.
 *
 * @attr ref android.R.styleable#LocaleConfig_Locale_name
 * @attr ref android.R.styleable#AndroidManifestApplication_localeConfig
+18 −0
Original line number Diff line number Diff line
@@ -2620,6 +2620,15 @@ public class PackageParser {
            return Build.VERSION_CODES.CUR_DEVELOPMENT;
        }

        // STOPSHIP: hack for the pre-release SDK
        if (platformSdkCodenames.length == 0
                && Build.VERSION.KNOWN_CODENAMES.stream().max(String::compareTo).orElse("").equals(
                targetCode)) {
            Slog.w(TAG, "Package requires development platform " + targetCode
                    + ", returning current version " + Build.VERSION.SDK_INT);
            return Build.VERSION.SDK_INT;
        }

        // Otherwise, we're looking at an incompatible pre-release SDK.
        if (platformSdkCodenames.length > 0) {
            outError[0] = "Requires development platform " + targetCode
@@ -2691,6 +2700,15 @@ public class PackageParser {
            return Build.VERSION_CODES.CUR_DEVELOPMENT;
        }

        // STOPSHIP: hack for the pre-release SDK
        if (platformSdkCodenames.length == 0
                && Build.VERSION.KNOWN_CODENAMES.stream().max(String::compareTo).orElse("").equals(
                minCode)) {
            Slog.w(TAG, "Package requires min development platform " + minCode
                    + ", returning current version " + Build.VERSION.SDK_INT);
            return Build.VERSION.SDK_INT;
        }

        // Otherwise, we're looking at an incompatible pre-release SDK.
        if (platformSdkCodenames.length > 0) {
            outError[0] = "Requires development platform " + minCode
+26 −4
Original line number Diff line number Diff line
@@ -315,6 +315,15 @@ public class FrameworkParsingPackageUtils {
            return input.success(Build.VERSION_CODES.CUR_DEVELOPMENT);
        }

        // STOPSHIP: hack for the pre-release SDK
        if (platformSdkCodenames.length == 0
                && Build.VERSION.KNOWN_CODENAMES.stream().max(String::compareTo).orElse("").equals(
                        minCode)) {
            Slog.w(TAG, "Parsed package requires min development platform " + minCode
                    + ", returning current version " + Build.VERSION.SDK_INT);
            return input.success(Build.VERSION.SDK_INT);
        }

        // Otherwise, we're looking at an incompatible pre-release SDK.
        if (platformSdkCodenames.length > 0) {
            return input.error(PackageManager.INSTALL_FAILED_OLDER_SDK,
@@ -367,16 +376,29 @@ public class FrameworkParsingPackageUtils {
            return input.success(targetVers);
        }

        if (allowUnknownCodenames && UnboundedSdkLevel.isAtMost(targetCode)) {
            return input.success(Build.VERSION_CODES.CUR_DEVELOPMENT);
        }

        // If it's a pre-release SDK and the codename matches this platform, it
        // definitely targets this SDK.
        if (matchTargetCode(platformSdkCodenames, targetCode)) {
            return input.success(Build.VERSION_CODES.CUR_DEVELOPMENT);
        }

        // STOPSHIP: hack for the pre-release SDK
        if (platformSdkCodenames.length == 0
                && Build.VERSION.KNOWN_CODENAMES.stream().max(String::compareTo).orElse("").equals(
                        targetCode)) {
            Slog.w(TAG, "Parsed package requires development platform " + targetCode
                    + ", returning current version " + Build.VERSION.SDK_INT);
            return input.success(Build.VERSION.SDK_INT);
        }

        try {
            if (allowUnknownCodenames && UnboundedSdkLevel.isAtMost(targetCode)) {
                return input.success(Build.VERSION_CODES.CUR_DEVELOPMENT);
            }
        } catch (IllegalArgumentException e) {
            return input.error(PackageManager.INSTALL_FAILED_OLDER_SDK, "Bad package SDK");
        }

        // Otherwise, we're looking at an incompatible pre-release SDK.
        if (platformSdkCodenames.length > 0) {
            return input.error(PackageManager.INSTALL_FAILED_OLDER_SDK,
+35 −0
Original line number Diff line number Diff line
@@ -1233,6 +1233,41 @@ public abstract class CameraCaptureSession implements AutoCloseable {
            // default empty implementation
        }

        /**
         * This method is called when the camera device has started reading out the output
         * image for the request, at the beginning of the sensor image readout.
         *
         * <p>For a capture request, this callback is invoked right after
         * {@link #onCaptureStarted}. Unlike {@link #onCaptureStarted}, instead of passing
         * a timestamp of start of exposure, this callback passes a timestamp of start of
         * camera data readout. This is useful because for a camera running at fixed frame
         * rate, the start of readout is at fixed interval, but not necessary for the start
         * of exposure.</p>
         *
         * <p>This timestamp may not match {@link CaptureResult#SENSOR_TIMESTAMP the result
         * timestamp field}. It will, however, match the timestamp of buffers sent to the
         * output surfaces with {@link OutputConfiguration#TIMESTAMP_BASE_READOUT_SENSOR}
         * timestamp base.</p>
         *
         * <p>This callback will be called only if {@link
         * CameraCharacteristics#SENSOR_READOUT_TIMESTAMP} is
         * {@link CameraMetadata#SENSOR_READOUT_TIMESTAMP_HARDWARE}, and it's called
         * right after {@link #onCaptureStarted}.</p>
         *
         * @param session the session returned by {@link CameraDevice#createCaptureSession}
         * @param request the request for the readout that just began
         * @param timestamp the timestamp at start of readout for a regular request, or
         *                  the timestamp at the input image's start of readout for a
         *                  reprocess request, in nanoseconds.
         * @param frameNumber the frame number for this capture
         *
         * @hide
         */
        public void onReadoutStarted(@NonNull CameraCaptureSession session,
                @NonNull CaptureRequest request, long timestamp, long frameNumber) {
            // default empty implementation
        }

        /**
         * This method is called when some results from an image capture are
         * available.
+34 −0
Original line number Diff line number Diff line
@@ -4383,6 +4383,40 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
    public static final Key<android.graphics.Rect[]> SENSOR_OPTICAL_BLACK_REGIONS =
            new Key<android.graphics.Rect[]>("android.sensor.opticalBlackRegions", android.graphics.Rect[].class);

    /**
     * <p>Whether or not the camera device supports readout timestamp and
     * onReadoutStarted callback.</p>
     * <p>If this tag is HARDWARE, the camera device calls onReadoutStarted in addition to the
     * onCaptureStarted callback for each capture. The timestamp passed into the callback
     * is the start of camera image readout rather than the start of the exposure. In
     * addition, the application can configure an
     * {@link android.hardware.camera2.params.OutputConfiguration } with
     * TIMESTAMP_BASE_READOUT_SENSOR timestamp base, in which case, the timestamp of the
     * output surface matches the timestamp from the corresponding onReadoutStarted callback.</p>
     * <p>The readout timestamp is beneficial for video recording, because the encoder favors
     * uniform timestamps, and the readout timestamps better reflect the cadence camera sensors
     * output data.</p>
     * <p>If this tag is HARDWARE, the camera device produces the start-of-exposure and
     * start-of-readout together. As a result, the onReadoutStarted is called right after
     * onCaptureStarted. The difference in start-of-readout and start-of-exposure is the sensor
     * exposure time, plus certain constant offset. The offset is usually due to camera sensor
     * level crop, and it remains constant for a given camera sensor mode.</p>
     * <p><b>Possible values:</b></p>
     * <ul>
     *   <li>{@link #SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED NOT_SUPPORTED}</li>
     *   <li>{@link #SENSOR_READOUT_TIMESTAMP_HARDWARE HARDWARE}</li>
     * </ul>
     *
     * <p>This key is available on all devices.</p>
     * @see #SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED
     * @see #SENSOR_READOUT_TIMESTAMP_HARDWARE
     * @hide
     */
    @PublicKey
    @NonNull
    public static final Key<Integer> SENSOR_READOUT_TIMESTAMP =
            new Key<Integer>("android.sensor.readoutTimestamp", int.class);

    /**
     * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p>
     * <p>This list contains lens shading modes that can be set for the camera device.
Loading