summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ibrahim Yilmaz <iyz@google.com> 2025-01-27 18:56:18 +0000
committer Ibrahim Yilmaz <iyz@google.com> 2025-01-27 18:58:14 +0000
commit3a69a3b46b751d64ce86edccd9348fc486c20503 (patch)
treecc8ca5de630f4c21303af940cb691147c342f70a
parentab4eafb6358ce89446f671d919892eb9791bdfae (diff)
Ignore Contextual Actions for RONs
Bug: 380484116 Test: Post a RON with contextual actions and observe action is not shown. Flag: android.app.ui_rich_ongoing Change-Id: Ifa8f2eeaf2a78cffeca872005733074426870c1e
-rw-r--r--core/java/android/app/Notification.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 35308ee43dea..1b59394c562e 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -4421,8 +4421,7 @@ public class Notification implements Parcelable
* notification) out of the actions in this notification.
*/
public @NonNull List<Notification.Action> getContextualActions() {
- if (actions == null) return Collections.emptyList();
-
+ if (actions == null || isPromotedOngoing()) return Collections.emptyList();
List<Notification.Action> contextualActions = new ArrayList<>();
for (Notification.Action action : actions) {
if (action.isContextual()) {