Permalink
Browse files

Get Vibrator from Context instead of using private API.

Bug: 6334179

Change-Id: Ib301f850bd8ef926567f8a3093bd88d102bacd54
  • Loading branch information...
1 parent 92d5013 commit c6605242cfbda7a1e3d0009de2f0951039c8ddae @j9brown j9brown committed Apr 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/com/android/voicedialer/VoiceDialerActivity.java
@@ -1090,7 +1090,7 @@ private int playSound(int toneType) {
mAudioManager.shouldVibrate(AudioManager.VIBRATE_TYPE_RINGER)) {
final int VIBRATOR_TIME = 150;
final int VIBRATOR_GUARD_TIME = 150;
- Vibrator vibrator = new Vibrator();
+ Vibrator vibrator = (Vibrator)getSystemService(VIBRATOR_SERVICE);
vibrator.vibrate(VIBRATOR_TIME);
msecDelay = StrictMath.max(msecDelay,
VIBRATOR_TIME + VIBRATOR_GUARD_TIME);

0 comments on commit c660524

Please sign in to comment.