diff options
author | Michael Jurka <mikejurka@google.com> | 2011-01-17 17:07:00 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-17 17:07:00 -0800 |
commit | f4ffdc63d3d5b400174624f5bb8c41c7ed17265b (patch) | |
tree | a93ccabe3d911488b355220d40fc1c8b043f19e0 /src/com | |
parent | 70ac092d86ed31241bd9d7a7d053dc2e1336a2a3 (diff) | |
parent | 4ad24ba3c726bb9021d887c4c2300d345151ab0d (diff) | |
download | packages_apps_trebuchet-f4ffdc63d3d5b400174624f5bb8c41c7ed17265b.zip packages_apps_trebuchet-f4ffdc63d3d5b400174624f5bb8c41c7ed17265b.tar.gz packages_apps_trebuchet-f4ffdc63d3d5b400174624f5bb8c41c7ed17265b.tar.bz2 |
Merge "removed some more unnecessary code" into honeycomb
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 30 | ||||
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 5 |
2 files changed, 1 insertions, 34 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index cf82abb..af2f984 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -797,18 +797,6 @@ public class CellLayout extends ViewGroup implements Dimmable, VisibilityChanged } /** - * Check if the row 'y' is empty from columns 'left' to 'right', inclusive. - */ - private static boolean isRowEmpty(int y, int left, int right, boolean[][] occupied) { - for (int x = left; x <= right; x++) { - if (occupied[x][y]) { - return false; - } - } - return true; - } - - /** * Given a point, return the cell that strictly encloses that point * @param x X coordinate of the point * @param y Y coordinate of the point @@ -1042,24 +1030,6 @@ public class CellLayout extends ViewGroup implements Dimmable, VisibilityChanged } } - private boolean isVacantIgnoring( - int originX, int originY, int spanX, int spanY, View ignoreView) { - if (ignoreView != null) { - markCellsAsUnoccupiedForView(ignoreView); - } - boolean isVacant = true; - for (int i = 0; i < spanY; i++) { - if (!isRowEmpty(originY + i, originX, originX + spanX - 1, mOccupied)) { - isVacant = false; - break; - } - } - if (ignoreView != null) { - markCellsAsOccupiedForView(ignoreView); - } - return isVacant; - } - public View getChildAt(int x, int y) { final int count = getChildCount(); for (int i = 0; i < count; i++) { diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 8f9c67e..af7d080 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -599,9 +599,6 @@ public class Workspace extends SmoothPagedView } protected void setWallpaperDimension() { - WallpaperManager wpm = - (WallpaperManager) mLauncher.getSystemService(Context.WALLPAPER_SERVICE); - Display display = mLauncher.getWindowManager().getDefaultDisplay(); final int maxDim = Math.max(display.getWidth(), display.getHeight()); final int minDim = Math.min(display.getWidth(), display.getHeight()); @@ -610,7 +607,7 @@ public class Workspace extends SmoothPagedView // parallax effects mWallpaperWidth = (int) (maxDim * wallpaperTravelToScreenWidthRatio(maxDim, minDim)); mWallpaperHeight = (int)(maxDim * wallpaperTravelToScreenHeightRatio(maxDim, minDim)); - wpm.suggestDesiredDimensions(mWallpaperWidth, mWallpaperHeight); + mWallpaperManager.suggestDesiredDimensions(mWallpaperWidth, mWallpaperHeight); } public void setVerticalWallpaperOffset(WallpaperVerticalOffset offsetPosition) { |