summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adrian Roos <roosa@google.com> 2017-05-02 18:54:40 -0700
committer Adrian Roos <roosa@google.com> 2017-05-02 19:17:30 -0700
commitb19b06b64c16b993d2701ae4ffb0374c16f196df (patch)
tree6958f39a0a9934e269220cddf96911f8bd39e24f
parent9870d0bef78949f0429de4f62532d98f2537c258 (diff)
Notification: Remove actions from public view
Change-Id: I9d95e2ea3ff89110f58f6d5585771ad301494e41 Test: Turn on "hide sensitive notifications on lockscreen", receive notification, make sure it has no actions Fixes: 37907366
-rw-r--r--core/java/android/app/Notification.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 602cccb1070d..9a5885bd920a 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -4230,6 +4230,8 @@ public class Notification implements Parcelable
mN.mLargeIcon = null;
Bitmap largeIconLegacy = mN.largeIcon;
mN.largeIcon = null;
+ ArrayList<Action> actions = mActions;
+ mActions = new ArrayList<>();
Bundle publicExtras = new Bundle();
publicExtras.putBoolean(EXTRA_SHOW_WHEN,
savedBundle.getBoolean(EXTRA_SHOW_WHEN));
@@ -4245,6 +4247,7 @@ public class Notification implements Parcelable
mN.extras = savedBundle;
mN.mLargeIcon = largeIcon;
mN.largeIcon = largeIconLegacy;
+ mActions = actions;
mStyle = style;
return view;
}