summaryrefslogtreecommitdiff
path: root/src/com/android/launcher2/InstallShortcutReceiver.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2010-07-26 22:02:18 -0700
committerAdam Cohen <adamcohen@google.com>2010-08-04 11:03:47 -0700
commitd22015cd37ea6ef53762eca5be57daca123ff607 (patch)
treefcb6a85e600ec2a4f2dd377900a0c08eac6f5116 /src/com/android/launcher2/InstallShortcutReceiver.java
parent7ef4f752e1eee17389ca41791f83d4ac21714419 (diff)
downloadLauncher2-d22015cd37ea6ef53762eca5be57daca123ff607.tar.gz
Cleaning up grid size specification in Launcher
This commit eliminates the notion of in-place rotations and a bunch of associated complexities (including the notion of canonical coordinates). Further, the number of x and y cells per workspace screen is now being stored in a single location in the XML definition of Workspace. This fixes a couple bugs where incorrect values were being used. Finally, eliminated the notion of "shortAxis" and "longAxis" in terms of padding and cell count. These have been translated to corresponding x and y axis values. Change-Id: I30cfed66f82d739355b3f01730b28b6c0437989c
Diffstat (limited to 'src/com/android/launcher2/InstallShortcutReceiver.java')
-rw-r--r--src/com/android/launcher2/InstallShortcutReceiver.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher2/InstallShortcutReceiver.java b/src/com/android/launcher2/InstallShortcutReceiver.java
index 36380540..992bab15 100644
--- a/src/com/android/launcher2/InstallShortcutReceiver.java
+++ b/src/com/android/launcher2/InstallShortcutReceiver.java
@@ -84,8 +84,8 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
}
private static boolean findEmptyCell(Context context, int[] xy, int screen) {
- final int xCount = Launcher.NUMBER_CELLS_X;
- final int yCount = Launcher.NUMBER_CELLS_Y;
+ final int xCount = LauncherModel.getCellCountX();
+ final int yCount = LauncherModel.getCellCountY();
boolean[][] occupied = new boolean[xCount][yCount];
ArrayList<ItemInfo> items = LauncherModel.getItemsInLocalCoordinates(context);