diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-09-11 20:31:32 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-09-11 20:31:32 +0000 |
| commit | ad324a3d7e61981dabc00aab83457b071f35fafd (patch) | |
| tree | 7ed93c64731acc204ecae5e1a1140665d0eb13c4 /core/java/android/app/Notification.java | |
| parent | 80743ffc075dc74310f8a12d63644a17d99fe8cd (diff) | |
| parent | d57e959e719c13ab842f7a92750d8079f4543fe3 (diff) | |
Merge "Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master" into stage-aosp-master
Diffstat (limited to 'core/java/android/app/Notification.java')
| -rw-r--r-- | core/java/android/app/Notification.java | 33 |
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 */ |
