summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/notification
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-10-04 15:11:00 -0700
committerSunny Goyal <sunnygoyal@google.com>2018-10-08 14:52:39 -0700
commitefb7e84242e174f7bb1a994889742820d229935d (patch)
treecd2b22e3ec324ebb0f7589df0c21ea7e03c89064 /src/com/android/launcher3/notification
parentf307b6032e708ee22b6e477e6c81ba07eecd4d4f (diff)
downloadpackages_apps_Trebuchet-efb7e84242e174f7bb1a994889742820d229935d.tar.gz
packages_apps_Trebuchet-efb7e84242e174f7bb1a994889742820d229935d.tar.bz2
packages_apps_Trebuchet-efb7e84242e174f7bb1a994889742820d229935d.zip
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
Diffstat (limited to 'src/com/android/launcher3/notification')
-rw-r--r--src/com/android/launcher3/notification/NotificationListener.java3
1 files changed, 2 insertions, 1 deletions
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<StatusBarNotification> filterNotifications(
StatusBarNotification[] notifications) {
if (notifications == null) return null;
- Set<Integer> removedNotifications = new ArraySet<>();
+ IntSet removedNotifications = new IntSet();
for (int i = 0; i < notifications.length; i++) {
if (shouldBeFilteredOut(notifications[i])) {
removedNotifications.add(i);