// Path: app/src/main/java/com/ittianyu/pocenter/common/utils/UnsafeOkHttpUtils.java
// public class UnsafeOkHttpUtils {
//     /**
//      * don't verify certificate
//      * @return
//      */
//     public static OkHttpClient getClient() {
//         try {
//             // Create a trust manager that does not validate certificate chains
//             final TrustManager[] trustAllCerts = new TrustManager[] {
//                     new X509TrustManager() {
//                         @Override
//                         public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {
//                         }
// 
//                         @Override
//                         public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {
//                         }
// 
//                         @Override
//                         public java.security.cert.X509Certificate[] getAcceptedIssuers() {
//                             return new java.security.cert.X509Certificate[]{};
//                         }
//                     }
//             };
// 
//             // Install the all-trusting trust manager
//             final SSLContext sslContext = SSLContext.getInstance("SSL");
//             sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
//             // Create an ssl socket factory with our all-trusting manager
//             final javax.net.ssl.SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
// 
//             OkHttpClient.Builder builder = new OkHttpClient.Builder();
//             builder.sslSocketFactory(sslSocketFactory);
//             builder.hostnameVerifier(new HostnameVerifier() {
//                 @Override
//                 public boolean verify(String hostname, SSLSession session) {
//                     return true;
//                 }
//             });
// 
//             OkHttpClient okHttpClient = builder.build();
//             return okHttpClient;
//         } catch (Exception e) {
//             throw new RuntimeException(e);
//         }
//     }
// }


import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;
import com.allenliu.versionchecklib.AVersionService;
import com.google.gson.Gson;
import com.ittianyu.pocenter.BuildConfig;
import com.ittianyu.pocenter.R;
import com.ittianyu.pocenter.common.utils.UnsafeOkHttpUtils;
import com.zhy.http.okhttp.OkHttpUtils;
package com.ittianyu.pocenter.features.version;



public class CheckVersionService extends AVersionService {
    public static final String SHOW_LAST = "showLast";

    private boolean showLast = false;

    public CheckVersionService() {
// Path: app/src/main/java/com/ittianyu/pocenter/common/utils/UnsafeOkHttpUtils.java
// public class UnsafeOkHttpUtils {
//     /**
//      * don't verify certificate
//      * @return
//      */
//     public static OkHttpClient getClient() {
//         try {
//             // Create a trust manager that does not validate certificate chains
//             final TrustManager[] trustAllCerts = new TrustManager[] {
//                     new X509TrustManager() {
//                         @Override
//                         public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {
//                         }
// 
//                         @Override
//                         public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {
//                         }
// 
//                         @Override
//                         public java.security.cert.X509Certificate[] getAcceptedIssuers() {
//                             return new java.security.cert.X509Certificate[]{};
//                         }
//                     }
//             };
// 
//             // Install the all-trusting trust manager
//             final SSLContext sslContext = SSLContext.getInstance("SSL");
//             sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
//             // Create an ssl socket factory with our all-trusting manager
//             final javax.net.ssl.SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
// 
//             OkHttpClient.Builder builder = new OkHttpClient.Builder();
//             builder.sslSocketFactory(sslSocketFactory);
//             builder.hostnameVerifier(new HostnameVerifier() {
//                 @Override
//                 public boolean verify(String hostname, SSLSession session) {
//                     return true;
//                 }
//             });
// 
//             OkHttpClient okHttpClient = builder.build();
//             return okHttpClient;
//         } catch (Exception e) {
//             throw new RuntimeException(e);
//         }
//     }
// }


// Path: app/src/main/java/com/ittianyu/pocenter/features/version/CheckVersionService.java
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;
import com.allenliu.versionchecklib.AVersionService;
import com.google.gson.Gson;
import com.ittianyu.pocenter.BuildConfig;
import com.ittianyu.pocenter.R;
import com.ittianyu.pocenter.common.utils.UnsafeOkHttpUtils;
import com.zhy.http.okhttp.OkHttpUtils;

package com.ittianyu.pocenter.features.version;



public class CheckVersionService extends AVersionService {
    public static final String SHOW_LAST = "showLast";

    private boolean showLast = false;

    public CheckVersionService() {
        OkHttpUtils.initClient(UnsafeOkHttpUtils.getClient());