summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanesh M <daneshm90@gmail.com>2013-11-06 21:03:43 -0800
committerDanesh M <daneshm90@gmail.com>2013-11-06 21:03:43 -0800
commitdf1f03be4c262f30ca09ec729ca11d67edfbc7ec (patch)
treea8520cdadb21d4d6fb1fbbf4394020d1b7200eac
parent4506c81c6e62f4c1957f880506001efd2b78a6b0 (diff)
downloadandroid_packages_apps_Trebuchet-df1f03be4c262f30ca09ec729ca11d67edfbc7ec.tar.gz
android_packages_apps_Trebuchet-df1f03be4c262f30ca09ec729ca11d67edfbc7ec.tar.bz2
android_packages_apps_Trebuchet-df1f03be4c262f30ca09ec729ca11d67edfbc7ec.zip
Trebuchet : Default workspace init fix
Preload receiver might be invoked by setup wizard prior to workspace being initialized in which case, the instance fields we're interested in don't populate. This patchset addresses that, by directly querying the values rather than relying on them to be instantiated. Change-Id: I5be2e04022244dbe429632d6baae118c02c1419f
-rw-r--r--src/com/cyanogenmod/trebuchet/LauncherProvider.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/cyanogenmod/trebuchet/LauncherProvider.java b/src/com/cyanogenmod/trebuchet/LauncherProvider.java
index 196e08da5..d7b17d279 100644
--- a/src/com/cyanogenmod/trebuchet/LauncherProvider.java
+++ b/src/com/cyanogenmod/trebuchet/LauncherProvider.java
@@ -616,11 +616,13 @@ public class LauncherProvider extends ContentProvider {
final int depth = parser.getDepth();
LauncherApplication app = ((LauncherApplication) mContext);
+ int cellCountX = app.getResources().getInteger(R.integer.target_cell_count_x);
+ int cellCountY = app.getResources().getInteger(R.integer.target_cell_count_y);
+ int hotseatCellCount = app.getResources().getInteger(R.integer.hotseat_cell_count);
final ItemInfo occupied[][][] =
new ItemInfo[Launcher.MAX_SCREEN_COUNT][Math.max(
- LauncherModel.getWorkspaceCellCountX(), LauncherModel.getHotseatCellCount())]
- [Math.max(LauncherModel.getWorkspaceCellCountX(),
- LauncherModel.getHotseatCellCount())];
+ cellCountX, hotseatCellCount)]
+ [Math.max(cellCountY, hotseatCellCount)];
int type;
while (((type = parser.next()) != XmlPullParser.END_TAG ||