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

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

Snap for 8862780 from 9f6624c3 to tm-qpr1-release

Change-Id: I9f75c8fd9798f9073f14a7a0bd34594d413f2fdb
parents 445969db 9f6624c3
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -2895,7 +2895,11 @@ public class AlarmManagerService extends SystemService {
                } else {
                } else {
                    needsPermission = false;
                    needsPermission = false;
                    lowerQuota = allowWhileIdle;
                    lowerQuota = allowWhileIdle;
                    idleOptions = allowWhileIdle ? mOptsWithFgs.toBundle() : null;
                    idleOptions = (allowWhileIdle || (alarmClock != null))
                            // This avoids exceptions on existing alarms when the app upgrades to
                            // target S. Note that FGS from pre-S apps isn't restricted anyway.
                            ? mOptsWithFgs.toBundle()
                            : null;
                    if (exact) {
                    if (exact) {
                        exactAllowReason = EXACT_ALLOW_REASON_COMPAT;
                        exactAllowReason = EXACT_ALLOW_REASON_COMPAT;
                    }
                    }
+15 −0
Original line number Original line Diff line number Diff line
@@ -34,6 +34,7 @@ import android.util.Slog;
import android.util.proto.ProtoOutputStream;
import android.util.proto.ProtoOutputStream;


import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.server.JobSchedulerBackgroundThread;
import com.android.server.JobSchedulerBackgroundThread;
import com.android.server.LocalServices;
import com.android.server.LocalServices;
import com.android.server.job.JobSchedulerService;
import com.android.server.job.JobSchedulerService;
@@ -100,6 +101,10 @@ public final class BatteryController extends RestrictingController {
    @Override
    @Override
    @GuardedBy("mLock")
    @GuardedBy("mLock")
    public void prepareForExecutionLocked(JobStatus jobStatus) {
    public void prepareForExecutionLocked(JobStatus jobStatus) {
        if (!jobStatus.hasPowerConstraint()) {
            // Ignore all jobs the controller wouldn't be tracking.
            return;
        }
        if (DEBUG) {
        if (DEBUG) {
            Slog.d(TAG, "Prepping for " + jobStatus.toShortString());
            Slog.d(TAG, "Prepping for " + jobStatus.toShortString());
        }
        }
@@ -259,6 +264,16 @@ public final class BatteryController extends RestrictingController {
        }
        }
    }
    }


    @VisibleForTesting
    ArraySet<JobStatus> getTrackedJobs() {
        return mTrackedTasks;
    }

    @VisibleForTesting
    ArraySet<JobStatus> getTopStartedJobs() {
        return mTopStartedJobs;
    }

    @Override
    @Override
    public void dumpControllerStateLocked(IndentingPrintWriter pw,
    public void dumpControllerStateLocked(IndentingPrintWriter pw,
            Predicate<JobStatus> predicate) {
            Predicate<JobStatus> predicate) {
+8 −13
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.content.Intent;
import android.content.pm.ParceledListSlice;
import android.os.Parcel;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;
import android.text.TextUtils;
import android.text.TextUtils;
@@ -66,7 +67,7 @@ public final class NotificationChannelGroup implements Parcelable {
    private CharSequence mName;
    private CharSequence mName;
    private String mDescription;
    private String mDescription;
    private boolean mBlocked;
    private boolean mBlocked;
    private List<NotificationChannel> mChannels = new ArrayList<>();
    private ParceledListSlice<NotificationChannel> mChannels;
    // Bitwise representation of fields that have been changed by the user
    // Bitwise representation of fields that have been changed by the user
    private int mUserLockedFields;
    private int mUserLockedFields;


@@ -100,7 +101,8 @@ public final class NotificationChannelGroup implements Parcelable {
        } else {
        } else {
            mDescription = null;
            mDescription = null;
        }
        }
        in.readParcelableList(mChannels, NotificationChannel.class.getClassLoader(), android.app.NotificationChannel.class);
        mChannels = in.readParcelable(
                NotificationChannelGroup.class.getClassLoader(), ParceledListSlice.class);
        mBlocked = in.readBoolean();
        mBlocked = in.readBoolean();
        mUserLockedFields = in.readInt();
        mUserLockedFields = in.readInt();
    }
    }
@@ -127,7 +129,7 @@ public final class NotificationChannelGroup implements Parcelable {
        } else {
        } else {
            dest.writeByte((byte) 0);
            dest.writeByte((byte) 0);
        }
        }
        dest.writeParcelableList(mChannels, flags);
        dest.writeParcelable(mChannels, flags);
        dest.writeBoolean(mBlocked);
        dest.writeBoolean(mBlocked);
        dest.writeInt(mUserLockedFields);
        dest.writeInt(mUserLockedFields);
    }
    }
