Merge "removed some more unnecessary code" into honeycomb
This commit is contained in:
committed by
Android (Google) Code Review
commit
f4ffdc63d3
@@ -796,18 +796,6 @@ public class CellLayout extends ViewGroup implements Dimmable, VisibilityChanged
|
|||||||
return (CellInfo) super.getTag();
|
return (CellInfo) super.getTag();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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
|
* Given a point, return the cell that strictly encloses that point
|
||||||
* @param x X coordinate of the point
|
* @param x X 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) {
|
public View getChildAt(int x, int y) {
|
||||||
final int count = getChildCount();
|
final int count = getChildCount();
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
|
|||||||
@@ -599,9 +599,6 @@ public class Workspace extends SmoothPagedView
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void setWallpaperDimension() {
|
protected void setWallpaperDimension() {
|
||||||
WallpaperManager wpm =
|
|
||||||
(WallpaperManager) mLauncher.getSystemService(Context.WALLPAPER_SERVICE);
|
|
||||||
|
|
||||||
Display display = mLauncher.getWindowManager().getDefaultDisplay();
|
Display display = mLauncher.getWindowManager().getDefaultDisplay();
|
||||||
final int maxDim = Math.max(display.getWidth(), display.getHeight());
|
final int maxDim = Math.max(display.getWidth(), display.getHeight());
|
||||||
final int minDim = Math.min(display.getWidth(), display.getHeight());
|
final int minDim = Math.min(display.getWidth(), display.getHeight());
|
||||||
@@ -610,7 +607,7 @@ public class Workspace extends SmoothPagedView
|
|||||||
// parallax effects
|
// parallax effects
|
||||||
mWallpaperWidth = (int) (maxDim * wallpaperTravelToScreenWidthRatio(maxDim, minDim));
|
mWallpaperWidth = (int) (maxDim * wallpaperTravelToScreenWidthRatio(maxDim, minDim));
|
||||||
mWallpaperHeight = (int)(maxDim * wallpaperTravelToScreenHeightRatio(maxDim, minDim));
|
mWallpaperHeight = (int)(maxDim * wallpaperTravelToScreenHeightRatio(maxDim, minDim));
|
||||||
wpm.suggestDesiredDimensions(mWallpaperWidth, mWallpaperHeight);
|
mWallpaperManager.suggestDesiredDimensions(mWallpaperWidth, mWallpaperHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVerticalWallpaperOffset(WallpaperVerticalOffset offsetPosition) {
|
public void setVerticalWallpaperOffset(WallpaperVerticalOffset offsetPosition) {
|
||||||
|
|||||||
Reference in New Issue
Block a user