am 4051b53e: am 6b165fa8: am 0ea74f13: Merge "Limit AllApps insets to certain device configurations. (Bug 11451335)" into jb-ub-now-kermit
* commit '4051b53ee65d5f3e07f87fcd901601f58c817400':
Limit AllApps insets to certain device configurations. (Bug 11451335)
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index b84dbaf..511b718 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -716,7 +716,8 @@
paddingTB = Math.min(paddingTB, (int)((paddingLR + paddingTB) * 0.75f));
int maxAllAppsWidth = (allAppsNumCols * (allAppsCellWidthPx + 2 * paddingLR));
int gridPaddingLR = (availableWidthPx - maxAllAppsWidth) / 2;
- if (gridPaddingLR > (allAppsCellWidthPx / 4)) {
+ // Only adjust the side paddings on landscape phones, or tablets
+ if ((isTablet() || isLandscape) && gridPaddingLR > (allAppsCellWidthPx / 4)) {
padding.left = padding.right = gridPaddingLR;
}
// The icons are centered, so we can't just offset by the page indicator height