Example usage for android.os Handler postAtFrontOfQueue

List of usage examples for android.os Handler postAtFrontOfQueue

Introduction

In this page you can find the example usage for android.os Handler postAtFrontOfQueue.

Prototype

public final boolean postAtFrontOfQueue(Runnable r) 

Source Link

Document

Posts a message to an object that implements Runnable.

Usage

From source file:com.android.volley.toolbox.ClearCacheRequest.java

@Override
public boolean isCanceled() {
    // This is a little bit of a hack, but hey, why not.
    mCache.clear();//from w w w.  j av  a 2s . c o m
    if (mCallback != null) {
        Handler handler = new Handler(Looper.getMainLooper());
        handler.postAtFrontOfQueue(mCallback);
    }
    return true;
}