Merge "Use updated DeviceConfig API's new getters to simplify invocations."
This commit is contained in:
committed by
Android (Google) Code Review
commit
f574d22f23
@@ -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