diff options
author | Joe Onorato <joeo@android.com> | 2009-12-01 16:19:38 -0800 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2009-12-01 16:20:30 -0800 |
commit | b0c27f254a9929be208d5e04554f438076c833bc (patch) | |
tree | 0d271951fc2e888dade2c2d7e099555802b30043 /src/com/android/launcher2/LauncherModel.java | |
parent | eaa01f68f24d78b15275a0ee39bc2d6e53f6733e (diff) | |
download | android_packages_apps_Trebuchet-b0c27f254a9929be208d5e04554f438076c833bc.tar.gz android_packages_apps_Trebuchet-b0c27f254a9929be208d5e04554f438076c833bc.tar.bz2 android_packages_apps_Trebuchet-b0c27f254a9929be208d5e04554f438076c833bc.zip |
Bug 2290800 - Use a collator to sort the app labels.
SHAME ON ME for using String.compareTo().
Diffstat (limited to 'src/com/android/launcher2/LauncherModel.java')
-rw-r--r-- | src/com/android/launcher2/LauncherModel.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java index d9017dab6..97fa554c2 100644 --- a/src/com/android/launcher2/LauncherModel.java +++ b/src/com/android/launcher2/LauncherModel.java @@ -963,8 +963,8 @@ public class LauncherModel extends BroadcastReceiver { // This builds the icon bitmaps. mAllAppsList.add(AppInfoCache.cache(apps.get(i), context, bubble)); } - Collections.sort(mAllAppsList.data, sComparator); - Collections.sort(mAllAppsList.added, sComparator); + Collections.sort(mAllAppsList.data, APP_NAME_COMPARATOR); + Collections.sort(mAllAppsList.added, APP_NAME_COMPARATOR); if (DEBUG_LOADERS) { Log.d(TAG, "cached app icons in " + (SystemClock.uptimeMillis()-t) + "ms"); @@ -1220,7 +1220,7 @@ public class LauncherModel extends BroadcastReceiver { } private static final Collator sCollator = Collator.getInstance(); - private static final Comparator<ApplicationInfo> sComparator + public static final Comparator<ApplicationInfo> APP_NAME_COMPARATOR = new Comparator<ApplicationInfo>() { public final int compare(ApplicationInfo a, ApplicationInfo b) { return sCollator.compare(a.title.toString(), b.title.toString()); |