sm8150-common: DeviceSettings: Remove vibrator preference when unsupported
guacamoleb (OnePlus7) doesn't have support for vibration intensity changing and doesn't have the kernel node for it either, remove the pref for such devices. Change-Id: I58010f032680c86c27db70e5c91dd99921b1a689 Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
This commit is contained in:
parent
332b826ee2
commit
9f3ffc06a7
|
@ -85,8 +85,8 @@ public class DeviceSettings extends PreferenceFragment
|
||||||
getActivity().getActionBar().setDisplayHomeAsUpEnabled(true);
|
getActivity().getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
mVibratorStrength = (VibratorStrengthPreference) findPreference(KEY_VIBSTRENGTH);
|
mVibratorStrength = (VibratorStrengthPreference) findPreference(KEY_VIBSTRENGTH);
|
||||||
if (mVibratorStrength != null) {
|
if (mVibratorStrength == null || !VibratorStrengthPreference.isSupported()) {
|
||||||
mVibratorStrength.setEnabled(VibratorStrengthPreference.isSupported());
|
getPreferenceScreen().removePreference((Preference) findPreference("vibrator"));
|
||||||
}
|
}
|
||||||
|
|
||||||
mTopKeyPref = (ListPreference) findPreference(Constants.NOTIF_SLIDER_TOP_KEY);
|
mTopKeyPref = (ListPreference) findPreference(Constants.NOTIF_SLIDER_TOP_KEY);
|
||||||
|
|
Loading…
Reference in New Issue