Loading core/java/android/app/Notification.java +3 −3 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ public class Notification implements Parcelable * <p> * Avoids spamming the system with overly large strings such as full e-mails. */ private static final int MAX_CHARSEQUENCE_LENGTH = 5 * 1024; private static final int MAX_CHARSEQUENCE_LENGTH = 1024; /** * Maximum entries of reply text that are accepted by Builder and friends. Loading Loading @@ -4973,7 +4973,7 @@ public class Notification implements Parcelable * consistent during re-posts of the notification. */ public Message(CharSequence text, long timestamp, CharSequence sender){ mText = text; mText = safeCharSequence(text); mTimestamp = timestamp; mSender = sender; } Loading Loading @@ -5055,7 +5055,7 @@ public class Notification implements Parcelable } bundle.putLong(KEY_TIMESTAMP, mTimestamp); if (mSender != null) { bundle.putCharSequence(KEY_SENDER, mSender); bundle.putCharSequence(KEY_SENDER, safeCharSequence(mSender)); } if (mDataMimeType != null) { bundle.putString(KEY_DATA_MIME_TYPE, mDataMimeType); Loading core/java/android/os/LocaleList.java +6 −5 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.icu.util.ULocale; import com.android.internal.annotations.GuardedBy; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; Loading Loading @@ -150,18 +151,18 @@ public final class LocaleList implements Parcelable { /** * Creates a new {@link LocaleList}. * * If two or more same locales are passed, the repeated locales will be dropped. * <p>For empty lists of {@link Locale} items it is better to use {@link #getEmptyLocaleList()}, * which returns a pre-constructed empty list.</p> * * @throws NullPointerException if any of the input locales is <code>null</code>. * @throws IllegalArgumentException if any of the input locales repeat. */ public LocaleList(@NonNull Locale... list) { if (list.length == 0) { mList = sEmptyList; mStringRepresentation = ""; } else { final Locale[] localeList = new Locale[list.length]; final ArrayList<Locale> localeList = new ArrayList<>(); final HashSet<Locale> seenLocales = new HashSet<Locale>(); final StringBuilder sb = new StringBuilder(); for (int i = 0; i < list.length; i++) { Loading @@ -169,10 +170,10 @@ public final class LocaleList implements Parcelable { if (l == null) { throw new NullPointerException("list[" + i + "] is null"); } else if (seenLocales.contains(l)) { throw new IllegalArgumentException("list[" + i + "] is a repetition"); // Dropping duplicated locale entries. } else { final Locale localeClone = (Locale) l.clone(); localeList[i] = localeClone; localeList.add(localeClone); sb.append(localeClone.toLanguageTag()); if (i < list.length - 1) { sb.append(','); Loading @@ -180,7 +181,7 @@ public final class LocaleList implements Parcelable { seenLocales.add(localeClone); } } mList = localeList; mList = localeList.toArray(new Locale[localeList.size()]); mStringRepresentation = sb.toString(); } } Loading services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1747,7 +1747,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { mContext, 0, Intent.createChooser(new Intent(Intent.ACTION_SET_WALLPAPER), mContext.getText(com.android.internal.R.string.chooser_wallpaper)), 0, null, new UserHandle(serviceUserId))); PendingIntent.FLAG_IMMUTABLE, null, new UserHandle(serviceUserId))); if (!mContext.bindServiceAsUser(intent, newConn, Context.BIND_AUTO_CREATE | Context.BIND_SHOWING_UI | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE, Loading Loading
core/java/android/app/Notification.java +3 −3 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ public class Notification implements Parcelable * <p> * Avoids spamming the system with overly large strings such as full e-mails. */ private static final int MAX_CHARSEQUENCE_LENGTH = 5 * 1024; private static final int MAX_CHARSEQUENCE_LENGTH = 1024; /** * Maximum entries of reply text that are accepted by Builder and friends. Loading Loading @@ -4973,7 +4973,7 @@ public class Notification implements Parcelable * consistent during re-posts of the notification. */ public Message(CharSequence text, long timestamp, CharSequence sender){ mText = text; mText = safeCharSequence(text); mTimestamp = timestamp; mSender = sender; } Loading Loading @@ -5055,7 +5055,7 @@ public class Notification implements Parcelable } bundle.putLong(KEY_TIMESTAMP, mTimestamp); if (mSender != null) { bundle.putCharSequence(KEY_SENDER, mSender); bundle.putCharSequence(KEY_SENDER, safeCharSequence(mSender)); } if (mDataMimeType != null) { bundle.putString(KEY_DATA_MIME_TYPE, mDataMimeType); Loading
core/java/android/os/LocaleList.java +6 −5 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.icu.util.ULocale; import com.android.internal.annotations.GuardedBy; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; Loading Loading @@ -150,18 +151,18 @@ public final class LocaleList implements Parcelable { /** * Creates a new {@link LocaleList}. * * If two or more same locales are passed, the repeated locales will be dropped. * <p>For empty lists of {@link Locale} items it is better to use {@link #getEmptyLocaleList()}, * which returns a pre-constructed empty list.</p> * * @throws NullPointerException if any of the input locales is <code>null</code>. * @throws IllegalArgumentException if any of the input locales repeat. */ public LocaleList(@NonNull Locale... list) { if (list.length == 0) { mList = sEmptyList; mStringRepresentation = ""; } else { final Locale[] localeList = new Locale[list.length]; final ArrayList<Locale> localeList = new ArrayList<>(); final HashSet<Locale> seenLocales = new HashSet<Locale>(); final StringBuilder sb = new StringBuilder(); for (int i = 0; i < list.length; i++) { Loading @@ -169,10 +170,10 @@ public final class LocaleList implements Parcelable { if (l == null) { throw new NullPointerException("list[" + i + "] is null"); } else if (seenLocales.contains(l)) { throw new IllegalArgumentException("list[" + i + "] is a repetition"); // Dropping duplicated locale entries. } else { final Locale localeClone = (Locale) l.clone(); localeList[i] = localeClone; localeList.add(localeClone); sb.append(localeClone.toLanguageTag()); if (i < list.length - 1) { sb.append(','); Loading @@ -180,7 +181,7 @@ public final class LocaleList implements Parcelable { seenLocales.add(localeClone); } } mList = localeList; mList = localeList.toArray(new Locale[localeList.size()]); mStringRepresentation = sb.toString(); } } Loading
services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1747,7 +1747,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { mContext, 0, Intent.createChooser(new Intent(Intent.ACTION_SET_WALLPAPER), mContext.getText(com.android.internal.R.string.chooser_wallpaper)), 0, null, new UserHandle(serviceUserId))); PendingIntent.FLAG_IMMUTABLE, null, new UserHandle(serviceUserId))); if (!mContext.bindServiceAsUser(intent, newConn, Context.BIND_AUTO_CREATE | Context.BIND_SHOWING_UI | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE, Loading