Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 537bb5fc authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix vibration for assist gesture

Bug: 21549531
Change-Id: I038dd29228646ce6d08da8543c59823cfbb21167
parent 3bb96c7b
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -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() {