public void onReceivedHttpAuthRequest(
     HttpAuthHandler handler, String hostName, String realmName) {
   // Do an unsynchronized quick check to avoid posting if no callback has
   // been set.
   if (mWebViewClient == null) {
     handler.cancel();
     return;
   }
   Message msg = obtainMessage(AUTH_REQUEST, handler);
   msg.getData().putString("host", hostName);
   msg.getData().putString("realm", realmName);
   sendMessage(msg);
 }
 /**
  * Notifies the host application that the WebView received an HTTP authentication request. The
  * host application can use the supplied {@link HttpAuthHandler} to set the WebView's response to
  * the request. The default behavior is to cancel the request.
  *
  * @param view the WebView that is initiating the callback
  * @param handler the HttpAuthHandler used to set the WebView's response
  * @param host the host requiring authentication
  * @param realm the realm for which authentication is required
  * @see WebView#getHttpAuthUsernamePassword
  */
 public void onReceivedHttpAuthRequest(
     WebView view, HttpAuthHandler handler, String host, String realm) {
   handler.cancel();
 }