diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-05-28 18:35:48 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-05-30 10:16:30 -0400 |
commit | a620073f23dca7b4e2222c9585184ebb70fd18c5 (patch) | |
tree | 921fe49f915a58e33bf3aca08d7051905ef287fc /android | |
parent | b5c3813e544afe92768b36c14fd1976ddc8bc6d1 (diff) | |
download | mupdf-a620073f23dca7b4e2222c9585184ebb70fd18c5.tar.xz |
Android: Tweak towards api-7 compatibility
Avoid using event.getActionMasked.
Diffstat (limited to 'android')
-rw-r--r-- | android/src/com/artifex/mupdfdemo/MuPDFReaderView.java | 2 | ||||
-rw-r--r-- | android/src/com/artifex/mupdfdemo/ReaderView.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/android/src/com/artifex/mupdfdemo/MuPDFReaderView.java b/android/src/com/artifex/mupdfdemo/MuPDFReaderView.java index 0aa1909b..3a1b708a 100644 --- a/android/src/com/artifex/mupdfdemo/MuPDFReaderView.java +++ b/android/src/com/artifex/mupdfdemo/MuPDFReaderView.java @@ -148,7 +148,7 @@ public class MuPDFReaderView extends ReaderView { } public boolean onTouchEvent(MotionEvent event) { - if (event.getActionMasked() == MotionEvent.ACTION_DOWN) + if ((event.getAction() & event.ACTION_MASK) == MotionEvent.ACTION_DOWN) tapDisabled = false; return super.onTouchEvent(event); diff --git a/android/src/com/artifex/mupdfdemo/ReaderView.java b/android/src/com/artifex/mupdfdemo/ReaderView.java index 87f250ba..f4f54722 100644 --- a/android/src/com/artifex/mupdfdemo/ReaderView.java +++ b/android/src/com/artifex/mupdfdemo/ReaderView.java @@ -482,10 +482,10 @@ public class ReaderView if (!mScaling) mGestureDetector.onTouchEvent(event); - if (event.getActionMasked() == MotionEvent.ACTION_DOWN) { + if ((event.getAction() & event.ACTION_MASK) == MotionEvent.ACTION_DOWN) { mUserInteracting = true; } - if (event.getActionMasked() == MotionEvent.ACTION_UP) { + if ((event.getAction() & event.ACTION_MASK) == MotionEvent.ACTION_UP) { mScrollDisabled = false; mUserInteracting = false; |