@@ -157,7 +159,7 @@ public final class NotificationChannelGroup implements Parcelable {
     * Returns the list of channels that belong to this group
     * Returns the list of channels that belong to this group
     */
     */
    public List<NotificationChannel> getChannels() {
    public List<NotificationChannel> getChannels() {
        return mChannels;
        return mChannels == null ? new ArrayList<>() : mChannels.getList();
    }
    }


    /**
    /**
@@ -188,18 +190,11 @@ public final class NotificationChannelGroup implements Parcelable {
        mBlocked = blocked;
        mBlocked = blocked;
    }
    }


    /**
     * @hide
     */
    public void addChannel(NotificationChannel channel) {
        mChannels.add(channel);
    }

    /**
    /**
     * @hide
     * @hide
     */
     */
    public void setChannels(List<NotificationChannel> channels) {
    public void setChannels(List<NotificationChannel> channels) {
        mChannels = channels;
        mChannels = new ParceledListSlice<>(channels);
    }
    }


    /**
    /**
@@ -334,7 +329,7 @@ public final class NotificationChannelGroup implements Parcelable {
        proto.write(NotificationChannelGroupProto.NAME, mName.toString());
        proto.write(NotificationChannelGroupProto.NAME, mName.toString());
        proto.write(NotificationChannelGroupProto.DESCRIPTION, mDescription);
        proto.write(NotificationChannelGroupProto.DESCRIPTION, mDescription);
        proto.write(NotificationChannelGroupProto.IS_BLOCKED, mBlocked);
        proto.write(NotificationChannelGroupProto.IS_BLOCKED, mBlocked);
        for (NotificationChannel channel : mChannels) {
        for (NotificationChannel channel : mChannels.getList()) {
            channel.dumpDebug(proto, NotificationChannelGroupProto.CHANNELS);
            channel.dumpDebug(proto, NotificationChannelGroupProto.CHANNELS);
        }
        }
        proto.end(token);
        proto.end(token);
+16 −4
Original line number Original line Diff line number Diff line
@@ -26,6 +26,10 @@ import static android.hardware.camera2.marshal.MarshalHelpers.getPrimitiveTypeCl


import java.lang.reflect.Array;
import java.lang.reflect.Array;
import java.nio.ByteBuffer;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.LongBuffer;
import java.util.ArrayList;
import java.util.ArrayList;


/**
/**
@@ -51,28 +55,36 @@ public class MarshalQueryableArray<T> implements MarshalQueryable<T> {
                return new PrimitiveArrayFiller() {
                return new PrimitiveArrayFiller() {
                      @Override
                      @Override
                      public void fillArray(Object arr, int size, ByteBuffer buffer) {
                      public void fillArray(Object arr, int size, ByteBuffer buffer) {
                          buffer.asIntBuffer().get(int[].class.cast(arr), 0, size);
                          IntBuffer ib = buffer.asIntBuffer().get(int[].class.cast(arr), 0, size);
                          // Update buffer position since the IntBuffer has independent position.
                          buffer.position(buffer.position() + ib.position() * Integer.BYTES);
                      }
                      }
                };
                };
            } else if (componentType == float.class) {
            } else if (componentType == float.class) {
                return new PrimitiveArrayFiller() {
                return new PrimitiveArrayFiller() {
                      @Override
                      @Override
                      public void fillArray(Object arr, int size, ByteBuffer buffer) {
                      public void fillArray(Object arr, int size, ByteBuffer buffer) {
                          FloatBuffer fb =
                                  buffer.asFloatBuffer().get(float[].class.cast(arr), 0, size);
                                  buffer.asFloatBuffer().get(float[].class.cast(arr), 0, size);
                          buffer.position(buffer.position() + fb.position() * Float.BYTES);
                      }
                      }
                };
                };
            } else if (componentType == long.class) {
            } else if (componentType == long.class) {
                return new PrimitiveArrayFiller() {
                return new PrimitiveArrayFiller() {
                      @Override
                      @Override
                      public void fillArray(Object arr, int size, ByteBuffer buffer) {
                      public void fillArray(Object arr, int size, ByteBuffer buffer) {
                          LongBuffer lb =
                                  buffer.asLongBuffer().get(long[].class.cast(arr), 0, size);
                                  buffer.asLongBuffer().get(long[].class.cast(arr), 0, size);
                          buffer.position(buffer.position() + lb.position() * Long.BYTES);
                      }
                      }
                };
                };
            } else if (componentType == double.class) {
            } else if (componentType == double.class) {
                return new PrimitiveArrayFiller() {
                return new PrimitiveArrayFiller() {
                      @Override
                      @Override
                      public void fillArray(Object arr, int size, ByteBuffer buffer) {
                      public void fillArray(Object arr, int size, ByteBuffer buffer) {
                          DoubleBuffer db =
                                  buffer.asDoubleBuffer().get(double[].class.cast(arr), 0, size);
                                  buffer.asDoubleBuffer().get(double[].class.cast(arr), 0, size);
                          buffer.position(buffer.position() + db.position() * Double.BYTES);
                      }
                      }
                };
                };
            } else if (componentType == byte.class) {
            } else if (componentType == byte.class) {
+7 −1
Original line number Original line Diff line number Diff line
@@ -88,6 +88,11 @@ public class FeatureFlagUtils {
     */
     */
    public static final String SETTINGS_GUEST_MODE_UX_CHANGES = "settings_guest_mode_ux_changes";
    public static final String SETTINGS_GUEST_MODE_UX_CHANGES = "settings_guest_mode_ux_changes";


    /** Support Clear Calling feature.
     *  @hide
     */
    public static final String SETTINGS_ENABLE_CLEAR_CALLING = "settings_enable_clear_calling";

    private static final Map<String, String> DEFAULT_FLAGS;
    private static final Map<String, String> DEFAULT_FLAGS;


    static {
    static {
@@ -116,6 +121,7 @@ public class FeatureFlagUtils {
        DEFAULT_FLAGS.put(SETTINGS_APP_ALLOW_DARK_THEME_ACTIVATION_AT_BEDTIME, "true");
        DEFAULT_FLAGS.put(SETTINGS_APP_ALLOW_DARK_THEME_ACTIVATION_AT_BEDTIME, "true");
        DEFAULT_FLAGS.put(SETTINGS_HIDE_SECOND_LAYER_PAGE_NAVIGATE_UP_BUTTON_IN_TWO_PANE, "true");
        DEFAULT_FLAGS.put(SETTINGS_HIDE_SECOND_LAYER_PAGE_NAVIGATE_UP_BUTTON_IN_TWO_PANE, "true");
        DEFAULT_FLAGS.put(SETTINGS_GUEST_MODE_UX_CHANGES, "true");
        DEFAULT_FLAGS.put(SETTINGS_GUEST_MODE_UX_CHANGES, "true");
        DEFAULT_FLAGS.put(SETTINGS_ENABLE_CLEAR_CALLING, "false");
    }
    }


    private static final Set<String> PERSISTENT_FLAGS;
    private static final Set<String> PERSISTENT_FLAGS;
Loading