Loading src/com/android/server/telecom/SystemSettingsUtil.java +13 −6 Original line number Diff line number Diff line Loading @@ -29,6 +29,16 @@ import com.android.internal.annotations.VisibleForTesting; @VisibleForTesting public class SystemSettingsUtil { /** Flag for ringer ramping time in milliseconds. */ private static final String RAMPING_RINGER_DURATION_MILLIS = "ramping_ringer_duration"; /** Flag for vibration time in milliseconds before ramping ringer starts. */ private static final String RAMPING_RINGER_VIBRATION_DURATION = "ramping_ringer_vibration_duration"; /** Flag for whether or not to apply ramping ringer on incoming phone calls. */ private static final String RAMPING_RINGER_ENABLED = "ramping_ringer_enabled"; public boolean isTheaterModeOn(Context context) { return Settings.Global.getInt(context.getContentResolver(), Settings.Global.THEATER_MODE_ON, 0) == 1; Loading Loading @@ -56,8 +66,7 @@ public class SystemSettingsUtil { public boolean enableRampingRingerFromDeviceConfig() { String enableRampingRinger = DeviceConfig.getProperty( DeviceConfig.Telephony.NAMESPACE, DeviceConfig.Telephony.RAMPING_RINGER_ENABLED); DeviceConfig.NAMESPACE_TELEPHONY, RAMPING_RINGER_ENABLED); if (enableRampingRinger == null) { Log.i(this, "Telephony.RAMPING_RINGER_ENABLED is null"); return false; Loading @@ -73,8 +82,7 @@ public class SystemSettingsUtil { public int getRampingRingerDuration() { String rampingRingerDuration = DeviceConfig.getProperty( DeviceConfig.Telephony.NAMESPACE, DeviceConfig.Telephony.RAMPING_RINGER_DURATION); DeviceConfig.NAMESPACE_TELEPHONY, RAMPING_RINGER_DURATION_MILLIS); if (rampingRingerDuration == null) { Log.i(this, "Telephony.RAMPING_RINGER_DURATION is null"); return -1; Loading @@ -90,8 +98,7 @@ public class SystemSettingsUtil { public int getRampingRingerVibrationDuration() { String rampingRingerVibrationDuration = DeviceConfig.getProperty( DeviceConfig.Telephony.NAMESPACE, DeviceConfig.Telephony.RAMPING_RINGER_VIBRATION_DURATION); DeviceConfig.NAMESPACE_TELEPHONY, RAMPING_RINGER_VIBRATION_DURATION); if (rampingRingerVibrationDuration == null) { Log.i(this, "Telephony.RAMPING_RINGER_VIBRATION_DURATION is null"); Loading Loading
src/com/android/server/telecom/SystemSettingsUtil.java +13 −6 Original line number Diff line number Diff line Loading @@ -29,6 +29,16 @@ import com.android.internal.annotations.VisibleForTesting; @VisibleForTesting public class SystemSettingsUtil { /** Flag for ringer ramping time in milliseconds. */ private static final String RAMPING_RINGER_DURATION_MILLIS = "ramping_ringer_duration"; /** Flag for vibration time in milliseconds before ramping ringer starts. */ private static final String RAMPING_RINGER_VIBRATION_DURATION = "ramping_ringer_vibration_duration"; /** Flag for whether or not to apply ramping ringer on incoming phone calls. */ private static final String RAMPING_RINGER_ENABLED = "ramping_ringer_enabled"; public boolean isTheaterModeOn(Context context) { return Settings.Global.getInt(context.getContentResolver(), Settings.Global.THEATER_MODE_ON, 0) == 1; Loading Loading @@ -56,8 +66,7 @@ public class SystemSettingsUtil { public boolean enableRampingRingerFromDeviceConfig() { String enableRampingRinger = DeviceConfig.getProperty( DeviceConfig.Telephony.NAMESPACE, DeviceConfig.Telephony.RAMPING_RINGER_ENABLED); DeviceConfig.NAMESPACE_TELEPHONY, RAMPING_RINGER_ENABLED); if (enableRampingRinger == null) { Log.i(this, "Telephony.RAMPING_RINGER_ENABLED is null"); return false; Loading @@ -73,8 +82,7 @@ public class SystemSettingsUtil { public int getRampingRingerDuration() { String rampingRingerDuration = DeviceConfig.getProperty( DeviceConfig.Telephony.NAMESPACE, DeviceConfig.Telephony.RAMPING_RINGER_DURATION); DeviceConfig.NAMESPACE_TELEPHONY, RAMPING_RINGER_DURATION_MILLIS); if (rampingRingerDuration == null) { Log.i(this, "Telephony.RAMPING_RINGER_DURATION is null"); return -1; Loading @@ -90,8 +98,7 @@ public class SystemSettingsUtil { public int getRampingRingerVibrationDuration() { String rampingRingerVibrationDuration = DeviceConfig.getProperty( DeviceConfig.Telephony.NAMESPACE, DeviceConfig.Telephony.RAMPING_RINGER_VIBRATION_DURATION); DeviceConfig.NAMESPACE_TELEPHONY, RAMPING_RINGER_VIBRATION_DURATION); if (rampingRingerVibrationDuration == null) { Log.i(this, "Telephony.RAMPING_RINGER_VIBRATION_DURATION is null"); Loading