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

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

Snap for 7750208 from 9197f62a to sc-qpr1-release

Change-Id: I37fd6562e31f0d5d9267130b671e55db0f10fd91
parents 205d4adf 9197f62a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2918,6 +2918,13 @@ public class DeviceIdleController extends SystemService
                            reasonCode, reason).sendToTarget();
                }
                reportTempWhitelistChangedLocked(uid, true);
            } else {
                // The uid is already temp allowlisted, only need to update AMS for temp allowlist
                // duration.
                if (mLocalActivityManager != null) {
                    mLocalActivityManager.updateDeviceIdleTempAllowlist(null, uid, true,
                            duration, tempAllowListType, reasonCode, reason, callingUid);
                }
            }
        }
        if (informWhitelistChanged) {
+2 −1
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@ public abstract class ActivityManagerInternal {
    /**
     * Update information about which app IDs are on the temp allowlist.
     * @param appids the updated list of appIds in temp allowlist.
     *               If null, it is to update only changingUid.
     * @param changingUid uid to add or remove to temp allowlist.
     * @param adding true to add to temp allowlist, false to remove from temp allowlist.
     * @param durationMs when adding is true, the duration to be in temp allowlist.
@@ -165,7 +166,7 @@ public abstract class ActivityManagerInternal {
     * @param callingUid the callingUid that setup this temp allowlist, only valid when param adding
     *                   is true.
     */
    public abstract void updateDeviceIdleTempAllowlist(int[] appids, int changingUid,
    public abstract void updateDeviceIdleTempAllowlist(@Nullable int[] appids, int changingUid,
            boolean adding, long durationMs, @TempAllowListType int type,
            @ReasonCode int reasonCode,
            @Nullable String reason, int callingUid);
+20 −11
Original line number Diff line number Diff line
@@ -6506,25 +6506,34 @@ public class Notification implements Parcelable

            if (mContext.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.N
                    && !styleDisplaysCustomViewInline()) {
                if (mN.contentView == null) {
                    mN.contentView = createContentView();
                RemoteViews newContentView = mN.contentView;
                RemoteViews newBigContentView = mN.bigContentView;
                RemoteViews newHeadsUpContentView = mN.headsUpContentView;
                if (newContentView == null) {
                    newContentView = createContentView();
                    mN.extras.putInt(EXTRA_REBUILD_CONTENT_VIEW_ACTION_COUNT,
                            mN.contentView.getSequenceNumber());
                            newContentView.getSequenceNumber());
                }
                if (mN.bigContentView == null) {
                    mN.bigContentView = createBigContentView();
                    if (mN.bigContentView != null) {
                if (newBigContentView == null) {
                    newBigContentView = createBigContentView();
                    if (newBigContentView != null) {
                        mN.extras.putInt(EXTRA_REBUILD_BIG_CONTENT_VIEW_ACTION_COUNT,
                                mN.bigContentView.getSequenceNumber());
                                newBigContentView.getSequenceNumber());
                    }
                }
                if (mN.headsUpContentView == null) {
                    mN.headsUpContentView = createHeadsUpContentView();
                    if (mN.headsUpContentView != null) {
                if (newHeadsUpContentView == null) {
                    newHeadsUpContentView = createHeadsUpContentView();
                    if (newHeadsUpContentView != null) {
                        mN.extras.putInt(EXTRA_REBUILD_HEADS_UP_CONTENT_VIEW_ACTION_COUNT,
                                mN.headsUpContentView.getSequenceNumber());
                                newHeadsUpContentView.getSequenceNumber());
                    }
                }
                // Don't set any of the content views until after they have all been generated,
                //  to avoid the generated .contentView triggering the logic which skips generating
                //  the .bigContentView.
                mN.contentView = newContentView;
                mN.bigContentView = newBigContentView;
                mN.headsUpContentView = newHeadsUpContentView;
            }

            if ((mN.defaults & DEFAULT_LIGHTS) != 0) {
+4 −0
Original line number Diff line number Diff line
@@ -5935,6 +5935,10 @@ public abstract class Context {
     * more general access to the URI's content provider then this check will
     * always fail.
     *
     * <strong>Note:</strong> On SDK Version {@link android.os.Build.VERSION_CODES#S},
     * calling this method from a secondary-user's context will incorrectly return
     * {@link PackageManager#PERMISSION_DENIED} for all {code uris}.
     *
     * @param uris The list of URIs that is being checked.
     * @param pid The process ID being checked against.  Must be &gt; 0.
     * @param uid The user ID being checked against.  A uid of 0 is the root
+10 −0
Original line number Diff line number Diff line
@@ -270,6 +270,16 @@ public final class BatteryUsageStats implements Parcelable {
        return mUserBatteryConsumers;
    }

    /**
     * Returns the names of custom power components in order, so the first name in the array
     * corresponds to the custom componentId
     * {@link BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID}.
     */
    @NonNull
    public String[] getCustomPowerComponentNames() {
        return mCustomPowerComponentNames;
    }

    /**
     * Returns an iterator for {@link android.os.BatteryStats.HistoryItem}'s.
     */
Loading