In NotesDataSource add private variable notePrefs and constructor NotesDataSource(Context context). Implement update(). In NotesActivity use new methods.

Reference
lynda.com Note taking app for Android Ch 4 Adding data to shared preferences.