List of usage examples for android.database ContentObservable ContentObservable
ContentObservable
From source file:com.android.emailcommon.provider.EmailContent.java
/** * Register a content observer to be notified when the data underlying this object changes * @param observer ContentObserver to register */// w ww . j a v a 2 s . com public synchronized void registerObserver(final Context context, final ContentObserver observer) { if (mSelfObserver == null) { mSelfObserver = new SelfContentObserver(this); context.getContentResolver().registerContentObserver(getContentNotificationUri(), true, mSelfObserver); mObservable = new ContentObservable(); } mObservable.registerObserver(observer); }