diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-06-04 17:38:20 -0700 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-06-05 20:21:37 +0000 |
commit | 537bb5fce785c3433540e047c0ccaae3b286f55e (patch) | |
tree | 7dfbb3ab4db48e490d7ada8bbec0f9af49a51356 /packages/SystemUI/src/com/android/systemui/assist | |
parent | 3bb96c7b3bbaa54f584ffff515f348178c79825e (diff) | |
download | frameworks_base-537bb5fce785c3433540e047c0ccaae3b286f55e.zip frameworks_base-537bb5fce785c3433540e047c0ccaae3b286f55e.tar.gz frameworks_base-537bb5fce785c3433540e047c0ccaae3b286f55e.tar.bz2 |
Fix vibration for assist gesture
Bug: 21549531
Change-Id: I038dd29228646ce6d08da8543c59823cfbb21167
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/assist')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/assist/AssistManager.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java index 08659e9..79af706 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java +++ b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java @@ -20,6 +20,7 @@ import android.os.Vibrator; import android.provider.Settings; import android.util.Log; import android.view.Gravity; +import android.view.HapticFeedbackConstants; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -296,13 +297,7 @@ public class AssistManager { } private void vibrate() { - if (Settings.System.getIntForUser(mContext.getContentResolver(), - Settings.System.HAPTIC_FEEDBACK_ENABLED, 1, UserHandle.USER_CURRENT) != 0) { - Resources res = mContext.getResources(); - Vibrator vibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE); - vibrator.vibrate(res.getInteger(R.integer.config_search_panel_view_vibration_duration), - VIBRATION_ATTRIBUTES); - } + mView.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); } public boolean isAssistantIntentAvailable() { |