diff --git a/app/src/main/java/org/asteroidos/sync/connectivity/SilentModeService.java b/app/src/main/java/org/asteroidos/sync/connectivity/SilentModeService.java index 88d5e9e3..590601cc 100644 --- a/app/src/main/java/org/asteroidos/sync/connectivity/SilentModeService.java +++ b/app/src/main/java/org/asteroidos/sync/connectivity/SilentModeService.java @@ -44,10 +44,11 @@ public final void sync() { if (notificationPref == null) { notificationPref = prefs.getBoolean(PREF_RINGER, false); + SharedPreferences.Editor editor = prefs.edit(); + editor.putInt(PREF_ORIG_RINGER, am.getRingerMode()); + editor.apply(); + if (notificationPref) { - SharedPreferences.Editor editor = prefs.edit(); - editor.putInt(PREF_ORIG_RINGER, am.getRingerMode()); - editor.apply(); am.setRingerMode(AudioManager.RINGER_MODE_SILENT); } }