summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2017-09-14 17:51:48 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-09-14 17:51:48 (GMT)
commit465435d16d8021859fe228a057e8fecbfc510fbd (patch)
tree91c93c0f5acb254116fe8f6e2e42a61e3381b2f1
parent673f917d57f47482aa1a823e74f0377315f30293 (diff)
parentd315ff2bc2326b6382b10f609ea570036ff1b07a (diff)
downloadandroid_packages_apps_Trebuchet-465435d16d8021859fe228a057e8fecbfc510fbd.zip
android_packages_apps_Trebuchet-465435d16d8021859fe228a057e8fecbfc510fbd.tar.gz
android_packages_apps_Trebuchet-465435d16d8021859fe228a057e8fecbfc510fbd.tar.bz2
Merge "Remove haptic on touch down Bug: 65463659" into ub-launcher3-dorval-polish2
-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 61d12dd..1e12b42 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);