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

Commit 2baff48b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "API review correction: rename NAS.onActionClicked -> onActionInvoked."

parents cf136dd1 ced1d00d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5662,7 +5662,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 void onActionInvoked(java.lang.String, android.app.Notification.Action, int);
    method public final android.os.IBinder onBind(android.content.Intent);
    method public void onNotificationDirectReplied(java.lang.String);
    method public android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
+1 −1
Original line number Diff line number Diff line
@@ -1275,7 +1275,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 void onActionInvoked(java.lang.String, android.app.Notification.Action, int);
    method public final android.os.IBinder onBind(android.content.Intent);
    method public void onNotificationDirectReplied(java.lang.String);
    method public android.service.notification.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification);
+5 −5
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ public abstract class NotificationAssistantService extends NotificationListenerS
     * @param action the action that is just clicked
     * @param source the source that provided the action, e.g. SOURCE_FROM_APP
     */
    public void onActionClicked(@NonNull String key, @NonNull Notification.Action action,
    public void onActionInvoked(@NonNull String key, @NonNull Notification.Action action,
            @Source int source) {
    }

@@ -338,7 +338,7 @@ public abstract class NotificationAssistantService extends NotificationListenerS
            args.arg1 = key;
            args.arg2 = action;
            args.argi2 = source;
            mHandler.obtainMessage(MyHandler.MSG_ON_ACTION_CLICKED, args).sendToTarget();
            mHandler.obtainMessage(MyHandler.MSG_ON_ACTION_INVOKED, args).sendToTarget();
        }
    }

@@ -349,7 +349,7 @@ public abstract class NotificationAssistantService extends NotificationListenerS
        public static final int MSG_ON_NOTIFICATION_EXPANSION_CHANGED = 4;
        public static final int MSG_ON_NOTIFICATION_DIRECT_REPLY_SENT = 5;
        public static final int MSG_ON_SUGGESTED_REPLY_SENT = 6;
        public static final int MSG_ON_ACTION_CLICKED = 7;
        public static final int MSG_ON_ACTION_INVOKED = 7;

        public MyHandler(Looper looper) {
            super(looper, null, false);
@@ -419,13 +419,13 @@ public abstract class NotificationAssistantService extends NotificationListenerS
                    onSuggestedReplySent(key, reply, source);
                    break;
                }
                case MSG_ON_ACTION_CLICKED: {
                case MSG_ON_ACTION_INVOKED: {
                    SomeArgs args = (SomeArgs) msg.obj;
                    String key = (String) args.arg1;
                    Notification.Action action = (Notification.Action) args.arg2;
                    int source = args.argi2;
                    args.recycle();
                    onActionClicked(key, action, source);
                    onActionInvoked(key, action, source);
                    break;
                }
            }
+2 −2
Original line number Diff line number Diff line
@@ -382,11 +382,11 @@ public class Assistant extends NotificationAssistantService {
    }

    @Override
    public void onActionClicked(@NonNull String key, @NonNull Notification.Action action,
    public void onActionInvoked(@NonNull String key, @NonNull Notification.Action action,
            @Source int source) {
        if (DEBUG) {
            Log.d(TAG,
                    "onActionClicked() called with: key = [" + key + "], action = [" + action.title
                    "onActionInvoked() called with: key = [" + key + "], action = [" + action.title
                            + "], source = [" + source + "]");
        }
        mSmartActionsHelper.onActionClicked(key, action, source);