类android.net.http.SslError源码实例Demo

下面列出了怎么用android.net.http.SslError的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: xmall   文件: SystemWebViewClient.java
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = parentEngine.cordova.getActivity().getPackageName();
    final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = this.cordova.getActivity().getPackageName();
    final PackageManager pm = this.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
源代码3 项目: alpha-wallet-android   文件: Web3ViewClient.java
@Override
public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error)
{
    AWalletAlertDialog aDialog = new AWalletAlertDialog(context);
    aDialog.setTitle(R.string.title_dialog_error);
    aDialog.setIcon(AWalletAlertDialog.ERROR);
    aDialog.setMessage(R.string.ssl_cert_invalid);
    aDialog.setButtonText(R.string.dialog_approve);
    aDialog.setButtonListener(v -> {
        handler.proceed();
        aDialog.dismiss();
    });
    aDialog.setSecondaryButtonText(R.string.action_cancel);
    aDialog.setButtonListener(v -> {
        handler.cancel();
        aDialog.dismiss();
    });
    aDialog.show();
}
 
源代码4 项目: wildfly-samples   文件: CordovaWebViewClient.java
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = this.cordova.getActivity().getPackageName();
    final PackageManager pm = this.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = parentEngine.cordova.getActivity().getPackageName();
    final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
/**
* Notify the host application that an SSL error occurred while loading a
* resource. The host application must call either callback.onReceiveValue(true)
* or callback.onReceiveValue(false). Note that the decision may be
* retained for use in response to future SSL errors. The default behavior
* is to pop up a dialog.
*/
@Override
public void onReceivedSslError(XWalkView view, ValueCallback<Boolean> callback, SslError error) {
    final String packageName = parentEngine.cordova.getActivity().getPackageName();
    final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            callback.onReceiveValue(true);
        } else {
            // debug = false
            callback.onReceiveValue(false);
        }
    } catch (PackageManager.NameNotFoundException e) {
        // When it doubt, lock it out!
        callback.onReceiveValue(false);
    }
}
 
源代码7 项目: Bailan   文件: WebViewActivity.java
@Override
protected void initView() {

    String name = getIntent().getStringExtra("name");
    String url = getIntent().getStringExtra("url");

    //设置沉浸式状态栏
    setStatus();
    iv_search.setVisibility(View.VISIBLE);
    //设置沉浸式状态栏背景
    bar_layout.setBackgroundResource(R.color.black_alpha_5);

    title_text.setText(name);

    wv.setWebViewClient(new WebViewClient() {
        @Override
        public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
            super.onReceivedSslError(view, handler, error);
            handler.proceed();
        }
    });
    wv.getSettings().setJavaScriptEnabled(true);

    wv.loadUrl(url);
}
 
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = parentEngine.cordova.getActivity().getPackageName();
    final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = parentEngine.cordova.getActivity().getPackageName();
    final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
源代码10 项目: IoTgo_Android_App   文件: CordovaWebViewClient.java
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = this.cordova.getActivity().getPackageName();
    final PackageManager pm = this.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
/**
* Notify the host application that an SSL error occurred while loading a
* resource. The host application must call either callback.onReceiveValue(true)
* or callback.onReceiveValue(false). Note that the decision may be
* retained for use in response to future SSL errors. The default behavior
* is to pop up a dialog.
*/
public void onReceivedSslError(XWalkView view, ValueCallback<Boolean> callback, SslError error) {
    final String packageName = this.cordova.getActivity().getPackageName();
    final PackageManager pm = this.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            callback.onReceiveValue(true);
            return;
        } else {
            // debug = false
            callback.onReceiveValue(false);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        callback.onReceiveValue(false);
    }
}
 
