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

Commit 462f2579 authored by Flavio Fiszman's avatar Flavio Fiszman
Browse files

Simplify onNotificationClear signature

Change-Id: Ib944418dea78fb090c70206c34519f9248a02c04
Test: NotifCollectionTest and NotificationManagerServiceTest
Bug: 172575678
parent eaeaf0ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ interface IStatusBarService
    void onNotificationError(String pkg, String tag, int id,
            int uid, int initialPid, String message, int userId);
    void onClearAllNotifications(int userId);
    void onNotificationClear(String pkg, String tag, int id, int userId, String key,
    void onNotificationClear(String pkg, int userId, String key,
            int dismissalSurface, int dismissalSentiment, in NotificationVisibility nv);
    void onNotificationVisibilityChanged( in NotificationVisibility[] newlyVisibleKeys,
            in NotificationVisibility[] noLongerVisibleKeys);
+0 −2
Original line number Diff line number Diff line
@@ -548,8 +548,6 @@ public class NotificationEntryManager implements
        try {
            mStatusBarService.onNotificationClear(
                    notification.getPackageName(),
                    notification.getTag(),
                    notification.getId(),
                    notification.getUser().getIdentifier(),
                    notification.getKey(),
                    dismissedByUserStats.dismissalSurface,
+0 −2
Original line number Diff line number Diff line
@@ -254,8 +254,6 @@ public class NotifCollection implements Dumpable {
                try {
                    mStatusBarService.onNotificationClear(
                            entry.getSbn().getPackageName(),
                            entry.getSbn().getTag(),
                            entry.getSbn().getId(),
                            entry.getSbn().getUser().getIdentifier(),
                            entry.getSbn().getKey(),
                            stats.dismissalSurface,
+0 −12
Original line number Diff line number Diff line
@@ -377,8 +377,6 @@ public class NotifCollectionTest extends SysuiTestCase {
        // THEN we send the dismissal to system server
        verify(mStatusBarService).onNotificationClear(
                notif2.sbn.getPackageName(),
                notif2.sbn.getTag(),
                88,
                notif2.sbn.getUser().getIdentifier(),
                notif2.sbn.getKey(),
                stats.dismissalSurface,
@@ -528,8 +526,6 @@ public class NotifCollectionTest extends SysuiTestCase {
        // THEN we never send the dismissal to system server
        verify(mStatusBarService, never()).onNotificationClear(
                notif.sbn.getPackageName(),
                notif.sbn.getTag(),
                47,
                notif.sbn.getUser().getIdentifier(),
                notif.sbn.getKey(),
                stats.dismissalSurface,
@@ -566,8 +562,6 @@ public class NotifCollectionTest extends SysuiTestCase {
        // THEN the notification is never sent to system server to dismiss
        verify(mStatusBarService, never()).onNotificationClear(
                eq(notif.sbn.getPackageName()),
                eq(notif.sbn.getTag()),
                eq(47),
                eq(notif.sbn.getUser().getIdentifier()),
                eq(notif.sbn.getKey()),
                anyInt(),
@@ -596,8 +590,6 @@ public class NotifCollectionTest extends SysuiTestCase {
        // THEN we send the dismissal to system server
        verify(mStatusBarService).onNotificationClear(
                eq(notif.sbn.getPackageName()),
                eq(notif.sbn.getTag()),
                eq(47),
                eq(notif.sbn.getUser().getIdentifier()),
                eq(notif.sbn.getKey()),
                anyInt(),
@@ -1125,8 +1117,6 @@ public class NotifCollectionTest extends SysuiTestCase {
        // THEN we send the dismissals to system server
        verify(mStatusBarService).onNotificationClear(
                notif1.sbn.getPackageName(),
                notif1.sbn.getTag(),
                47,
                notif1.sbn.getUser().getIdentifier(),
                notif1.sbn.getKey(),
                stats1.dismissalSurface,
@@ -1135,8 +1125,6 @@ public class NotifCollectionTest extends SysuiTestCase {

        verify(mStatusBarService).onNotificationClear(
                notif2.sbn.getPackageName(),
                notif2.sbn.getTag(),
                88,
                notif2.sbn.getUser().getIdentifier(),
                notif2.sbn.getKey(),
                stats2.dismissalSurface,
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ public interface NotificationDelegate {
    void onNotificationActionClick(int callingUid, int callingPid, String key, int actionIndex,
            Notification.Action action, NotificationVisibility nv, boolean generatedByAssistant);
    void onNotificationClear(int callingUid, int callingPid,
            String pkg, String tag, int id, int userId, String key,
            String pkg, int userId, String key,
            @NotificationStats.DismissalSurface int dismissalSurface,
            @NotificationStats.DismissalSentiment int dismissalSentiment,
            NotificationVisibility nv);
Loading