FileDocCategorySizeDatePackage
JsResult.javaAPI DocAndroid 5.1 API2371Thu Mar 12 22:22:10 GMT 2015android.webkit

JsResult

public class JsResult extends Object
An instance of this class is passed as a parameter in various {@link WebChromeClient} action notifications. The object is used as a handle onto the underlying JavaScript-originated request, and provides a means for the client to indicate whether this action should proceed.

Fields Summary
private final ResultReceiver
mReceiver
private boolean
mResult
Constructors Summary
public JsResult(ResultReceiver receiver)

hide
Only for use by WebViewProvider implementations

        mReceiver = receiver;
    
Methods Summary
public final voidcancel()
Handle the result if the user cancelled the dialog.

        mResult = false;
        wakeUp();
    
public final voidconfirm()
Handle a confirmation response from the user.

        mResult = true;
        wakeUp();
    
public final booleangetResult()

hide
Only for use by WebViewProvider implementations

        return mResult;
    
private final voidwakeUp()

        mReceiver.onJsResultComplete(this);