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 /src/com/android/launcher3/LauncherAppWidgetHostView.java | |
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 'src/com/android/launcher3/LauncherAppWidgetHostView.java')
-rw-r--r-- | src/com/android/launcher3/LauncherAppWidgetHostView.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/LauncherAppWidgetHostView.java b/src/com/android/launcher3/LauncherAppWidgetHostView.java index d8cb68207..01332fb9e 100644 --- a/src/com/android/launcher3/LauncherAppWidgetHostView.java +++ b/src/com/android/launcher3/LauncherAppWidgetHostView.java @@ -48,7 +48,7 @@ public class LauncherAppWidgetHostView extends AppWidgetHostView implements Touc super(context); mContext = context; mLongPressHelper = new CheckLongPressHelper(this); - mStylusEventHelper = new StylusEventHelper(this); + mStylusEventHelper = new StylusEventHelper(new SimpleOnStylusPressListener(this), this); mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); mDragLayer = ((Launcher) context).getDragLayer(); setAccessibilityDelegate(LauncherAppState.getInstance().getAccessibilityDelegate()); @@ -94,7 +94,7 @@ public class LauncherAppWidgetHostView extends AppWidgetHostView implements Touc // Watch for longpress or stylus button press events at this level to // make sure users can always pick up this widget - if (mStylusEventHelper.checkAndPerformStylusEvent(ev)) { + if (mStylusEventHelper.onMotionEvent(ev)) { mLongPressHelper.cancelLongPress(); return true; } |