summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Brabham <optedoblivion@cyngn.com>2015-09-16 20:54:05 (GMT)
committerMartin Brabham <optedoblivion@cyngn.com>2015-09-16 21:54:40 (GMT)
commite13df0dd3a2e0efe70c7e0bdbd3464f5abab8921 (patch)
treef80ce8abb76849e46bebd545ac5f18db36351696
parentfb2b30bf479dc85cd9b50d4b4fe7cd3c6a60c5e6 (diff)
downloadandroid_packages_apps_Trebuchet-e13df0dd3a2e0efe70c7e0bdbd3464f5abab8921.zip
android_packages_apps_Trebuchet-e13df0dd3a2e0efe70c7e0bdbd3464f5abab8921.tar.gz
android_packages_apps_Trebuchet-e13df0dd3a2e0efe70c7e0bdbd3464f5abab8921.tar.bz2
Ensure spans do not fall below minimum spans.
Change-Id: I2a8546d17f8446000a75bb568c842dbae74f7e4e Ticket-Id: HAM-389
-rw-r--r--src/com/android/launcher3/LauncherModel.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 91fe50a..81a6ff4 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -2980,6 +2980,9 @@ public class LauncherModel extends BroadcastReceiver
N = appWidgets.size();
for (int i = 0; i < N; i++) {
final LauncherAppWidgetInfo widget = appWidgets.get(i);
+ // Need to ensure the spans are sane (e.g. not below min spans)
+ widget.spanX = Math.max(widget.spanX, widget.minSpanX);
+ widget.spanY = Math.max(widget.spanY, widget.minSpanY);
final Runnable r = new Runnable() {
public void run() {
Callbacks callbacks = tryGetCallbacks(oldCallbacks);