Implement OnSharedPreferenceChangeListener callbacks on commit.

Closes #946.