summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-05-14 13:15:29 -0700
committerWinson Chung <winsonc@google.com>2015-05-14 20:16:10 +0000
commitc2af7f9175d6ae1cb1ec599a6b9361f4434fa531 (patch)
treee3874bf20484b86687eaa8c4b27dfece7f9c6c8d
parenta0abe2661eaf4f8e66990ac68386e54260836183 (diff)
downloadandroid_packages_apps_Trebuchet-c2af7f9175d6ae1cb1ec599a6b9361f4434fa531.tar.gz
android_packages_apps_Trebuchet-c2af7f9175d6ae1cb1ec599a6b9361f4434fa531.tar.bz2
android_packages_apps_Trebuchet-c2af7f9175d6ae1cb1ec599a6b9361f4434fa531.zip
Limiting number of predictions on phones.
-rw-r--r--src/com/android/launcher3/DeviceProfile.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 890b9c9d8..fe6051dbb 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -443,7 +443,7 @@ public class DeviceProfile {
int availableAppsWidthPx = (containerWidth > 0) ? containerWidth : availableWidthPx;
int numAppsCols = (availableAppsWidthPx - appsViewLeftMarginPx) /
(allAppsCellWidthPx + 2 * allAppsCellPaddingPx);
- int numPredictiveAppCols = Math.max(numColumns, numAppsCols);
+ int numPredictiveAppCols = isPhone() ? 4 : numAppsCols;
if ((numAppsCols != appsViewNumCols) ||
(numPredictiveAppCols != appsViewNumPredictiveCols)) {
appsViewNumCols = numAppsCols;