diff options
author | Tony Wickham <twickham@google.com> | 2015-09-09 13:50:40 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2015-09-09 17:08:50 -0700 |
commit | 869306140d3bb8782040ed65d3ae0ba498c2de6c (patch) | |
tree | 1bf6de517ed0623e60b77f84344a00e4410f6053 /src/com/android/launcher3/PagedView.java | |
parent | 57a0e98a7d82b16b4f80798f530ce3cec53c79c2 (diff) | |
download | android_packages_apps_Trebuchet-869306140d3bb8782040ed65d3ae0ba498c2de6c.tar.gz android_packages_apps_Trebuchet-869306140d3bb8782040ed65d3ae0ba498c2de6c.tar.bz2 android_packages_apps_Trebuchet-869306140d3bb8782040ed65d3ae0ba498c2de6c.zip |
When placing a widget, go to a page with enough space.
The search for this page starts at the current one and
continues to the right (on LTR) until a page is found that
can accomodate the widget, taking possible resizing and
reordering into account.
Bug: 11338870
Change-Id: I2e9a310eb8f74024dca9150f55a525e1309c2f07
Diffstat (limited to 'src/com/android/launcher3/PagedView.java')
-rw-r--r-- | src/com/android/launcher3/PagedView.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 5f54e1d14..e4d644884 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -441,7 +441,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc Math.min(newPage, mTempVisiblePagesRange[1])); } // Ensure that it is clamped by the actual set of children in all cases - validatedPage = Math.max(0, Math.min(validatedPage, getPageCount() - 1)); + validatedPage = Utilities.boundInRange(validatedPage, 0, getPageCount() - 1); return validatedPage; } |