Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b817d15d authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

Ignore RemoteInput actions for RONs

Bug: 380484116
Test: Post a RON with remote input and observe action is not shown.
Flag: android.app.ui_rich_ongoing
Change-Id: I4edf58fa606b34acd0a6c41d538e9a557062bcbd
parent a1d171f1
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -4393,6 +4393,9 @@ public class Notification implements Parcelable
     */
    @Nullable
    public Pair<RemoteInput, Action> findRemoteInputActionPair(boolean requiresFreeform) {
        if (isPromotedOngoing()) {
            return null;
        }
        if (actions == null) {
            return null;
        }
@@ -6454,6 +6457,11 @@ public class Notification implements Parcelable
            if (mActions == null) return Collections.emptyList();
            List<Notification.Action> standardActions = new ArrayList<>();
            for (Notification.Action action : mActions) {
                // Actions with RemoteInput are ignored for RONs.
                if (mN.isPromotedOngoing()
                        && hasValidRemoteInput(action)) {
                    continue;
                }
                if (!action.isContextual()) {
                    standardActions.add(action);
                }