summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ioana Alexandru <aioana@google.com> 2023-02-22 10:43:51 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-02-22 10:43:51 +0000
commite04f925d9ba85e542014ef83e07b04654229b18d (patch)
tree31441c9fccc6a4f969498a8b05c7e423f04054eb
parentd2f56c1438f2b5f3ca79c5fadfa8d5840784076b (diff)
parent5a8f7baeeb62ca44114c74987e531c3efef09cd4 (diff)
Merge "Rename summaryText where it's not actually related." into udc-dev
-rw-r--r--core/java/android/app/Notification.java68
1 files changed, 34 insertions, 34 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 87c77c2e8602..ef5cd9334be7 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -5249,17 +5249,17 @@ public class Notification implements Parcelable
boolean hasSecondLine = showProgress;
if (p.hasTitle()) {
contentView.setViewVisibility(p.mTitleViewId, View.VISIBLE);
- contentView.setTextViewText(p.mTitleViewId, processTextSpans(p.title));
+ contentView.setTextViewText(p.mTitleViewId, processTextSpans(p.mTitle));
setTextViewColorPrimary(contentView, p.mTitleViewId, p);
} else if (p.mTitleViewId != R.id.title) {
// This alternate title view ID is not cleared by resetStandardTemplate
contentView.setViewVisibility(p.mTitleViewId, View.GONE);
contentView.setTextViewText(p.mTitleViewId, null);
}
- if (p.text != null && p.text.length() != 0
+ if (p.mText != null && p.mText.length() != 0
&& (!showProgress || p.mAllowTextWithProgress)) {
contentView.setViewVisibility(p.mTextViewId, View.VISIBLE);
- contentView.setTextViewText(p.mTextViewId, processTextSpans(p.text));
+ contentView.setTextViewText(p.mTextViewId, processTextSpans(p.mText));
setTextViewColorSecondary(contentView, p.mTextViewId, p);
hasSecondLine = true;
} else if (p.mTextViewId != R.id.text) {
@@ -5533,20 +5533,20 @@ public class Notification implements Parcelable
if (p.mHideSubText) {
return false;
}
- CharSequence summaryText = p.summaryText;
- if (summaryText == null && mStyle != null && mStyle.mSummaryTextSet
+ CharSequence headerText = p.mSubText;
+ if (headerText == null && mStyle != null && mStyle.mSummaryTextSet
&& mStyle.hasSummaryInHeader()) {
- summaryText = mStyle.mSummaryText;
+ headerText = mStyle.mSummaryText;
}
- if (summaryText == null
+ if (headerText == null
&& mContext.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.N
&& mN.extras.getCharSequence(EXTRA_INFO_TEXT) != null) {
- summaryText = mN.extras.getCharSequence(EXTRA_INFO_TEXT);
+ headerText = mN.extras.getCharSequence(EXTRA_INFO_TEXT);
}
- if (!TextUtils.isEmpty(summaryText)) {
+ if (!TextUtils.isEmpty(headerText)) {
// TODO: Remove the span entirely to only have the string with propper formating.
contentView.setTextViewText(R.id.header_text, processTextSpans(
- processLegacyText(summaryText)));
+ processLegacyText(headerText)));
setTextViewColorSecondary(contentView, R.id.header_text, p);
contentView.setViewVisibility(R.id.header_text, View.VISIBLE);
if (hasTextToLeft) {
@@ -5566,9 +5566,9 @@ public class Notification implements Parcelable
if (p.mHideSubText) {
return false;
}
- if (!TextUtils.isEmpty(p.headerTextSecondary)) {
+ if (!TextUtils.isEmpty(p.mHeaderTextSecondary)) {
contentView.setTextViewText(R.id.header_text_secondary, processTextSpans(
- processLegacyText(p.headerTextSecondary)));
+ processLegacyText(p.mHeaderTextSecondary)));
setTextViewColorSecondary(contentView, R.id.header_text_secondary, p);
contentView.setViewVisibility(R.id.header_text_secondary, View.VISIBLE);
if (hasTextToLeft) {
@@ -6175,7 +6175,7 @@ public class Notification implements Parcelable
.viewType(StandardTemplateParams.VIEW_TYPE_MINIMIZED)
.highlightExpander(false)
.fillTextsFrom(this);
- if (!useRegularSubtext || TextUtils.isEmpty(p.summaryText)) {
+ if (!useRegularSubtext || TextUtils.isEmpty(p.mSubText)) {
p.summaryText(createSummaryText());
}
RemoteViews header = makeNotificationHeader(p);
@@ -7192,7 +7192,7 @@ public class Notification implements Parcelable
checkBuilder();
if (mBigContentTitle != null) {
- p.title = mBigContentTitle;
+ p.mTitle = mBigContentTitle;
}
return mBuilder.applyStandardTemplateWithActions(layoutId, p, result);
@@ -12455,10 +12455,10 @@ public class Notification implements Parcelable
boolean mAllowTextWithProgress;
int mTitleViewId;
int mTextViewId;
- CharSequence title;
- CharSequence text;
- CharSequence headerTextSecondary;
- CharSequence summaryText;
+ @Nullable CharSequence mTitle;
+ @Nullable CharSequence mText;
+ @Nullable CharSequence mHeaderTextSecondary;
+ @Nullable CharSequence mSubText;
int maxRemoteInputHistory = Style.MAX_REMOTE_INPUT_HISTORY_LINES;
boolean allowColorization = true;
boolean mHighlightExpander = false;
@@ -12480,10 +12480,10 @@ public class Notification implements Parcelable
mAllowTextWithProgress = false;
mTitleViewId = R.id.title;
mTextViewId = R.id.text;
- title = null;
- text = null;
- summaryText = null;
- headerTextSecondary = null;
+ mTitle = null;
+ mText = null;
+ mSubText = null;
+ mHeaderTextSecondary = null;
maxRemoteInputHistory = Style.MAX_REMOTE_INPUT_HISTORY_LINES;
allowColorization = true;
mHighlightExpander = false;
@@ -12491,7 +12491,7 @@ public class Notification implements Parcelable
}
final boolean hasTitle() {
- return !TextUtils.isEmpty(title) && !mHideTitle;
+ return !TextUtils.isEmpty(mTitle) && !mHideTitle;
}
final StandardTemplateParams viewType(int viewType) {
@@ -12564,23 +12564,23 @@ public class Notification implements Parcelable
return this;
}
- final StandardTemplateParams title(CharSequence title) {
- this.title = title;
+ final StandardTemplateParams title(@Nullable CharSequence title) {
+ this.mTitle = title;
return this;
}
- final StandardTemplateParams text(CharSequence text) {
- this.text = text;
+ final StandardTemplateParams text(@Nullable CharSequence text) {
+ this.mText = text;
return this;
}
- final StandardTemplateParams summaryText(CharSequence text) {
- this.summaryText = text;
+ final StandardTemplateParams summaryText(@Nullable CharSequence text) {
+ this.mSubText = text;
return this;
}
- final StandardTemplateParams headerTextSecondary(CharSequence text) {
- this.headerTextSecondary = text;
+ final StandardTemplateParams headerTextSecondary(@Nullable CharSequence text) {
+ this.mHeaderTextSecondary = text;
return this;
}
@@ -12607,9 +12607,9 @@ public class Notification implements Parcelable
final StandardTemplateParams fillTextsFrom(Builder b) {
Bundle extras = b.mN.extras;
- this.title = b.processLegacyText(extras.getCharSequence(EXTRA_TITLE));
- this.text = b.processLegacyText(extras.getCharSequence(EXTRA_TEXT));
- this.summaryText = extras.getCharSequence(EXTRA_SUB_TEXT);
+ this.mTitle = b.processLegacyText(extras.getCharSequence(EXTRA_TITLE));
+ this.mText = b.processLegacyText(extras.getCharSequence(EXTRA_TEXT));
+ this.mSubText = extras.getCharSequence(EXTRA_SUB_TEXT);
return this;
}