summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2019-07-23 18:44:07 -0700
committerSelim Cinek <cinek@google.com>2019-07-23 18:44:07 -0700
commitabcc201afb105d57d234e6fdd88b2e77ceed7707 (patch)
tree82629a172a58493ae20262364cf1e9e3f6ce9d3c /core/java
parent2738aa3f79041f8be9183dcc35c9e0220f6829d8 (diff)
Not asking for the password when dragging down and bypass
Instead we'll just keep them in there looking like locked notifications. Fixes: 138225058 Test: add notifications, enable dynamic privacy, drag down Change-Id: Ica49035ba3fe655c145f81be962817ddd294c48d
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/Notification.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index f66448f518c8..ceadd8510e44 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -5437,10 +5437,11 @@ 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() {
+ public RemoteViews makePublicContentView(boolean isLowPriority) {
if (mN.publicVersion != null) {
final Builder builder = recoverBuilder(mContext, mN.publicVersion);
return builder.createContentView();
@@ -5467,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;