Merge "Remove unused code" into sc-dev
This commit is contained in:
@@ -3744,7 +3744,6 @@ public class Notification implements Parcelable
|
|||||||
private int mTextColorsAreForBackground = COLOR_INVALID;
|
private int mTextColorsAreForBackground = COLOR_INVALID;
|
||||||
private int mPrimaryTextColor = COLOR_INVALID;
|
private int mPrimaryTextColor = COLOR_INVALID;
|
||||||
private int mSecondaryTextColor = COLOR_INVALID;
|
private int mSecondaryTextColor = COLOR_INVALID;
|
||||||
private boolean mRebuildStyledRemoteViews;
|
|
||||||
|
|
||||||
private boolean mTintActionButtons;
|
private boolean mTintActionButtons;
|
||||||
private boolean mInNightMode;
|
private boolean mInNightMode;
|
||||||
@@ -5812,8 +5811,7 @@ public class Notification implements Parcelable
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean useExistingRemoteView() {
|
private boolean useExistingRemoteView() {
|
||||||
return mStyle == null || (!mStyle.displayCustomViewInline()
|
return mStyle == null || !mStyle.displayCustomViewInline();
|
||||||
&& !mRebuildStyledRemoteViews);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6703,18 +6701,6 @@ public class Notification implements Parcelable
|
|||||||
&& targetSdkVersion < Build.VERSION_CODES.O;
|
&& 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
|
* 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.
|
* usually just the app name, but may be different depending on the style.
|
||||||
@@ -8393,27 +8379,6 @@ public class Notification implements Parcelable
|
|||||||
return true;
|
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
|
* @hide
|
||||||
*/
|
*/
|
||||||
@@ -8427,11 +8392,6 @@ public class Notification implements Parcelable
|
|||||||
return remoteViews;
|
return remoteViews;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TextAppearanceSpan makeFontColorSpan(int color) {
|
|
||||||
return new TextAppearanceSpan(null, 0, 0,
|
|
||||||
ColorStateList.valueOf(color), null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final class Message {
|
public static final class Message {
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public static final String KEY_TEXT = "text";
|
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
|
// Comparison done for all custom RemoteViews, independent of style
|
||||||
return false;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user