summaryrefslogtreecommitdiffstats
path: root/src/com
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/com
parent9ecd07d636f75d5775b59c9a87ddc342b7a361d0 (diff)
downloadandroid_packages_apps_Trebuchet-cbe7f20ad7d042bdad893aca9295a4b00aef7f54.tar.gz
android_packages_apps_Trebuchet-cbe7f20ad7d042bdad893aca9295a4b00aef7f54.tar.bz2
android_packages_apps_Trebuchet-cbe7f20ad7d042bdad893aca9295a4b00aef7f54.zip
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/com')
-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 eb7cd8333..90c87fb18 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 be3b11472..9c3b3e4c7 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 8888737d2..877c07577 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 5cfcac287..352219902 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);
}
/**