List of usage examples for android.database DataSetObserver onInvalidated
public void onInvalidated()
From source file:com.entertailion.android.slideshow.images.ImageManager.java
/** * Called when something changes in our data set. Cleans up any weak * references that are no longer valid along the way. *///from w w w .ja va 2s .c om public void notifyInvalidateObservers() { Log.d(LOG_TAG, "notifyInvalidateObservers: " + loading); if (loading) { final ArrayList<WeakReference<DataSetObserver>> observers = dataSetObservers; final int count = observers.size(); for (int i = count - 1; i >= 0; i--) { final WeakReference<DataSetObserver> weak = observers.get(i); final DataSetObserver obs = weak.get(); if (obs != null) { obs.onInvalidated(); } else { observers.remove(i); } } } }
From source file:com.partytv.server.ImageManager.java
/** * Called when something changes in our data set. Cleans up any weak * references that are no longer valid along the way. *//*from w ww . j av a 2 s .co m*/ private void notifyInvalidateObservers() { final ArrayList<WeakReference<DataSetObserver>> observers = mObservers; final int count = observers.size(); for (int i = count - 1; i >= 0; i--) { final WeakReference<DataSetObserver> weak = observers.get(i); final DataSetObserver obs = weak.get(); if (obs != null) { obs.onInvalidated(); } else { observers.remove(i); } } }