private void callDialogListener(Bundle values, FacebookException error) { if (mListener == null) { return; } if (values != null) { mListener.onComplete(values); } else { if (error instanceof FacebookDialogException) { FacebookDialogException facebookDialogException = (FacebookDialogException) error; DialogError dialogError = new DialogError(facebookDialogException.getMessage(), facebookDialogException.getErrorCode(), facebookDialogException.getFailingUrl()); mListener.onError(dialogError); } else if (error instanceof FacebookOperationCanceledException) { mListener.onCancel(); } else { FacebookError facebookError = new FacebookError(error.getMessage()); mListener.onFacebookError(facebookError); } } }
private void callDialogListener(Bundle paramBundle, FacebookException paramFacebookException) { if (this.mListener == null) return; if (paramBundle != null) { this.mListener.onComplete(paramBundle); return; } if ((paramFacebookException instanceof FacebookDialogException)) { FacebookDialogException localFacebookDialogException = (FacebookDialogException)paramFacebookException; DialogError localDialogError = new DialogError(localFacebookDialogException.getMessage(), localFacebookDialogException.getErrorCode(), localFacebookDialogException.getFailingUrl()); this.mListener.onError(localDialogError); return; } if ((paramFacebookException instanceof FacebookOperationCanceledException)) { this.mListener.onCancel(); return; } FacebookError localFacebookError = new FacebookError(paramFacebookException.getMessage()); this.mListener.onFacebookError(localFacebookError); }
@Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { super.onReceivedError(view, errorCode, description, failingUrl); sendErrorToListener(new FacebookDialogException(description, errorCode, failingUrl)); WebDialog.this.dismiss(); }
@Override public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { if (DISABLE_SSL_CHECK_FOR_TESTING) { handler.proceed(); } else { super.onReceivedSslError(view, handler, error); sendErrorToListener(new FacebookDialogException(null, ERROR_FAILED_SSL_HANDSHAKE, null)); handler.cancel(); WebDialog.this.dismiss(); } }
public void onReceivedSslError(WebView paramWebView, SslErrorHandler paramSslErrorHandler, SslError paramSslError) { super.onReceivedSslError(paramWebView, paramSslErrorHandler, paramSslError); WebDialog.this.sendErrorToListener(new FacebookDialogException(null, -11, null)); paramSslErrorHandler.cancel(); WebDialog.this.dismiss(); }
public void onReceivedError(WebView paramWebView, int paramInt, String paramString1, String paramString2) { super.onReceivedError(paramWebView, paramInt, paramString1, paramString2); WebDialog.this.sendErrorToListener(new FacebookDialogException(paramString1, paramInt, paramString2)); WebDialog.this.dismiss(); }