summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
index 0c5d2a5..4ada5ec 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
@@ -27,6 +27,7 @@ import android.content.IntentFilter;
import android.content.res.Resources;
import android.graphics.PixelFormat;
import android.graphics.drawable.ColorDrawable;
+import android.media.AudioAttributes;
import android.media.AudioManager;
import android.media.AudioService;
import android.media.AudioSystem;
@@ -108,6 +109,11 @@ public class VolumePanel extends Handler {
private static final int STREAM_MASTER = -100;
// Pseudo stream type for remote volume is defined in AudioService.STREAM_REMOTE_MUSIC
+ private static final AudioAttributes VIBRATION_ATTRIBUTES = new AudioAttributes.Builder()
+ .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
+ .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
+ .build();
+
private final String mTag;
protected final Context mContext;
private final AudioManager mAudioManager;
@@ -969,7 +975,7 @@ public class VolumePanel extends Handler {
return;
}
- mVibrator.vibrate(VIBRATE_DURATION, AudioManager.STREAM_SYSTEM);
+ mVibrator.vibrate(VIBRATE_DURATION, VIBRATION_ATTRIBUTES);
}
protected void onRemoteVolumeChanged(MediaController controller, int flags) {