diff options
Diffstat (limited to 'src/com/android/launcher3/AllAppsList.java')
-rw-r--r-- | src/com/android/launcher3/AllAppsList.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/com/android/launcher3/AllAppsList.java b/src/com/android/launcher3/AllAppsList.java index f9900e604..36d0ee78b 100644 --- a/src/com/android/launcher3/AllAppsList.java +++ b/src/com/android/launcher3/AllAppsList.java @@ -18,6 +18,7 @@ package com.android.launcher3; import android.content.ComponentName; import android.content.Context; + import com.android.launcher3.compat.LauncherActivityInfoCompat; import com.android.launcher3.compat.LauncherAppsCompat; import com.android.launcher3.compat.UserHandleCompat; @@ -96,10 +97,8 @@ class AllAppsList { final List<LauncherActivityInfoCompat> matches = launcherApps.getActivityList(packageName, user); - if (matches.size() > 0) { - for (LauncherActivityInfoCompat info : matches) { - add(new AppInfo(context, info, user, mIconCache, null)); - } + for (LauncherActivityInfoCompat info : matches) { + add(new AppInfo(context, info, user, mIconCache, null)); } } @@ -144,9 +143,7 @@ class AllAppsList { // Find enabled activities and add them to the adapter // Also updates existing activities with new labels/icons - int count = matches.size(); - for (int i = 0; i < count; i++) { - final LauncherActivityInfoCompat info = matches.get(i); + for (final LauncherActivityInfoCompat info : matches) { AppInfo applicationInfo = findApplicationInfoLocked( info.getComponentName().getPackageName(), user, info.getComponentName().getClassName()); |