diff options
author | Mady Mellor <madym@google.com> | 2015-07-15 16:34:34 -0700 |
---|---|---|
committer | Mady Mellor <madym@google.com> | 2015-08-21 11:18:14 -0700 |
commit | bb83520a620919a8f19472ba4426585d007d1aba (patch) | |
tree | a04345fb269ef3061564622f95343051dc04ab69 /WallpaperPicker/src/com/android | |
parent | 6f326e95a0033eecbb7370c95ce14fa508a57448 (diff) | |
download | android_packages_apps_Trebuchet-bb83520a620919a8f19472ba4426585d007d1aba.tar.gz android_packages_apps_Trebuchet-bb83520a620919a8f19472ba4426585d007d1aba.tar.bz2 android_packages_apps_Trebuchet-bb83520a620919a8f19472ba4426585d007d1aba.zip |
Refactor StylusEventHelper to provide onButtonPress/Release methods
This will enable an easier migration to the new M APIs for identifying
button presses from stylus / other tools.
Bug: 20430722
Change-Id: I41cfa6eff8d76bb83cf1bdaf6623ec1092ed554c
Diffstat (limited to 'WallpaperPicker/src/com/android')
-rw-r--r-- | WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java index e2c008b4b..ceb51aa1c 100644 --- a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java +++ b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java @@ -913,11 +913,12 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { v.setOnLongClickListener(mLongClickListener); // Enable stylus button to also trigger long click. - final StylusEventHelper stylusEventHelper = new StylusEventHelper(v); + final StylusEventHelper stylusEventHelper = + new StylusEventHelper(new SimpleOnStylusPressListener(v), v); v.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent event) { - return stylusEventHelper.checkAndPerformStylusEvent(event); + return stylusEventHelper.onMotionEvent(event); } }); } |