summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2017-09-12 22:54:50 (GMT)
committerHyunyoung Song <hyunyoungs@google.com>2017-09-12 22:54:50 (GMT)
commitd315ff2bc2326b6382b10f609ea570036ff1b07a (patch)
tree7ab9c3418a24d219f4173b0574d687a3290e6c96
parent9c1607886b87734f5ec36a87f62dcaabb78bdf20 (diff)
downloadandroid_packages_apps_Trebuchet-d315ff2bc2326b6382b10f609ea570036ff1b07a.zip
android_packages_apps_Trebuchet-d315ff2bc2326b6382b10f609ea570036ff1b07a.tar.gz
android_packages_apps_Trebuchet-d315ff2bc2326b6382b10f609ea570036ff1b07a.tar.bz2
Remove haptic on touch down
Bug: 65463659 Change-Id: I111d18a3d1dcd7877ad4aa5baaeca2e6810be332
-rw-r--r--src/com/android/launcher3/Hotseat.java1
-rw-r--r--src/com/android/launcher3/Launcher.java21
-rw-r--r--src/com/android/launcher3/pageindicators/PageIndicatorCaretLandscape.java1
-rw-r--r--src/com/android/launcher3/pageindicators/PageIndicatorLineCaret.java1
4 files changed, 0 insertions, 24 deletions
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index af3abeb..a6d80e3 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -149,7 +149,6 @@ public class Hotseat extends FrameLayout
allAppsButton.setOnKeyListener(new HotseatIconKeyEventListener());
if (mLauncher != null) {
mLauncher.setAllAppsButton(allAppsButton);
- allAppsButton.setOnTouchListener(mLauncher.getHapticFeedbackTouchListener());
allAppsButton.setOnClickListener(mLauncher);
allAppsButton.setOnFocusChangeListener(mLauncher.mFocusHandler);
}
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 60d2e81..aac036d 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -279,8 +279,6 @@ public class Launcher extends BaseActivity
private PopupDataProvider mPopupDataProvider;
- private View.OnTouchListener mHapticFeedbackTouchListener;
-
// Determines how long to wait after a rotation before restoring the screen orientation to
// match the sensor state.
private static final int RESTORE_SCREEN_ORIENTATION_DELAY = 500;
@@ -1326,7 +1324,6 @@ public class Launcher extends BaseActivity
onClickWallpaperPicker(view);
}
}.attachTo(wallpaperButton);
- wallpaperButton.setOnTouchListener(getHapticFeedbackTouchListener());
// Bind widget button actions
mWidgetsButton = findViewById(R.id.widget_button);
@@ -1336,7 +1333,6 @@ public class Launcher extends BaseActivity
onClickAddWidgetButton(view);
}
}.attachTo(mWidgetsButton);
- mWidgetsButton.setOnTouchListener(getHapticFeedbackTouchListener());
// Bind settings actions
View settingsButton = findViewById(R.id.settings_button);
@@ -1348,7 +1344,6 @@ public class Launcher extends BaseActivity
onClickSettingsButton(view);
}
}.attachTo(settingsButton);
- settingsButton.setOnTouchListener(getHapticFeedbackTouchListener());
} else {
settingsButton.setVisibility(View.GONE);
}
@@ -2533,22 +2528,6 @@ public class Launcher extends BaseActivity
startActivity(intent, getActivityLaunchOptions(v));
}
- public View.OnTouchListener getHapticFeedbackTouchListener() {
- if (mHapticFeedbackTouchListener == null) {
- mHapticFeedbackTouchListener = new View.OnTouchListener() {
- @SuppressLint("ClickableViewAccessibility")
- @Override
- public boolean onTouch(View v, MotionEvent event) {
- if ((event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_DOWN) {
- v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
- }
- return false;
- }
- };
- }
- return mHapticFeedbackTouchListener;
- }
-
@Override
public void onAccessibilityStateChanged(boolean enabled) {
mDragLayer.onAccessibilityStateChanged(enabled);
diff --git a/src/com/android/launcher3/pageindicators/PageIndicatorCaretLandscape.java b/src/com/android/launcher3/pageindicators/PageIndicatorCaretLandscape.java
index 682d5a9..911be93 100644
--- a/src/com/android/launcher3/pageindicators/PageIndicatorCaretLandscape.java
+++ b/src/com/android/launcher3/pageindicators/PageIndicatorCaretLandscape.java
@@ -48,7 +48,6 @@ public class PageIndicatorCaretLandscape extends PageIndicator {
setCaretDrawable(caretDrawable);
Launcher l = Launcher.getLauncher(context);
- setOnTouchListener(l.getHapticFeedbackTouchListener());
setOnClickListener(l);
setOnFocusChangeListener(l.mFocusHandler);
}
diff --git a/src/com/android/launcher3/pageindicators/PageIndicatorLineCaret.java b/src/com/android/launcher3/pageindicators/PageIndicatorLineCaret.java
index 29834d7..6281fec 100644
--- a/src/com/android/launcher3/pageindicators/PageIndicatorLineCaret.java
+++ b/src/com/android/launcher3/pageindicators/PageIndicatorLineCaret.java
@@ -141,7 +141,6 @@ public class PageIndicatorLineCaret extends PageIndicator {
super.onFinishInflate();
mAllAppsHandle = (ImageView) findViewById(R.id.all_apps_handle);
mAllAppsHandle.setImageDrawable(getCaretDrawable());
- mAllAppsHandle.setOnTouchListener(mLauncher.getHapticFeedbackTouchListener());
mAllAppsHandle.setOnClickListener(mLauncher);
mAllAppsHandle.setOnFocusChangeListener(mLauncher.mFocusHandler);
mLauncher.setAllAppsButton(mAllAppsHandle);