Use updated DeviceConfig API's new getters to simplify invocations.

Test: manual verification
Change-Id: I5f64dcc11c27adf66cf9b9a42c61b2a51092eb12
This commit is contained in:
Stanislav Zholnin
2019-03-07 18:13:38 +00:00
parent fbdd87281a
commit 9a02535c40

View File

@@ -130,17 +130,8 @@ public class VibrateWhenRingPreferenceController extends TogglePreferenceControl
}
private boolean isRampingRingerEnabled() {
String enableRampingRinger = DeviceConfig.getProperty(
DeviceConfig.Telephony.NAMESPACE,
DeviceConfig.Telephony.RAMPING_RINGER_ENABLED);
if (enableRampingRinger == null) {
return false;
}
try {
return Boolean.valueOf(enableRampingRinger);
} catch (Exception e) {
return false;
}
return DeviceConfig.getBoolean(DeviceConfig.Telephony.NAMESPACE,
DeviceConfig.Telephony.RAMPING_RINGER_ENABLED, false);
}
}