Continued low-priority group implementation
Adapting the low-priority group implementation
according to spec. Expanding a group takes 2 taps now.
Test: add low-priority group observe behavior
Change-Id: Ic563a8fe0e71df746b9b548adc8d1698940b1a83
Fixes: 35125708
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 812daf8..e8ddc41 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -4040,15 +4040,23 @@
}
/**
- * Construct a RemoteViews for the final notification header only
+ * Construct a RemoteViews for the final notification header only. This will not be
+ * colorized.
*
* @hide
*/
public RemoteViews makeNotificationHeader() {
+ Boolean colorized = (Boolean) mN.extras.get(EXTRA_COLORIZED);
+ mN.extras.putBoolean(EXTRA_COLORIZED, false);
RemoteViews header = new BuilderRemoteViews(mContext.getApplicationInfo(),
R.layout.notification_template_header);
resetNotificationHeader(header);
bindNotificationHeader(header, false /* ambient */);
+ if (colorized != null) {
+ mN.extras.putBoolean(EXTRA_COLORIZED, colorized);
+ } else {
+ mN.extras.remove(EXTRA_COLORIZED);
+ }
return header;
}
@@ -4167,8 +4175,6 @@
mN.extras.putCharSequence(EXTRA_SUB_TEXT, newSummary);
}
}
- Boolean colorized = (Boolean) mN.extras.get(EXTRA_COLORIZED);
- mN.extras.putBoolean(EXTRA_COLORIZED, false);
RemoteViews header = makeNotificationHeader();
@@ -4177,11 +4183,6 @@
} else {
mN.extras.remove(EXTRA_SUB_TEXT);
}
- if (colorized != null) {
- mN.extras.putBoolean(EXTRA_COLORIZED, colorized);
- } else {
- mN.extras.remove(EXTRA_COLORIZED);
- }
mN.color = color;
return header;
}