Loading src/com/android/settings/accessibility/AccessibilitySettings.java +2 −2 Original line number Diff line number Diff line Loading @@ -295,8 +295,8 @@ public class AccessibilitySettings extends DashboardFragment { } static boolean isRampingRingerEnabled(final Context context) { return Settings.Global.getInt( context.getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, 0) == 1; return Settings.System.getInt( context.getContentResolver(), Settings.System.APPLY_RAMPING_RINGER, 0) == 1; } @VisibleForTesting Loading src/com/android/settings/accessibility/RingVibrationPreferenceFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ public class RingVibrationPreferenceFragment extends VibrationPreferenceFragment @Override protected String getVibrationEnabledSetting() { if (AccessibilitySettings.isRampingRingerEnabled(getContext())) { return Settings.Global.APPLY_RAMPING_RINGER; return Settings.System.APPLY_RAMPING_RINGER; } else { return Settings.System.VIBRATE_WHEN_RINGING; } Loading src/com/android/settings/accessibility/VibrationPreferenceFragment.java +3 −3 Original line number Diff line number Diff line Loading @@ -116,12 +116,12 @@ public abstract class VibrationPreferenceFragment extends RadioButtonPickerFragm // Update vibration enabled setting final String vibrationEnabledSetting = getVibrationEnabledSetting(); final boolean wasEnabled = TextUtils.equals( vibrationEnabledSetting, Settings.Global.APPLY_RAMPING_RINGER) vibrationEnabledSetting, Settings.System.APPLY_RAMPING_RINGER) ? true : (Settings.System.getInt( getContext().getContentResolver(), vibrationEnabledSetting, 1) == 1); if (vibrationEnabled != wasEnabled) { if (vibrationEnabledSetting.equals(Settings.Global.APPLY_RAMPING_RINGER)) { if (vibrationEnabledSetting.equals(Settings.System.APPLY_RAMPING_RINGER)) { Settings.Global.putInt(getContext().getContentResolver(), vibrationEnabledSetting, 0); } else { Loading Loading @@ -212,7 +212,7 @@ public abstract class VibrationPreferenceFragment extends RadioButtonPickerFragm getVibrationIntensitySetting(), getDefaultVibrationIntensity()); final String vibrationEnabledSetting = getVibrationEnabledSetting(); final boolean vibrationEnabled = TextUtils.equals( vibrationEnabledSetting, Settings.Global.APPLY_RAMPING_RINGER) vibrationEnabledSetting, Settings.System.APPLY_RAMPING_RINGER) ? true : (Settings.System.getInt( getContext().getContentResolver(), vibrationEnabledSetting, 1) == 1); Loading src/com/android/settings/sound/VibrateForCallsPreferenceController.java +2 −2 Original line number Diff line number Diff line Loading @@ -51,9 +51,9 @@ public class VibrateForCallsPreferenceController extends BasePreferenceControlle @Override public CharSequence getSummary() { if (Settings.Global.getInt( if (Settings.System.getInt( mContext.getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, OFF) == ON) { Settings.System.APPLY_RAMPING_RINGER, OFF) == ON) { return mContext.getText(R.string.vibrate_when_ringing_option_ramping_ringer); } else if (Settings.System.getInt( mContext.getContentResolver(), Loading src/com/android/settings/sound/VibrateForCallsPreferenceFragment.java +8 −8 Original line number Diff line number Diff line Loading @@ -78,18 +78,18 @@ public class VibrateForCallsPreferenceFragment extends RadioButtonPickerFragment if (TextUtils.equals(key, KEY_ALWAYS_VIBRATE)) { Settings.System.putInt( getContext().getContentResolver(), Settings.System.VIBRATE_WHEN_RINGING, ON); Settings.Global.putInt( getContext().getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, OFF); Settings.System.putInt( getContext().getContentResolver(), Settings.System.APPLY_RAMPING_RINGER, OFF); } else if (TextUtils.equals(key, KEY_RAMPING_RINGER)) { Settings.System.putInt( getContext().getContentResolver(), Settings.System.VIBRATE_WHEN_RINGING, OFF); Settings.Global.putInt( getContext().getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, ON); Settings.System.putInt( getContext().getContentResolver(), Settings.System.APPLY_RAMPING_RINGER, ON); } else { Settings.System.putInt( getContext().getContentResolver(), Settings.System.VIBRATE_WHEN_RINGING, OFF); Settings.Global.putInt( getContext().getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, OFF); Settings.System.putInt( getContext().getContentResolver(), Settings.System.APPLY_RAMPING_RINGER, OFF); } } Loading @@ -104,9 +104,9 @@ public class VibrateForCallsPreferenceFragment extends RadioButtonPickerFragment @Override protected String getDefaultKey() { if (Settings.Global.getInt( if (Settings.System.getInt( getContext().getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, OFF) == ON) { Settings.System.APPLY_RAMPING_RINGER, OFF) == ON) { return KEY_RAMPING_RINGER; } else if (Settings.System.getInt( getContext().getContentResolver(), Loading Loading
src/com/android/settings/accessibility/AccessibilitySettings.java +2 −2 Original line number Diff line number Diff line Loading @@ -295,8 +295,8 @@ public class AccessibilitySettings extends DashboardFragment { } static boolean isRampingRingerEnabled(final Context context) { return Settings.Global.getInt( context.getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, 0) == 1; return Settings.System.getInt( context.getContentResolver(), Settings.System.APPLY_RAMPING_RINGER, 0) == 1; } @VisibleForTesting Loading
src/com/android/settings/accessibility/RingVibrationPreferenceFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ public class RingVibrationPreferenceFragment extends VibrationPreferenceFragment @Override protected String getVibrationEnabledSetting() { if (AccessibilitySettings.isRampingRingerEnabled(getContext())) { return Settings.Global.APPLY_RAMPING_RINGER; return Settings.System.APPLY_RAMPING_RINGER; } else { return Settings.System.VIBRATE_WHEN_RINGING; } Loading
src/com/android/settings/accessibility/VibrationPreferenceFragment.java +3 −3 Original line number Diff line number Diff line Loading @@ -116,12 +116,12 @@ public abstract class VibrationPreferenceFragment extends RadioButtonPickerFragm // Update vibration enabled setting final String vibrationEnabledSetting = getVibrationEnabledSetting(); final boolean wasEnabled = TextUtils.equals( vibrationEnabledSetting, Settings.Global.APPLY_RAMPING_RINGER) vibrationEnabledSetting, Settings.System.APPLY_RAMPING_RINGER) ? true : (Settings.System.getInt( getContext().getContentResolver(), vibrationEnabledSetting, 1) == 1); if (vibrationEnabled != wasEnabled) { if (vibrationEnabledSetting.equals(Settings.Global.APPLY_RAMPING_RINGER)) { if (vibrationEnabledSetting.equals(Settings.System.APPLY_RAMPING_RINGER)) { Settings.Global.putInt(getContext().getContentResolver(), vibrationEnabledSetting, 0); } else { Loading Loading @@ -212,7 +212,7 @@ public abstract class VibrationPreferenceFragment extends RadioButtonPickerFragm getVibrationIntensitySetting(), getDefaultVibrationIntensity()); final String vibrationEnabledSetting = getVibrationEnabledSetting(); final boolean vibrationEnabled = TextUtils.equals( vibrationEnabledSetting, Settings.Global.APPLY_RAMPING_RINGER) vibrationEnabledSetting, Settings.System.APPLY_RAMPING_RINGER) ? true : (Settings.System.getInt( getContext().getContentResolver(), vibrationEnabledSetting, 1) == 1); Loading
src/com/android/settings/sound/VibrateForCallsPreferenceController.java +2 −2 Original line number Diff line number Diff line Loading @@ -51,9 +51,9 @@ public class VibrateForCallsPreferenceController extends BasePreferenceControlle @Override public CharSequence getSummary() { if (Settings.Global.getInt( if (Settings.System.getInt( mContext.getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, OFF) == ON) { Settings.System.APPLY_RAMPING_RINGER, OFF) == ON) { return mContext.getText(R.string.vibrate_when_ringing_option_ramping_ringer); } else if (Settings.System.getInt( mContext.getContentResolver(), Loading
src/com/android/settings/sound/VibrateForCallsPreferenceFragment.java +8 −8 Original line number Diff line number Diff line Loading @@ -78,18 +78,18 @@ public class VibrateForCallsPreferenceFragment extends RadioButtonPickerFragment if (TextUtils.equals(key, KEY_ALWAYS_VIBRATE)) { Settings.System.putInt( getContext().getContentResolver(), Settings.System.VIBRATE_WHEN_RINGING, ON); Settings.Global.putInt( getContext().getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, OFF); Settings.System.putInt( getContext().getContentResolver(), Settings.System.APPLY_RAMPING_RINGER, OFF); } else if (TextUtils.equals(key, KEY_RAMPING_RINGER)) { Settings.System.putInt( getContext().getContentResolver(), Settings.System.VIBRATE_WHEN_RINGING, OFF); Settings.Global.putInt( getContext().getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, ON); Settings.System.putInt( getContext().getContentResolver(), Settings.System.APPLY_RAMPING_RINGER, ON); } else { Settings.System.putInt( getContext().getContentResolver(), Settings.System.VIBRATE_WHEN_RINGING, OFF); Settings.Global.putInt( getContext().getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, OFF); Settings.System.putInt( getContext().getContentResolver(), Settings.System.APPLY_RAMPING_RINGER, OFF); } } Loading @@ -104,9 +104,9 @@ public class VibrateForCallsPreferenceFragment extends RadioButtonPickerFragment @Override protected String getDefaultKey() { if (Settings.Global.getInt( if (Settings.System.getInt( getContext().getContentResolver(), Settings.Global.APPLY_RAMPING_RINGER, OFF) == ON) { Settings.System.APPLY_RAMPING_RINGER, OFF) == ON) { return KEY_RAMPING_RINGER; } else if (Settings.System.getInt( getContext().getContentResolver(), Loading