Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76adf6df authored by Matt Pape's avatar Matt Pape Committed by Android (Google) Code Review
Browse files

Merge "Remove interface for Telephony from DeviceConfig."

parents 5b53bf4f 97e634c7
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -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;
@@ -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;
@@ -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;
@@ -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");