Code refactor: changed SharedPreferences.Editor…commit() to apply(). No need to commit since we aren't doing anything with the return value.