am a1ae3c09: Merge "Fixing issue where smallest screen dim was not taking dpi into account." into ics-scoop
* commit 'a1ae3c0992c256671b8daf5101e8e2051e32686a':
Fixing issue where smallest screen dim was not taking dpi into account.
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 41e8a46..7ba3950 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -279,9 +279,11 @@
// landscape
TypedArray actionBarSizeTypedArray =
context.obtainStyledAttributes(new int[] { android.R.attr.actionBarSize });
+ DisplayMetrics displayMetrics = res.getDisplayMetrics();
final float actionBarHeight = actionBarSizeTypedArray.getDimension(0, 0f);
final float systemBarHeight = res.getDimension(R.dimen.status_bar_height);
- final float smallestScreenDim = res.getConfiguration().smallestScreenWidthDp;
+ final float smallestScreenDim = res.getConfiguration().smallestScreenWidthDp *
+ displayMetrics.density;
cellCountX = 1;
while (CellLayout.widthInPortrait(res, cellCountX + 1) <= smallestScreenDim) {