Skip to content

Commit cde8aae

Browse files
committed
Fix crash in legacy notification construction path.
Bug: 6293584 Change-Id: I8c1c5162a2e9e3ebc5a6d3fed045c6c6a64b9bfd
1 parent 5ab92c0 commit cde8aae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/java/android/app/Notification.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,7 @@ public Notification[] newArray(int size)
809809
@Deprecated
810810
public void setLatestEventInfo(Context context,
811811
CharSequence contentTitle, CharSequence contentText, PendingIntent contentIntent) {
812+
// TODO: rewrite this to use Builder
812813
RemoteViews contentView = new RemoteViews(context.getPackageName(),
813814
R.layout.notification_template_base);
814815
if (this.icon != 0) {
@@ -821,6 +822,7 @@ public void setLatestEventInfo(Context context,
821822
contentView.setTextViewText(R.id.text, contentText);
822823
}
823824
if (this.when != 0) {
825+
contentView.setViewVisibility(R.id.time, View.VISIBLE);
824826
contentView.setLong(R.id.time, "setTime", when);
825827
}
826828

0 commit comments

Comments
 (0)