From efb7e84242e174f7bb1a994889742820d229935d Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 4 Oct 2018 15:11:00 -0700 Subject: Converting long item IDs to int > Items ids were already being typecasted to int when being bound on the UI > Using a consistent type allow better use of platform data-structures > Adding IntArray and IntSet as a replacement for various Collection classes Change-Id: Id3c650ed2420c2bfca3bd7671d2b705b56112371 --- src/com/android/launcher3/notification/NotificationListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/com/android/launcher3/notification') diff --git a/src/com/android/launcher3/notification/NotificationListener.java b/src/com/android/launcher3/notification/NotificationListener.java index 4c85c8b17..68cf7dec0 100644 --- a/src/com/android/launcher3/notification/NotificationListener.java +++ b/src/com/android/launcher3/notification/NotificationListener.java @@ -33,6 +33,7 @@ import android.util.Log; import android.util.Pair; import com.android.launcher3.LauncherModel; +import com.android.launcher3.util.IntSet; import com.android.launcher3.util.PackageUserKey; import com.android.launcher3.util.SettingsObserver; @@ -346,7 +347,7 @@ public class NotificationListener extends NotificationListenerService { private List filterNotifications( StatusBarNotification[] notifications) { if (notifications == null) return null; - Set removedNotifications = new ArraySet<>(); + IntSet removedNotifications = new IntSet(); for (int i = 0; i < notifications.length; i++) { if (shouldBeFilteredOut(notifications[i])) { removedNotifications.add(i); -- cgit v1.2.3