summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-06-27 16:58:42 -0700
committerYorke Lee <yorkelee@google.com>2014-06-27 16:58:42 -0700
commit426cd03d30422faf49e2bc2b97fb8416fdd68518 (patch)
tree42a446179ded68f84281d26a7ab3b46199fd5b6c /src
parent9a17f0e3e1a3957c8c2b530171281943bec435f1 (diff)
downloadandroid_packages_apps_PhoneCommon-426cd03d30422faf49e2bc2b97fb8416fdd68518.tar.gz
android_packages_apps_PhoneCommon-426cd03d30422faf49e2bc2b97fb8416fdd68518.tar.bz2
android_packages_apps_PhoneCommon-426cd03d30422faf49e2bc2b97fb8416fdd68518.zip
Remove use of private API: SystemVibrator
The use of a new instance of SystemVibrator was introduced in the following CL: https://googleplex-android-review.git.corp.google.com/#/q/12c60e42,n,z to avoid the issue of a competing use of the Vibrator service cancelling out vibration during an emergency call. We don't care whether this happens to haptic feedback when tapping on the dialpad since 1) It is a really short vibration 2) We don't place a new outgoing call while haptic feedback is happening so it is unlikely to result in competing uses of the Vibrator service 3) Even if haptic feedback for a particular tap is cancelled, it doesn't matter Bug: 6948882 Change-Id: Iade15c7657230654acc343d632953a5ccabcfcad
Diffstat (limited to 'src')
-rw-r--r--src/com/android/phone/common/HapticFeedback.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/com/android/phone/common/HapticFeedback.java b/src/com/android/phone/common/HapticFeedback.java
index f19b8a6..2b17523 100644
--- a/src/com/android/phone/common/HapticFeedback.java
+++ b/src/com/android/phone/common/HapticFeedback.java
@@ -19,7 +19,6 @@ package com.android.phone.common;
import android.content.ContentResolver;
import android.content.Context;
import android.content.res.Resources;
-import android.os.SystemVibrator;
import android.os.Vibrator;
import android.provider.Settings;
import android.provider.Settings.System;
@@ -88,9 +87,7 @@ public class HapticFeedback {
public void init(Context context, boolean enabled) {
mEnabled = enabled;
if (enabled) {
- // We don't rely on getSystemService(Context.VIBRATOR_SERVICE) to make sure this
- // vibrator object will be isolated from others.
- mVibrator = new SystemVibrator(context);
+ mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
mHapticPattern = new long[] {0, DURATION, 2 * DURATION, 3 * DURATION};
mSystemSettings = new Settings.System();
mContentResolver = context.getContentResolver();