summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2010-04-19 14:47:18 -0400
committerDaniel Sandler <dsandler@android.com>2010-04-19 14:47:18 -0400
commitcbe7f20ad7d042bdad893aca9295a4b00aef7f54 (patch)
treea677de7a6a3ae334877f9db19e974df070bf0966 /src
parent9ecd07d636f75d5775b59c9a87ddc342b7a361d0 (diff)
downloadpackages_apps_trebuchet-cbe7f20ad7d042bdad893aca9295a4b00aef7f54.zip
packages_apps_trebuchet-cbe7f20ad7d042bdad893aca9295a4b00aef7f54.tar.gz
packages_apps_trebuchet-cbe7f20ad7d042bdad893aca9295a4b00aef7f54.tar.bz2
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
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/AllApps2D.java6
-rw-r--r--src/com/android/launcher2/AllApps3D.java6
-rw-r--r--src/com/android/launcher2/AllAppsView.java2
-rw-r--r--src/com/android/launcher2/Launcher.java2
4 files changed, 1 insertions, 15 deletions
diff --git a/src/com/android/launcher2/AllApps2D.java b/src/com/android/launcher2/AllApps2D.java
index eb7cd83..90c87fb 100644
--- a/src/com/android/launcher2/AllApps2D.java
+++ b/src/com/android/launcher2/AllApps2D.java
@@ -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);
}
diff --git a/src/com/android/launcher2/AllApps3D.java b/src/com/android/launcher2/AllApps3D.java
index be3b114..9c3b3e4 100644
--- a/src/com/android/launcher2/AllApps3D.java
+++ b/src/com/android/launcher2/AllApps3D.java
@@ -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);
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 8888737..877c075 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -41,8 +41,6 @@ public interface AllAppsView {
public void updateApps(ArrayList<ApplicationInfo> list);
- public int getAppBatchSize();
-
public void dumpState();
public void surrender();
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 5cfcac2..3522199 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -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);
}
/**