summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/CellLayout.java
diff options
context:
space:
mode:
authorMady Mellor <madym@google.com>2015-07-15 16:34:34 -0700
committerMady Mellor <madym@google.com>2015-08-21 11:18:14 -0700
commitbb83520a620919a8f19472ba4426585d007d1aba (patch)
treea04345fb269ef3061564622f95343051dc04ab69 /src/com/android/launcher3/CellLayout.java
parent6f326e95a0033eecbb7370c95ce14fa508a57448 (diff)
downloadandroid_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.java4
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;