List of usage examples for android.os Handler removeMessages
public final void removeMessages(int what, Object object)
From source file:mp.teardrop.LibraryPagerAdapter.java
/** * Schedule a query to be run for the given adapter on the worker thread. * * @param adapter The adapter to run the query for. */// ww w. java 2 s . c o m private void postRunQuery(LibraryAdapter adapter) { mRequeryNeeded[adapter != null ? adapter.getMediaType() : MediaUtils.TYPE_UNIFIED] = false; Handler handler = mWorkerHandler; handler.removeMessages(MSG_RUN_QUERY, adapter); handler.sendMessage(handler.obtainMessage(MSG_RUN_QUERY, adapter)); }
From source file:ch.blinkenlights.android.vanilla.LibraryPagerAdapter.java
/** * Schedule a query to be run for the given adapter on the worker thread. * * @param adapter The adapter to run the query for. *///from www . ja va2 s . c o m private void postRunQuery(LibraryAdapter adapter) { mRequeryNeeded[adapter.getMediaType()] = false; Handler handler = mWorkerHandler; handler.removeMessages(MSG_RUN_QUERY, adapter); handler.sendMessage(handler.obtainMessage(MSG_RUN_QUERY, adapter)); }