diff --git a/src/com/android/fmradio/FmRecordActivity.java b/src/com/android/fmradio/FmRecordActivity.java
index a625250..09cbb75 100644
--- a/src/com/android/fmradio/FmRecordActivity.java
+++ b/src/com/android/fmradio/FmRecordActivity.java
@@ -142,9 +142,16 @@
                 mStationName.setText(stationName);
                 mRadioText.setText(radioText);
                 int id = cursor.getInt(cursor.getColumnIndex(Station._ID));
-                resolver.registerContentObserver(
-                        ContentUris.withAppendedId(Station.CONTENT_URI, id), false,
-                        mContentObserver);
+
+                if (mWatchedId != id) {
+                    if (mWatchedId != -1) {
+                        resolver.unregisterContentObserver(mContentObserver);
+                    }
+                    resolver.registerContentObserver(
+                            ContentUris.withAppendedId(Station.CONTENT_URI, id),
+                            false, mContentObserver);
+                    mWatchedId = id;
+                }
                 // If no station name and no radio text, hide the view
                 if ((!TextUtils.isEmpty(stationName))
                         || (!TextUtils.isEmpty(radioText))) {
@@ -282,7 +289,9 @@
             mService.unregisterFmRadioListener(mFmListener);
         }
         unbindService(mServiceConnection);
-        mContext.getContentResolver().unregisterContentObserver(mContentObserver);
+        if (mWatchedId != -1) {
+            mContext.getContentResolver().unregisterContentObserver(mContentObserver);
+        }
         super.onDestroy();
     }
 
@@ -471,6 +480,7 @@
         setResult(RESULT_OK, intent);
     }
 
+    private int mWatchedId = -1;
     private final ContentObserver mContentObserver = new ContentObserver(new Handler()) {
         public void onChange(boolean selfChange) {
             updateUi();
