Use updated DeviceConfig API's new getters to simplify invocations.
Test: manual verification Change-Id: I5f64dcc11c27adf66cf9b9a42c61b2a51092eb12
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user