mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Move batch size to a resource.
This way we can figure out how many apps to send to the grid at a time even if the grid hasn't been instantiated yet. Bug: 2599979 Change-Id: I7960fe1adae6976555334422335f3a4b28d0675e
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<resources>
|
||||
<integer name="config_allAppsFadeInTime">700</integer>
|
||||
<integer name="config_allAppsFadeOutTime">700</integer>
|
||||
<integer name="config_allAppsBatchLoadDelay">150</integer>
|
||||
<integer name="config_allAppsBatchLoadDelay">0</integer>
|
||||
<integer name="config_allAppsBatchSize">0</integer>
|
||||
</resources>
|
||||
|
||||
@@ -50,8 +50,6 @@ public class AllApps2D
|
||||
|
||||
private static final String TAG = "Launcher.AllApps2D";
|
||||
|
||||
private static final int BATCH_SIZE = 6; // give us a few apps at a time
|
||||
|
||||
private Launcher mLauncher;
|
||||
private DragController mDragController;
|
||||
|
||||
@@ -302,10 +300,6 @@ public class AllApps2D
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int getAppBatchSize() {
|
||||
return BATCH_SIZE;
|
||||
}
|
||||
|
||||
public void dumpState() {
|
||||
ApplicationInfo.dumpApplicationInfoList(TAG, "mAllAppsList", mAllAppsList);
|
||||
}
|
||||
|
||||
@@ -73,8 +73,6 @@ public class AllApps3D extends RSSurfaceView
|
||||
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;
|
||||
|
||||
@@ -1600,10 +1598,6 @@ public class AllApps3D extends RSSurfaceView
|
||||
}
|
||||
}
|
||||
|
||||
public int getAppBatchSize() {
|
||||
return BATCH_SIZE;
|
||||
}
|
||||
|
||||
public void dumpState() {
|
||||
Log.d(TAG, "sRS=" + sRS);
|
||||
Log.d(TAG, "sRollo=" + sRollo);
|
||||
|
||||
@@ -41,8 +41,6 @@ public interface AllAppsView {
|
||||
|
||||
public void updateApps(ArrayList<ApplicationInfo> list);
|
||||
|
||||
public int getAppBatchSize();
|
||||
|
||||
public void dumpState();
|
||||
|
||||
public void surrender();
|
||||
|
||||
@@ -2095,7 +2095,7 @@ public final class Launcher extends Activity
|
||||
* Implementation of the method from LauncherModel.Callbacks.
|
||||
*/
|
||||
public int getAppBatchSize() {
|
||||
return mAllAppsGrid.getAppBatchSize();
|
||||
return getResources().getInteger(R.integer.config_allAppsBatchSize);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user