OSDN Git Service
(root)
/
android-x86
/
packages-apps-Launcher3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
448b0b5
)
Fix 3165989: Items dragged from All Apps don't appear
author
Patrick Dubroy
<dubroy@google.com>
Tue, 9 Nov 2010 23:23:28 +0000
(15:23 -0800)
committer
Patrick Dubroy
<dubroy@google.com>
Tue, 9 Nov 2010 23:23:44 +0000
(15:23 -0800)
src/com/android/launcher2/PagedView.java
patch
|
blob
|
history
diff --git
a/src/com/android/launcher2/PagedView.java
b/src/com/android/launcher2/PagedView.java
index
e9829fb
..
0622aae
100644
(file)
--- a/
src/com/android/launcher2/PagedView.java
+++ b/
src/com/android/launcher2/PagedView.java
@@
-248,8
+248,12
@@
public abstract class PagedView extends ViewGroup {
* 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);