diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 96159568f8b4b..3c26738eca28c 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -92,7 +92,6 @@ import android.util.proto.ProtoOutputStream;
import android.view.ContextThemeWrapper;
import android.view.Gravity;
import android.view.View;
-import android.view.ViewGroup;
import android.view.contentcapture.ContentCaptureContext;
import android.widget.ProgressBar;
import android.widget.RemoteViews;
@@ -4970,8 +4969,6 @@ public class Notification implements Parcelable
contentView.setTextViewText(R.id.title, null);
contentView.setViewVisibility(R.id.text, View.GONE);
contentView.setTextViewText(R.id.text, null);
- contentView.setViewVisibility(R.id.text_line_1, View.GONE);
- contentView.setTextViewText(R.id.text_line_1, null);
}
/**
@@ -5001,6 +4998,7 @@ public class Notification implements Parcelable
TemplateBindResult result) {
p.headerless(resId == getBaseLayoutResource()
|| resId == getHeadsUpBaseLayoutResource());
+ p.allowTextWithProgress(resId == getBigBaseLayoutResource());
RemoteViews contentView = new BuilderRemoteViews(mContext.getApplicationInfo(), resId);
resetStandardTemplate(contentView);
@@ -5015,14 +5013,10 @@ public class Notification implements Parcelable
contentView.setViewVisibility(R.id.title, View.VISIBLE);
contentView.setTextViewText(R.id.title, processTextSpans(p.title));
setTextViewColorPrimary(contentView, R.id.title, p);
- contentView.setViewLayoutWidth(R.id.title, showProgress
- ? ViewGroup.LayoutParams.WRAP_CONTENT
- : ViewGroup.LayoutParams.MATCH_PARENT,
- TypedValue.COMPLEX_UNIT_PX);
}
- if (p.text != null && p.text.length() != 0) {
- int textId = showProgress ? com.android.internal.R.id.text_line_1
- : com.android.internal.R.id.text;
+ if (p.text != null && p.text.length() != 0
+ && (!showProgress || p.mAllowTextWithProgress)) {
+ int textId = com.android.internal.R.id.text;
contentView.setTextViewText(textId, processTextSpans(p.text));
setTextViewColorSecondary(contentView, textId, p);
contentView.setViewVisibility(textId, View.VISIBLE);
@@ -5746,7 +5740,6 @@ public class Notification implements Parcelable
}
if (mStyle != null) {
result = mStyle.makeBigContentView();
- hideLine1Text(result);
if (fullyCustomViewRequiresDecoration(true /* fromStyle */)) {
result = minimallyDecoratedBigContentView(result);
}
@@ -5829,12 +5822,6 @@ public class Notification implements Parcelable
return createContentView();
}
- private void hideLine1Text(RemoteViews result) {
- if (result != null) {
- result.setViewVisibility(R.id.text_line_1, View.GONE);
- }
- }
-
/**
* Adapt the Notification header if this view is used as an expanded view.
*
@@ -12070,6 +12057,7 @@ public class Notification implements Parcelable
boolean mHideSnoozeButton;
boolean mPromotePicture;
boolean mAllowActionIcons;
+ boolean mAllowTextWithProgress;
CharSequence title;
CharSequence text;
CharSequence headerTextSecondary;
@@ -12088,6 +12076,7 @@ public class Notification implements Parcelable
mHideSnoozeButton = false;
mPromotePicture = false;
mAllowActionIcons = false;
+ mAllowTextWithProgress = false;
title = null;
text = null;
summaryText = null;
@@ -12132,6 +12121,11 @@ public class Notification implements Parcelable
return this;
}
+ final StandardTemplateParams allowTextWithProgress(boolean allowTextWithProgress) {
+ this.mAllowTextWithProgress = allowTextWithProgress;
+ return this;
+ }
+
final StandardTemplateParams hideSnoozeButton(boolean hideSnoozeButton) {
this.mHideSnoozeButton = hideSnoozeButton;
return this;
diff --git a/core/res/res/layout/notification_template_material_big_media.xml b/core/res/res/layout/notification_template_material_big_media.xml
index bdd4430a7985f..b4cd170221b96 100644
--- a/core/res/res/layout/notification_template_material_big_media.xml
+++ b/core/res/res/layout/notification_template_material_big_media.xml
@@ -59,32 +59,21 @@
-
-
-
+
-->
-
-
-
+
-
-
-
+
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index cc32a697c0d19..e6326924560ec 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2902,7 +2902,6 @@
-