Dialer: Fix in-call vibrations
After switching to protected storage in commit 145b22f we need to access
them on that context as well
Change-Id: I4b8d50fa813464bb3450caa9aac9a70ae18fc0b9
diff --git a/java/com/android/incallui/InCallVibrationHandler.java b/java/com/android/incallui/InCallVibrationHandler.java
index 067d6bf..0279cca 100644
--- a/java/com/android/incallui/InCallVibrationHandler.java
+++ b/java/com/android/incallui/InCallVibrationHandler.java
@@ -44,7 +44,9 @@
private DialerCall activeCall;
public InCallVibrationHandler(Context context) {
- prefs = PreferenceManager.getDefaultSharedPreferences(context);
+ prefs = context.createDeviceProtectedStorageContext()
+ .getSharedPreferences(PreferenceManager.getDefaultSharedPreferencesName(context),
+ Context.MODE_PRIVATE);
vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
}