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

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

Snap for 8977768 from 4fd8012b to tm-qpr1-release

Change-Id: I994b24ca58eafb0e0675f5a80e037fde9eac8444
parents df665cc8 4fd8012b
Loading
Loading
Loading
Loading
+16 −7
Original line number Diff line number Diff line
@@ -124,8 +124,13 @@ public final class NotificationChannel implements Parcelable {
    /**
     * The maximum length for text fields in a NotificationChannel. Fields will be truncated at this
     * limit.
     * @hide
     */
    private static final int MAX_TEXT_LENGTH = 1000;
    public static final int MAX_TEXT_LENGTH = 1000;
    /**
     * @hide
     */
    public static final int MAX_VIBRATION_LENGTH = 1000;

    private static final String TAG_CHANNEL = "channel";
    private static final String ATT_NAME = "name";
@@ -283,17 +288,17 @@ public final class NotificationChannel implements Parcelable {
     */
    protected NotificationChannel(Parcel in) {
        if (in.readByte() != 0) {
            mId = in.readString();
            mId = getTrimmedString(in.readString());
        } else {
            mId = null;
        }
        if (in.readByte() != 0) {
            mName = in.readString();
            mName = getTrimmedString(in.readString());
        } else {
            mName = null;
        }
        if (in.readByte() != 0) {
            mDesc = in.readString();
            mDesc = getTrimmedString(in.readString());
        } else {
            mDesc = null;
        }
@@ -302,18 +307,22 @@ public final class NotificationChannel implements Parcelable {
        mLockscreenVisibility = in.readInt();
        if (in.readByte() != 0) {
            mSound = Uri.CREATOR.createFromParcel(in);
            mSound = Uri.parse(getTrimmedString(mSound.toString()));
        } else {
            mSound = null;
        }
        mLights = in.readByte() != 0;
        mVibration = in.createLongArray();
        if (mVibration != null && mVibration.length > MAX_VIBRATION_LENGTH) {
            mVibration = Arrays.copyOf(mVibration, MAX_VIBRATION_LENGTH);
        }
        mUserLockedFields = in.readInt();
        mFgServiceShown = in.readByte() != 0;
        mVibrationEnabled = in.readByte() != 0;
        mShowBadge = in.readByte() != 0;
        mDeleted = in.readByte() != 0;
        if (in.readByte() != 0) {
            mGroup = in.readString();
            mGroup = getTrimmedString(in.readString());
        } else {
            mGroup = null;
        }
@@ -322,8 +331,8 @@ public final class NotificationChannel implements Parcelable {
        mBlockableSystem = in.readBoolean();
        mAllowBubbles = in.readInt();
        mOriginalImportance = in.readInt();
        mParentId = in.readString();
        mConversationId = in.readString();
        mParentId = getTrimmedString(in.readString());
        mConversationId = getTrimmedString(in.readString());
        mDemoted = in.readBoolean();
        mImportantConvo = in.readBoolean();
        mDeletedTime = in.readLong();
+14 −17
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Intent;
import android.content.pm.ParceledListSlice;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -43,8 +44,9 @@ public final class NotificationChannelGroup implements Parcelable {
    /**
     * The maximum length for text fields in a NotificationChannelGroup. Fields will be truncated at
     * this limit.
     * @hide
     */
    private static final int MAX_TEXT_LENGTH = 1000;
    public static final int MAX_TEXT_LENGTH = 1000;

    private static final String TAG_GROUP = "channelGroup";
    private static final String ATT_NAME = "name";
@@ -66,7 +68,7 @@ public final class NotificationChannelGroup implements Parcelable {
    private CharSequence mName;
    private String mDescription;
    private boolean mBlocked;
    private List<NotificationChannel> mChannels = new ArrayList<>();
    private ParceledListSlice<NotificationChannel> mChannels;
    // Bitwise representation of fields that have been changed by the user
    private int mUserLockedFields;

@@ -90,17 +92,19 @@ public final class NotificationChannelGroup implements Parcelable {
     */
    protected NotificationChannelGroup(Parcel in) {
        if (in.readByte() != 0) {
            mId = in.readString();
            mId = getTrimmedString(in.readString());
        } else {
            mId = null;
        }
        mName = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
        mName = getTrimmedString(mName.toString());
        if (in.readByte() != 0) {
            mDescription = in.readString();
            mDescription = getTrimmedString(in.readString());
        } else {
            mDescription = null;
        }
        in.readParcelableList(mChannels, NotificationChannel.class.getClassLoader(), android.app.NotificationChannel.class);
        mChannels = in.readParcelable(
                NotificationChannelGroup.class.getClassLoader(), ParceledListSlice.class);
        mBlocked = in.readBoolean();
        mUserLockedFields = in.readInt();
    }
@@ -120,14 +124,14 @@ public final class NotificationChannelGroup implements Parcelable {
        } else {
            dest.writeByte((byte) 0);
        }
        TextUtils.writeToParcel(mName, dest, flags);
        TextUtils.writeToParcel(mName.toString(), dest, flags);
        if (mDescription != null) {
            dest.writeByte((byte) 1);
            dest.writeString(mDescription);
        } else {
            dest.writeByte((byte) 0);
        }
        dest.writeParcelableList(mChannels, flags);
        dest.writeParcelable(mChannels, flags);
        dest.writeBoolean(mBlocked);
        dest.writeInt(mUserLockedFields);
    }
@@ -157,7 +161,7 @@ public final class NotificationChannelGroup implements Parcelable {
     * Returns the list of channels that belong to this group
     */
    public List<NotificationChannel> getChannels() {
        return mChannels;
        return mChannels == null ? new ArrayList<>() : mChannels.getList();
    }

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

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

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

    /**
@@ -334,7 +331,7 @@ public final class NotificationChannelGroup implements Parcelable {
        proto.write(NotificationChannelGroupProto.NAME, mName.toString());
        proto.write(NotificationChannelGroupProto.DESCRIPTION, mDescription);
        proto.write(NotificationChannelGroupProto.IS_BLOCKED, mBlocked);
        for (NotificationChannel channel : mChannels) {
        for (NotificationChannel channel : mChannels.getList()) {
            channel.dumpDebug(proto, NotificationChannelGroupProto.CHANNELS);
        }
        proto.end(token);
+7 −0
Original line number Diff line number Diff line
@@ -10590,6 +10590,13 @@ public final class Settings {
        @Readable
        public static final String MEDIA_CONTROLS_RESUME = "qs_media_resumption";
        /**
         * Whether to enable media controls on lock screen.
         * When enabled, media controls will appear on lock screen.
         * @hide
         */
        public static final String MEDIA_CONTROLS_LOCK_SCREEN = "media_controls_lock_screen";
        /**
         * Controls whether contextual suggestions can be shown in the media controls.
         * @hide
+2 −0
Original line number Diff line number Diff line
@@ -6323,6 +6323,8 @@ ul.</string>
    <string name="vdm_camera_access_denied" product="default">Can’t access the phone’s camera from your <xliff:g id="device" example="Chromebook">%1$s</xliff:g></string>
    <!-- Error message indicating the camera cannot be accessed when running on a virtual device. [CHAR LIMIT=NONE] -->
    <string name="vdm_camera_access_denied" product="tablet">Can’t access the tablet’s camera from your <xliff:g id="device" example="Chromebook">%1$s</xliff:g></string>
    <!-- Error message indicating the user cannot access secure content when running on a virtual device. [CHAR LIMIT=NONE] -->
    <string name="vdm_secure_window">This can’t be accessed while streaming. Try on your phone instead.</string>

    <!-- Title for preference of the system default locale. [CHAR LIMIT=50]-->
    <string name="system_locale_title">System default</string>
+1 −0
Original line number Diff line number Diff line
@@ -4795,6 +4795,7 @@

  <!-- For VirtualDeviceManager -->
  <java-symbol type="string" name="vdm_camera_access_denied" />
  <java-symbol type="string" name="vdm_secure_window" />

  <java-symbol type="color" name="camera_privacy_light_day"/>
  <java-symbol type="color" name="camera_privacy_light_night"/>
Loading