summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/settings/hardware/VibratorIntensity.java5
-rw-r--r--src/com/android/settings/notification/OtherSoundSettings.java2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/settings/hardware/VibratorIntensity.java b/src/com/android/settings/hardware/VibratorIntensity.java
index 009f35f..8bb39ca 100644
--- a/src/com/android/settings/hardware/VibratorIntensity.java
+++ b/src/com/android/settings/hardware/VibratorIntensity.java
@@ -69,6 +69,11 @@ public class VibratorIntensity extends DialogPreference implements
setDialogLayoutResource(R.layout.vibrator_intensity);
}
+ public static boolean isSupported(Context context) {
+ CMHardwareManager hardware = CMHardwareManager.getInstance(context);
+ return hardware.isSupported(CMHardwareManager.FEATURE_VIBRATOR);
+ }
+
@Override
protected void onPrepareDialogBuilder(AlertDialog.Builder builder) {
builder.setNeutralButton(R.string.settings_reset_button,
diff --git a/src/com/android/settings/notification/OtherSoundSettings.java b/src/com/android/settings/notification/OtherSoundSettings.java
index 9e24c34..d49420c 100644
--- a/src/com/android/settings/notification/OtherSoundSettings.java
+++ b/src/com/android/settings/notification/OtherSoundSettings.java
@@ -149,7 +149,7 @@ public class OtherSoundSettings extends SettingsPreferenceFragment implements In
TYPE_SYSTEM, KEY_VIBRATION_INTENSITY, System.HAPTIC_FEEDBACK_ENABLED, DEFAULT_ON) {
@Override
public boolean isApplicable(Context context) {
- return false; //VibratorIntensity.isSupported();
+ return VibratorIntensity.isSupported(context);
}
};