Merge "Fixes a bug where the user ends in freescroll state even for regular workspace mode." into ub-launcher3-master

This commit is contained in:
Mario Bertschler authored and Android (Google) Code Review committed 2016-12-29 23:33:01 +00:00
commit 83d40e0608
2 files changed
+20 -12

No files matched your search

+10 -12
View File
@@ -1370,8 +1370,12 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
dampedOverScroll(amount);
}
public void enableFreeScroll() {
/**
* return true if freescroll has been enabled, false otherwise
*/
public boolean enableFreeScroll() {
setEnableFreeScroll(true);
return true;
}
public void disableFreeScroll() {
@@ -2072,20 +2076,14 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
if (!mReorderingStarted) return;
mReorderingStarted = false;
// If we haven't flung-to-delete the current child, then we just animate the drag view
// back into position
final Runnable onCompleteRunnable = new Runnable() {
@Override
public void run() {
onEndReordering();
}
};
mPostReorderingPreZoomInRunnable = new Runnable() {
public void run() {
onCompleteRunnable.run();
// If we haven't flung-to-delete the current child,
// then we just animate the drag view back into position
onEndReordering();
enableFreeScroll();
};
}
};
mPostReorderingPreZoomInRemainingAnimationCount =