源代码12 项目: keemob   文件: SystemWebViewClient.java
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = parentEngine.cordova.getActivity().getPackageName();
    final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The AmazonWebView that is initiating the callback.
 * @param handler       An AmazonSslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(AmazonWebView view, AmazonSslErrorHandler handler, SslError error) {

    final String packageName = this.cordova.getActivity().getPackageName();
    final PackageManager pm = this.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
源代码14 项目: Xndroid   文件: LightningWebClient.java
@NonNull
private static List<Integer> getAllSslErrorMessageCodes(@NonNull SslError error) {
    List<Integer> errorCodeMessageCodes = new ArrayList<>(1);

    if (error.hasError(SslError.SSL_DATE_INVALID)) {
        errorCodeMessageCodes.add(R.string.message_certificate_date_invalid);
    }
    if (error.hasError(SslError.SSL_EXPIRED)) {
        errorCodeMessageCodes.add(R.string.message_certificate_expired);
    }
    if (error.hasError(SslError.SSL_IDMISMATCH)) {
        errorCodeMessageCodes.add(R.string.message_certificate_domain_mismatch);
    }
    if (error.hasError(SslError.SSL_NOTYETVALID)) {
        errorCodeMessageCodes.add(R.string.message_certificate_not_yet_valid);
    }
    if (error.hasError(SslError.SSL_UNTRUSTED)) {
        errorCodeMessageCodes.add(R.string.message_certificate_untrusted);
    }
    if (error.hasError(SslError.SSL_INVALID)) {
        errorCodeMessageCodes.add(R.string.message_certificate_invalid);
    }

    return errorCodeMessageCodes;
}
 
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = this.cordova.getActivity().getPackageName();
    final PackageManager pm = this.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
源代码16 项目: app-icon   文件: SystemWebViewClient.java
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = parentEngine.cordova.getActivity().getPackageName();
    final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
源代码17 项目: countly-sdk-cordova   文件: SystemWebViewClient.java
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = parentEngine.cordova.getActivity().getPackageName();
    final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
源代码18 项目: Cirrus_depricated   文件: AuthenticatorActivity.java
/**
 * Show untrusted cert dialog 
 */
public void showUntrustedCertDialog(
        X509Certificate x509Certificate, SslError error, SslErrorHandler handler
    ) {
    // Show a dialog with the certificate info
    SslUntrustedCertDialog dialog;
    if (x509Certificate == null) {
        dialog = SslUntrustedCertDialog.newInstanceForEmptySslError(error, handler);
    } else {
        dialog = SslUntrustedCertDialog.
                newInstanceForFullSslError(x509Certificate, error, handler);
    }
    FragmentManager fm = getSupportFragmentManager();
    FragmentTransaction ft = fm.beginTransaction();
    ft.addToBackStack(null);
    dialog.show(ft, UNTRUSTED_CERT_DIALOG_TAG);
}
 
源代码19 项目: Cirrus_depricated   文件: SslUntrustedCertDialog.java
public static SslUntrustedCertDialog newInstanceForFullSslError(X509Certificate cert, SslError error, SslErrorHandler handler) {
    if (cert == null) {
        throw new IllegalArgumentException("Trying to create instance with parameter cert == null");
    }
    if (error == null) {
        throw new IllegalArgumentException("Trying to create instance with parameter error == null");
    }
    if (handler == null) {
        throw new IllegalArgumentException("Trying to create instance with parameter handler == null");
    }
    SslUntrustedCertDialog dialog = new SslUntrustedCertDialog();
    dialog.m509Certificate = cert;
    dialog.mHandler = handler;
    dialog.mErrorViewAdapter = new SslErrorViewAdapter(error);
    dialog.mCertificateViewAdapter = new X509CertificateViewAdapter(cert);
    return dialog;
}
 
源代码20 项目: a2cardboard   文件: SystemWebViewClient.java
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = parentEngine.cordova.getActivity().getPackageName();
    final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
源代码21 项目: chappiecast   文件: SystemWebViewClient.java
/**
 * Notify the host application that an SSL error occurred while loading a resource.
 * The host application must call either handler.cancel() or handler.proceed().
 * Note that the decision may be retained for use in response to future SSL errors.
 * The default behavior is to cancel the load.
 *
 * @param view          The WebView that is initiating the callback.
 * @param handler       An SslErrorHandler object that will handle the user's response.
 * @param error         The SSL error object.
 */
@TargetApi(8)
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {

    final String packageName = parentEngine.cordova.getActivity().getPackageName();
    final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();

    ApplicationInfo appInfo;
    try {
        appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
            // debug = true
            handler.proceed();
            return;
        } else {
            // debug = false
            super.onReceivedSslError(view, handler, error);
        }
    } catch (NameNotFoundException e) {
        // When it doubt, lock it out!
        super.onReceivedSslError(view, handler, error);
    }
}
 
源代码22 项目: movienow   文件: WebViewActivity.java
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
    Snackbar.make(webViewT, "证书校验失败,是否回撤网页?", Snackbar.LENGTH_LONG)
            .setAction("回撤", new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    onBackPressed();
                }
            }).show();
    handler.proceed();
}
 
源代码23 项目: YCAudioPlayer   文件: WebViewActivity.java
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
    if (BuildConfig.IS_DEBUG) {
        handler.proceed();
        return;
    }
    super.onReceivedSslError(view, handler, error);
    LogUtils.e("WebViewActivity-----onReceivedSslError-------" + error.getUrl());

}
 
源代码24 项目: FacebookImageShareIntent   文件: WebDialog.java
@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();
    }
}
 
源代码25 项目: FastWebView   文件: InnerFastClient.java
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
    if (mDelegate != null) {
        mDelegate.onReceivedSslError(view, handler, error);
        return;
    }
    super.onReceivedSslError(view, handler, error);
}
 
源代码26 项目: RePlugin-GameSdk   文件: HWWebView.java
@Override
		public void onReceivedSslError(WebView view, SslErrorHandler handler,
				SslError error) {
			// TODO Auto-generated method stub
//			super.onReceivedSslError(view, handler, error);
			handler.proceed();
		}
 
源代码27 项目: VideoOS-Android-SDK   文件: VenvyWebView.java
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
    if (mIwebViewClient != null) {
        mIwebViewClient.onReceivedSslError(view, handler, error);
    } else {
        handler.proceed();
        super.onReceivedSslError(view, handler, error);
    }
}
 
源代码28 项目: AndroidProject   文件: BrowserView.java
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
    // 注意一定要去除这行代码,否则设置无效。
    //super.onReceivedSslError(view, handler, error);
    // Android默认的处理方式
    //handler.cancel();
    // 接受所有网站的证书
    handler.proceed();
}
 
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
    super.onReceivedSslError(view, handler, error);

    sendErrorToListener(new KakaoWebviewException(ERROR_FAILED_SSL_HANDSHAKE, null, null));
    handler.cancel();
    dismiss();
}
 
源代码30 项目: kognitivo   文件: WebDialog.java
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
    if (DISABLE_SSL_CHECK_FOR_TESTING) {
        handler.proceed();
    } else {
        super.onReceivedSslError(view, handler, error);

        handler.cancel();
        sendErrorToListener(new FacebookDialogException(null, ERROR_FAILED_SSL_HANDSHAKE, null));
    }
}
 
 类所在包
 同包方法