Shandong video conference v3.2.10版本的 MD5 值为:e9e908f971313b4c4bca5737f96781ef

以下内容为反编译后的 a.java 源代码,内容仅作参考


package e.l.b.b;

import android.content.Context;
import android.content.SharedPreferences;
import android.log.L;
import android.text.TextUtils;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.xylink.net.client.CommonHttpLoggingInterceptor;
import com.xylink.net.client.i;
import com.xylink.net.e.c;
import com.xylink.net.manager.f;
import com.xylink.net.manager.g;
import java.util.concurrent.TimeUnit;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
public class a {
    private static final String f16347d = "AppConfigManager";
    private static final String f16348e = "orig_host_url";
    private static final String f16349f = "orig_http_port";
    private static final String f16350g = "orig_https_port";
    private Context a;
    private OkHttpClient f16351b;
    private SharedPreferences f16352c;

    class C0300a implements CommonHttpLoggingInterceptor.a {
        C0300a() {
        }

        @Override
        public void log(String str) {
            L.i("RestApi", str);
        }
    }

    public static class b {
        private static final a a = new a(null);

        private b() {
        }
    }

    a(C0300a c0300a) {
        this();
    }

    public static String e() {
        return com.ainemo.android.preferences.a.s().o() ? com.ainemo.android.b.f5988k : c.f();
    }

    public static a f() {
        return b.a;
    }

    public void a(Context context) {
        this.a = context.getApplicationContext();
        this.f16352c = e.l.g.a.a(context, f16347d);
    }

    public void b(String str, Callback callback) {
        Request.Builder builder = new Request.Builder();
        this.f16351b.newCall(builder.url(com.ainemo.android.b.G + str).build()).enqueue(callback);
    }

    public void c() {
        String string = this.f16352c.getString(f16348e, "");
        String string2 = this.f16352c.getString(f16349f, "");
        String string3 = this.f16352c.getString(f16350g, "");
        if (TextUtils.isEmpty(string) && TextUtils.isEmpty(string2) && TextUtils.isEmpty(string3)) {
            return;
        }
        if (!TextUtils.isEmpty(string)) {
            L.i(f16347d, "recoverOrigServer, origHost : " + string);
            c.a(string);
            this.f16352c.edit().putString(f16348e, "").commit();
        }
        if (!TextUtils.isEmpty(string2)) {
            L.i(f16347d, "recoverOrigServer, origHttpPort : " + string2);
            c.b(string2);
            this.f16352c.edit().putString(f16349f, "").commit();
        }
        if (!TextUtils.isEmpty(string3)) {
            L.i(f16347d, "recoverOrigServer, origHttpsPort : " + string3);
            c.c(string3);
            this.f16352c.edit().putString(f16350g, "").commit();
        }
        g.R();
        f.B().a(this.a);
    }

    public Call d() {
        JsonObject jsonObject = new JsonObject();
        JsonArray jsonArray = new JsonArray();
        jsonArray.add("10675");
        jsonObject.add("ids", jsonArray);
        return this.f16351b.newCall(new Request.Builder().post(RequestBody.create((MediaType) null, e.a.b.b.a(jsonObject))).url("https://matrixtestdev.xylink.com/ai/face/usersInfo").build());
    }

    private a() {
        CommonHttpLoggingInterceptor commonHttpLoggingInterceptor = new CommonHttpLoggingInterceptor(new C0300a());
        commonHttpLoggingInterceptor.a(CommonHttpLoggingInterceptor.Level.BODY);
        commonHttpLoggingInterceptor.a(2000L);
        commonHttpLoggingInterceptor.b(2000L);
        this.f16351b = new OkHttpClient().newBuilder().connectTimeout(10L, TimeUnit.SECONDS).readTimeout(10L, TimeUnit.SECONDS).writeTimeout(10L, TimeUnit.SECONDS).addInterceptor(new i()).addInterceptor(commonHttpLoggingInterceptor).build();
    }

    public void a(String str, String str2, String str3) {
        L.i(f16347d, "replaceServerTemply, host : " + str + ", httpPort : " + str2 + ", httpsPort : " + str3);
        if (TextUtils.isEmpty(str) && TextUtils.isEmpty(str2) && TextUtils.isEmpty(str3)) {
            return;
        }
        if (!TextUtils.isEmpty(str)) {
            this.f16352c.edit().putString(f16348e, c.f()).commit();
            c.a(str);
        }
        if (!TextUtils.isEmpty(str2)) {
            this.f16352c.edit().putString(f16349f, c.g()).commit();
            c.b(str2);
        }
        if (!TextUtils.isEmpty(str3)) {
            this.f16352c.edit().putString(f16350g, c.h()).commit();
            c.b(str3);
        }
        g.R();
        f.B().a(this.a);
    }

    public void b() {
        L.i(f16347d, "correctServerAddress, getZoneHasChangedByUser : " + com.ainemo.android.preferences.a.s().p() + ", host : " + c.f());
        if (com.ainemo.android.preferences.a.s().p()) {
            return;
        }
        "cloud.xylink.com".equals(c.f());
    }

    public void a() {
        L.i(f16347d, "correctCommonServer, host : " + e());
        if (c.f() == null || c.f().equals(e())) {
            return;
        }
        c.a(e());
        g.R();
        f.B().a(this.a);
        com.ainemo.android.preferences.a.s().g(false);
    }

    public void a(String str, Callback callback) {
        this.f16351b.newCall(new Request.Builder().url(str).build()).enqueue(callback);
    }
}