From 054019dbeafd33de4e39601e0f305926c15bad15 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Thu, 15 Apr 2010 16:28:40 -0400 Subject: [PATCH] Launcher2 performance: Don't sort apps in LauncherModel. AllApps2D and AllApps3D do their own sorting before display. Bug: 2562420 Change-Id: I77e3865b856a5123872bee3d8578d0596956cddd --- src/com/android/launcher2/AllAppsList.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/com/android/launcher2/AllAppsList.java b/src/com/android/launcher2/AllAppsList.java index 96d936948c..ee89e5aca3 100644 --- a/src/com/android/launcher2/AllAppsList.java +++ b/src/com/android/launcher2/AllAppsList.java @@ -57,17 +57,10 @@ class AllAppsList { /** * Add the supplied ApplicationInfo objects to the list, and enqueue it into the * list to broadcast when notify() is called. - * - * Postcondition: data and added are sorted in order of LauncherModel.APP_NAME_COMPARATOR. */ public void add(ApplicationInfo info) { - int pos = Collections.binarySearch(data, info, LauncherModel.APP_NAME_COMPARATOR); - if (pos < 0) pos = -1 - pos; - data.add(pos, info); - - pos = Collections.binarySearch(added, info, LauncherModel.APP_NAME_COMPARATOR); - if (pos < 0) pos = -1 - pos; - added.add(pos, info); + data.add(info); + added.add(info); } public void clear() {