Use OnSharedPreferenceChangeListener rather than onWindowFocusChanged