summaryrefslogtreecommitdiff
path: root/core/java/android/app/Notification.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/app/Notification.java')
-rw-r--r--core/java/android/app/Notification.java33
1 files changed, 10 insertions, 23 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 789351e0d157..ceadd8510e44 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -3386,11 +3386,7 @@ public class Notification implements Parcelable
*/
private int mCachedContrastColor = COLOR_INVALID;
private int mCachedContrastColorIsFor = COLOR_INVALID;
- /**
- * Caches a ambient version of {@link #mCachedAmbientColorIsFor}.
- */
- private int mCachedAmbientColor = COLOR_INVALID;
- private int mCachedAmbientColorIsFor = COLOR_INVALID;
+
/**
* A neutral color color that can be used for icons.
*/
@@ -5441,26 +5437,14 @@ public class Notification implements Parcelable
/**
* Construct a RemoteViews for the display in public contexts like on the lockscreen.
*
+ * @param isLowPriority is this notification low priority
* @hide
*/
@UnsupportedAppUsage
- public RemoteViews makePublicContentView() {
- return makePublicView(false /* ambient */);
- }
-
- /**
- * Construct a RemoteViews for the display in public contexts like on the lockscreen.
- *
- * @hide
- */
- public RemoteViews makePublicAmbientNotification() {
- return makePublicView(true /* ambient */);
- }
-
- private RemoteViews makePublicView(boolean ambient) {
+ public RemoteViews makePublicContentView(boolean isLowPriority) {
if (mN.publicVersion != null) {
final Builder builder = recoverBuilder(mContext, mN.publicVersion);
- return ambient ? builder.makeAmbientNotification() : builder.createContentView();
+ return builder.createContentView();
}
Bundle savedBundle = mN.extras;
Style style = mStyle;
@@ -5484,7 +5468,11 @@ public class Notification implements Parcelable
}
mN.extras = publicExtras;
RemoteViews view;
- view = makeNotificationHeader();
+ StandardTemplateParams params = mParams.reset().fillTextsFrom(this);
+ if (isLowPriority) {
+ params.forceDefaultColor();
+ }
+ view = makeNotificationHeader(params);
view.setBoolean(R.id.notification_header, "setExpandOnlyOnButton", true);
mN.extras = savedBundle;
mN.mLargeIcon = largeIcon;
@@ -8118,8 +8106,7 @@ public class Notification implements Parcelable
*/
@Override
public RemoteViews makeHeadsUpContentView(boolean increasedHeight) {
- RemoteViews expanded = makeMediaBigContentView();
- return expanded != null ? expanded : makeMediaContentView();
+ return makeMediaContentView();
}
/** @hide */