Fix 3165989: Items dragged from All Apps don't appear
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index e9829fb..0622aae 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -248,8 +248,12 @@
* Sets the current page.
*/
void setCurrentPage(int currentPage) {
- if (!mScroller.isFinished()) mScroller.abortAnimation();
- if (getChildCount() == 0) return;
+ if (!mScroller.isFinished()) {
+ mScroller.abortAnimation();
+ }
+ if (getChildCount() == 0 || currentPage == mCurrentPage) {
+ return;
+ }
mCurrentPage = Math.max(0, Math.min(currentPage, getPageCount() - 1));
int newX = getChildOffset(mCurrentPage) - getRelativeChildOffset(mCurrentPage);