Prefer SharedPreferences.Editor.apply() where available