diff options
author | Sagar Dhawan <sdhawan@codeaurora.org> | 2015-07-14 11:27:41 -0700 |
---|---|---|
committer | jrizzoli <joey@cyanogenmoditalia.it> | 2015-08-28 13:15:46 +0200 |
commit | a4c552d858fb45c7205ea190380ad4c82393b051 (patch) | |
tree | ade4da49e33a412d8d16caec18279f9e9b1a32fd /src/com/android/browser/EdgeSwipeController.java | |
parent | 4a2c894ffeafeb7d7ae9f804d77bfd6e301f3696 (diff) | |
download | android_packages_apps_Gello-a4c552d858fb45c7205ea190380ad4c82393b051.tar.gz android_packages_apps_Gello-a4c552d858fb45c7205ea190380ad4c82393b051.tar.bz2 android_packages_apps_Gello-a4c552d858fb45c7205ea190380ad4c82393b051.zip |
Fix Edge Navigation gray bitmap position
Sometimes the gray bitmap would be requested for the
wrong page.
This fix ensures that only the last active page will go gray
when sliding.
Change-Id: Ie5380829d5a76c33ad65d6e1e5b0d1ac3ea3b840
Diffstat (limited to 'src/com/android/browser/EdgeSwipeController.java')
-rw-r--r-- | src/com/android/browser/EdgeSwipeController.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/browser/EdgeSwipeController.java b/src/com/android/browser/EdgeSwipeController.java index fe991e80..1f7eb488 100644 --- a/src/com/android/browser/EdgeSwipeController.java +++ b/src/com/android/browser/EdgeSwipeController.java @@ -216,6 +216,22 @@ public class EdgeSwipeController extends ViewDragHelper.Callback { } cancel(); + } else if(mState == ViewDragHelper.STATE_DRAGGING) { + if (mGrayBM) { + return; + } + switch (mFromEdge) { + case ViewDragHelper.EDGE_LEFT: + mView.setSlidingViewBitmap( + getGrayscale(getSnapshotOrFavicon(pageIndex))); + mGrayBM = true; + break; + case ViewDragHelper.EDGE_RIGHT: + mView.setStationaryViewBitmap( + getGrayscale(getSnapshotOrFavicon(pageIndex))); + mGrayBM = true; + break; + } } else { if (mGrayBM) { return; |