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/CellLayout.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/CellLayout.java')
-rw-r--r-- | src/com/android/launcher3/CellLayout.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index 772bb7be2..b111beea3 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -277,7 +277,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { mShortcutsAndWidgets.setCellDimensions(mCellWidth, mCellHeight, mWidthGap, mHeightGap, mCountX, mCountY); - mStylusEventHelper = new StylusEventHelper(this); + mStylusEventHelper = new StylusEventHelper(new SimpleOnStylusPressListener(this), this); mTouchFeedbackView = new ClickShadowView(context); addView(mTouchFeedbackView); @@ -339,7 +339,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { // enabled to allow rearranging the different home screens. So check what mode // the workspace is in, and only perform stylus button presses while in overview mode. if (mLauncher.mWorkspace.isInOverviewMode() - && mStylusEventHelper.checkAndPerformStylusEvent(ev)) { + && mStylusEventHelper.onMotionEvent(ev)) { return true; } return handled; |