Batch loading of icons for AllApps.
AllAppsList now maintains <data> and <added> in sorted
order, to amortize the cost of sorting the apps list over
multiple batches.
Launcher boosts thread priority on first launch, but we now
reduce thread priority to normal after the main workspace
has been drawn but before all apps are loaded.
Experimental feature: a short delay is introduced between
batches to help free up the CPU (as well as to show that we
are indeed batching apps).
Bug: 2562420
Change-Id: I2035ec3e819b4e7993a80c6d03bfad3914c95a7a
diff --git a/src/com/android/launcher2/AllApps3D.java b/src/com/android/launcher2/AllApps3D.java
index 35e4cfc..64c8c4c 100644
--- a/src/com/android/launcher2/AllApps3D.java
+++ b/src/com/android/launcher2/AllApps3D.java
@@ -73,6 +73,8 @@
private static final int SELECTION_ICONS = 1;
private static final int SELECTION_HOME = 2;
+ private static final int BATCH_SIZE = 0; // give us all the apps at once
+
private Launcher mLauncher;
private DragController mDragController;
@@ -1593,6 +1595,10 @@
}
}
+ public int getAppBatchSize() {
+ return BATCH_SIZE;
+ }
+
public void dumpState() {
Log.d(TAG, "sRS=" + sRS);
Log.d(TAG, "sRollo=" + sRollo);