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

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

Snap for 10752753 from 0f78d29c to udc-qpr1-release

Change-Id: I8f0961e9682e80a204bbcf7c96334fc992bffa13
parents 31f62efb 0f78d29c
Loading
Loading
Loading
Loading
+25 −6
Original line number Diff line number Diff line
@@ -211,6 +211,11 @@ public final class AttributionSource implements Parcelable {
                token, mAttributionSourceState.renouncedPermissions, getNext());
    }

    /** @hide */
    public AttributionSource withDefaultToken() {
        return withToken(sDefaultToken);
    }

    /** @hide */
    public AttributionSource withPid(int pid) {
        return new AttributionSource(getUid(), pid, getPackageName(), getAttributionTag(),
@@ -520,16 +525,30 @@ public final class AttributionSource implements Parcelable {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AttributionSource that = (AttributionSource) o;
        return mAttributionSourceState.uid == that.mAttributionSourceState.uid
        return equalsExceptToken(that) && Objects.equals(
                mAttributionSourceState.token, that.mAttributionSourceState.token);
    }

    /**
     * We store trusted attribution sources without their token (the token is the key to the map)
     * to avoid having a strong reference to the token. This means, when checking the equality of a
     * supplied AttributionSource in PermissionManagerService.isTrustedAttributionSource, we want to
     * compare everything except the token.
     *
     * @hide
     */
    public boolean equalsExceptToken(@Nullable AttributionSource o) {
        if (o == null) return false;
        return mAttributionSourceState.uid == o.mAttributionSourceState.uid
                && Objects.equals(mAttributionSourceState.packageName,
                        that.mAttributionSourceState.packageName)
                o.mAttributionSourceState.packageName)
                && Objects.equals(mAttributionSourceState.attributionTag,
                        that.mAttributionSourceState.attributionTag)
                o.mAttributionSourceState.attributionTag)
                && Objects.equals(mAttributionSourceState.token,
                        that.mAttributionSourceState.token)
                o.mAttributionSourceState.token)
                && Arrays.equals(mAttributionSourceState.renouncedPermissions,
                        that.mAttributionSourceState.renouncedPermissions)
                && Objects.equals(getNext(), that.getNext());
                o.mAttributionSourceState.renouncedPermissions)
                && Objects.equals(getNext(), o.getNext());
    }

    @Override
+13 −0
Original line number Diff line number Diff line
@@ -1468,6 +1468,13 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
     * <p>Only constrains auto-exposure (AE) algorithm, not
     * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and
     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.</p>
     * <p>To start a CaptureSession with a target FPS range different from the
     * capture request template's default value, the application
     * is strongly recommended to call
     * {@link SessionConfiguration#setSessionParameters }
     * with the target fps range before creating the capture session. The aeTargetFpsRange is
     * typically a session parameter. Specifying it at session creation time helps avoid
     * session reconfiguration delays in cases like 60fps or high speed recording.</p>
     * <p><b>Units</b>: Frames per second (FPS)</p>
     * <p><b>Range of valid values:</b><br>
     * Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}</p>
@@ -2140,6 +2147,12 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
     * {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} field will return
     * OFF if the recording output is not stabilized, or if there are no output
     * Surface types that can be stabilized.</p>
     * <p>The application is strongly recommended to call
     * {@link SessionConfiguration#setSessionParameters }
     * with the desired video stabilization mode before creating the capture session.
     * Video stabilization mode is a session parameter on many devices. Specifying
     * it at session creation time helps avoid reconfiguration delay caused by difference
     * between the default value and the first CaptureRequest.</p>
     * <p>If a camera device supports both this mode and OIS
     * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may
     * produce undesirable interaction, so it is recommended not to enable
+13 −0
Original line number Diff line number Diff line
@@ -887,6 +887,13 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
     * <p>Only constrains auto-exposure (AE) algorithm, not
     * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and
     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.</p>
     * <p>To start a CaptureSession with a target FPS range different from the
     * capture request template's default value, the application
     * is strongly recommended to call
     * {@link SessionConfiguration#setSessionParameters }
     * with the target fps range before creating the capture session. The aeTargetFpsRange is
     * typically a session parameter. Specifying it at session creation time helps avoid
     * session reconfiguration delays in cases like 60fps or high speed recording.</p>
     * <p><b>Units</b>: Frames per second (FPS)</p>
     * <p><b>Range of valid values:</b><br>
     * Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}</p>
@@ -2365,6 +2372,12 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
     * {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} field will return
     * OFF if the recording output is not stabilized, or if there are no output
     * Surface types that can be stabilized.</p>
     * <p>The application is strongly recommended to call
     * {@link SessionConfiguration#setSessionParameters }
     * with the desired video stabilization mode before creating the capture session.
     * Video stabilization mode is a session parameter on many devices. Specifying
     * it at session creation time helps avoid reconfiguration delay caused by difference
     * between the default value and the first CaptureRequest.</p>
     * <p>If a camera device supports both this mode and OIS
     * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may
     * produce undesirable interaction, so it is recommended not to enable
+3 −2
Original line number Diff line number Diff line
@@ -116,8 +116,9 @@ public final class AggregateBatteryConsumer extends BatteryConsumer {
     * Builder for DeviceBatteryConsumer.
     */
    public static final class Builder extends BaseBuilder<AggregateBatteryConsumer.Builder> {
        public Builder(BatteryConsumer.BatteryConsumerData data, int scope) {
            super(data, CONSUMER_TYPE_AGGREGATE);
        public Builder(BatteryConsumer.BatteryConsumerData data, int scope,
                double minConsumedPowerThreshold) {
            super(data, CONSUMER_TYPE_AGGREGATE, minConsumedPowerThreshold);
            data.putInt(COLUMN_INDEX_SCOPE, scope);
        }

+3 −2
Original line number Diff line number Diff line
@@ -795,11 +795,12 @@ public abstract class BatteryConsumer {
        protected final BatteryConsumer.BatteryConsumerData mData;
        protected final PowerComponents.Builder mPowerComponentsBuilder;

        public BaseBuilder(BatteryConsumer.BatteryConsumerData data, int consumerType) {
        public BaseBuilder(BatteryConsumer.BatteryConsumerData data, int consumerType,
                double minConsumedPowerThreshold) {
            mData = data;
            data.putLong(COLUMN_INDEX_BATTERY_CONSUMER_TYPE, consumerType);

            mPowerComponentsBuilder = new PowerComponents.Builder(data);
            mPowerComponentsBuilder = new PowerComponents.Builder(data, minConsumedPowerThreshold);
        }

        @Nullable
Loading