diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index e8c73dc9a076a..4e140a8d3f45d 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -3744,7 +3744,6 @@ public class Notification implements Parcelable private int mTextColorsAreForBackground = COLOR_INVALID; private int mPrimaryTextColor = COLOR_INVALID; private int mSecondaryTextColor = COLOR_INVALID; - private boolean mRebuildStyledRemoteViews; private boolean mTintActionButtons; private boolean mInNightMode; @@ -5812,8 +5811,7 @@ public class Notification implements Parcelable } private boolean useExistingRemoteView() { - return mStyle == null || (!mStyle.displayCustomViewInline() - && !mRebuildStyledRemoteViews); + return mStyle == null || !mStyle.displayCustomViewInline(); } /** @@ -6703,18 +6701,6 @@ public class Notification implements Parcelable && targetSdkVersion < Build.VERSION_CODES.O; } - /** - * Forces all styled remoteViews to be built from scratch and not use any cached - * RemoteViews. - * This is needed for legacy apps that are baking in their remoteviews into the - * notification. - * - * @hide - */ - public void setRebuildStyledRemoteViews(boolean rebuild) { - mRebuildStyledRemoteViews = rebuild; - } - /** * Get the text that should be displayed in the statusBar when heads upped. This is * usually just the app name, but may be different depending on the style. @@ -8393,27 +8379,6 @@ public class Notification implements Parcelable return true; } - private CharSequence createConversationTitleFromMessages() { - ArraySet names = new ArraySet<>(); - for (int i = 0; i < mMessages.size(); i++) { - Message m = mMessages.get(i); - Person sender = m.getSenderPerson(); - if (sender != null) { - names.add(sender.getName()); - } - } - SpannableStringBuilder title = new SpannableStringBuilder(); - int size = names.size(); - for (int i = 0; i < size; i++) { - CharSequence name = names.valueAt(i); - if (!TextUtils.isEmpty(title)) { - title.append(", "); - } - title.append(BidiFormatter.getInstance().unicodeWrap(name)); - } - return title; - } - /** * @hide */ @@ -8427,11 +8392,6 @@ public class Notification implements Parcelable return remoteViews; } - private static TextAppearanceSpan makeFontColorSpan(int color) { - return new TextAppearanceSpan(null, 0, 0, - ColorStateList.valueOf(color), null); - } - public static final class Message { /** @hide */ public static final String KEY_TEXT = "text"; @@ -9893,23 +9853,6 @@ public class Notification implements Parcelable // Comparison done for all custom RemoteViews, independent of style return false; } - - private RemoteViews buildIntoRemoteView(RemoteViews template, RemoteViews customContent, - boolean headerless) { - if (customContent != null) { - // Need to clone customContent before adding, because otherwise it can no longer be - // parceled independently of remoteViews. - customContent = customContent.clone(); - customContent.overrideTextColors(mBuilder.getPrimaryTextColor(mBuilder.mParams)); - if (headerless) { - template.removeFromParent(R.id.notification_top_line); - } - template.removeAllViews(R.id.notification_main_column); - template.addView(R.id.notification_main_column, customContent); - template.addFlags(RemoteViews.FLAG_REAPPLY_DISALLOWED); - } - return template; - } } /**