Loading core/java/android/app/Notification.java +1 −58 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -5812,8 +5811,7 @@ public class Notification implements Parcelable } private boolean useExistingRemoteView() { return mStyle == null || (!mStyle.displayCustomViewInline() && !mRebuildStyledRemoteViews); return mStyle == null || !mStyle.displayCustomViewInline(); } /** Loading Loading @@ -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. Loading Loading @@ -8393,27 +8379,6 @@ public class Notification implements Parcelable return true; } private CharSequence createConversationTitleFromMessages() { ArraySet<CharSequence> 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 */ Loading @@ -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"; Loading Loading @@ -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; } } /** Loading Loading
core/java/android/app/Notification.java +1 −58 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -5812,8 +5811,7 @@ public class Notification implements Parcelable } private boolean useExistingRemoteView() { return mStyle == null || (!mStyle.displayCustomViewInline() && !mRebuildStyledRemoteViews); return mStyle == null || !mStyle.displayCustomViewInline(); } /** Loading Loading @@ -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. Loading Loading @@ -8393,27 +8379,6 @@ public class Notification implements Parcelable return true; } private CharSequence createConversationTitleFromMessages() { ArraySet<CharSequence> 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 */ Loading @@ -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"; Loading Loading @@ -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; } } /** Loading