Move haptic feedback on All Apps button to touch down
Bug #5453040
- Also fixing one case where db cursor wasn't closed
Bug #5453040
Change-Id: Id5e8f3c30690160900a6be2cd60c1062ff48ee54
diff --git a/src/com/android/launcher2/Hotseat.java b/src/com/android/launcher2/Hotseat.java
index f1fb6ab..f7fa380 100644
--- a/src/com/android/launcher2/Hotseat.java
+++ b/src/com/android/launcher2/Hotseat.java
@@ -21,6 +21,7 @@
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.LayoutInflater;
+import android.view.MotionEvent;
import android.view.View;
import android.widget.FrameLayout;
@@ -103,6 +104,17 @@
context.getResources().getDrawable(R.drawable.all_apps_button_icon), null, null);
// allAppsButton.setText(context.getString(R.string.all_apps_button_label));
allAppsButton.setContentDescription(context.getString(R.string.all_apps_button_label));
+ allAppsButton.setOnTouchListener(new View.OnTouchListener() {
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ if (mLauncher != null &&
+ (event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_DOWN) {
+ mLauncher.onTouchDownAllAppsButton(v);
+ }
+ return false;
+ }
+ });
+
allAppsButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(android.view.View v) {