diff options
author | Winson Chung <winsonc@google.com> | 2012-06-06 16:17:04 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-06-06 16:17:04 -0700 |
commit | 478244409e15594ceaa7426a6a23cc805db0b1fc (patch) | |
tree | 078917028e2c0fa70394e9444733a1c6d4c253cc /src/com/android/launcher2/PagedView.java | |
parent | 5766032503a4ace048e69d6540a46134a858cbb9 (diff) | |
parent | bfeac0681b63091731c853fdafa3206642449a9d (diff) | |
download | android_packages_apps_Trebuchet-478244409e15594ceaa7426a6a23cc805db0b1fc.tar.gz android_packages_apps_Trebuchet-478244409e15594ceaa7426a6a23cc805db0b1fc.tar.bz2 android_packages_apps_Trebuchet-478244409e15594ceaa7426a6a23cc805db0b1fc.zip |
Merge "Synchronizing on the new-apps list before modifying it. (Bug 6621553)" into jb-dev
Diffstat (limited to 'src/com/android/launcher2/PagedView.java')
-rw-r--r-- | src/com/android/launcher2/PagedView.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java index c8202642a..19f6a62a7 100644 --- a/src/com/android/launcher2/PagedView.java +++ b/src/com/android/launcher2/PagedView.java @@ -234,6 +234,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc mDirtyPageContent.ensureCapacity(32); mScroller = new Scroller(getContext(), new ScrollInterpolator()); mCurrentPage = 0; + if (this instanceof AppsCustomizePagedView) Log.d(TAG, "6549598 init() mCurrentPage: " + mCurrentPage); mCenterPagesVertically = true; final ViewConfiguration configuration = ViewConfiguration.get(getContext()); @@ -317,7 +318,9 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc return; } + mCurrentPage = Math.max(0, Math.min(currentPage, getPageCount() - 1)); + if (this instanceof AppsCustomizePagedView) Log.d(TAG, "6549598 setCurrentPage mCurrentPage: " + mCurrentPage); updateCurrentPageScroll(); updateScrollingIndicator(); notifyPageSwitchListener(); |