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

Commit 7d4b3a5f authored by Tony Mak's avatar Tony Mak
Browse files

Add onActionClicked in NotificationAssistantService

This is added to report clicks on actions buttons to NAS.

BUG: 119010281
Test: atest SystemUITests
Test: atest RemoteViewsTest
Test: atest NotificationManagerServiceTest
Test: Manual. Tapped on the action (both normal and contextual) and
      observed the log.

Change-Id: I381994737d8c3185d3fabf9b6c481fd01a89a634
parent d8a9db84
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5074,6 +5074,7 @@ package android.service.notification {
    ctor public NotificationAssistantService();
    method public final void adjustNotification(android.service.notification.Adjustment);
    method public final void adjustNotifications(java.util.List<android.service.notification.Adjustment>);
    method public void onActionClicked(java.lang.String, android.app.Notification.Action, int);
    method public final android.os.IBinder onBind(android.content.Intent);
    method public void onNotificationDirectReply(java.lang.String);
    method public android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
+1 −0
Original line number Diff line number Diff line
@@ -1155,6 +1155,7 @@ package android.service.notification {
    ctor public NotificationAssistantService();
    method public final void adjustNotification(android.service.notification.Adjustment);
    method public final void adjustNotifications(java.util.List<android.service.notification.Adjustment>);
    method public void onActionClicked(java.lang.String, android.app.Notification.Action, int);
    method public final android.os.IBinder onBind(android.content.Intent);
    method public void onNotificationDirectReply(java.lang.String);
    method public android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
+1 −0
Original line number Diff line number Diff line
@@ -17,3 +17,4 @@
package android.app;

parcelable Notification;
parcelable Notification.Action;
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -5434,6 +5434,8 @@ public class Notification implements Parcelable
                            ambient ? resolveAmbientColor() : resolveContrastColor());
                }
            }
            button.setIntTag(R.id.action0, R.id.notification_action_index_tag,
                    mActions.indexOf(action));
            return button;
        }

+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.service.notification;

import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationChannelGroup;
import android.content.pm.ParceledListSlice;
@@ -50,4 +51,5 @@ oneway interface INotificationListener
    void onNotificationExpansionChanged(String key, boolean userAction, boolean expanded);
    void onNotificationDirectReply(String key);
    void onSuggestedReplySent(String key, in CharSequence reply, int source);
    void onActionClicked(String key, in Notification.Action action, int source);
}
Loading