JieJing Cleaner v1.4.2版本的 MD5 值为:a574eea9fb07160f0bbb08ba0adf1c62

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


package com.bytedance.pangle.download;

import android.os.Build;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bytedance.frameworks.core.encrypt.RequestEncryptUtils;
import com.bytedance.pangle.Zeus;
import com.bytedance.pangle.ZeusParam;
import com.bytedance.pangle.plugin.Plugin;
import com.bytedance.pangle.plugin.PluginManager;
import com.kwad.v8.Platform;
import com.umeng.analytics.pro.ak;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class e {
    public static String a() {
        ZeusParam zeusParam = com.bytedance.pangle.h.a().b;
        String host = zeusParam.getHost();
        if (TextUtils.isEmpty(host)) {
            host = "https://plugin-patch-api.bytedance.com/api/plugin/config/v2/";
        }
        StringBuilder sb = new StringBuilder(host);
        sb.append("?");
        a(sb, "device_id", zeusParam.getDid().get());
        a(sb, "ac", d.c(Zeus.getAppApplication()));
        a(sb, "channel", zeusParam.getChannel());
        a(sb, "aid", String.valueOf(zeusParam.getAppId()));
        a(sb, "app_name", zeusParam.getAppName());
        a(sb, "version_code", String.valueOf(zeusParam.getHostVersionCode()));
        a(sb, "update_version_code", String.valueOf(zeusParam.getHostVersionCode()));
        a(sb, "version_name", zeusParam.getHostVersionName());
        a(sb, "device_platform", Platform.ANDROID);
        String a = i.a(Zeus.getAppApplication());
        if (!TextUtils.isEmpty(a)) {
            a(sb, ak.z, a);
        }
        int b = i.b(Zeus.getAppApplication());
        if (b > 0) {
            a(sb, "dpi", String.valueOf(b));
        }
        a(sb, "device_type", Build.MODEL);
        a(sb, "device_brand", Build.BRAND);
        a(sb, ak.N, Locale.getDefault().getLanguage());
        a(sb, "os_api", String.valueOf(Build.VERSION.SDK_INT));
        try {
            String str = Build.VERSION.RELEASE;
            if (str != null && str.length() > 10) {
                str = str.substring(0, 10);
            }
            a(sb, ak.y, str);
        } catch (Exception unused) {
        }
        a(sb, "host_abi", com.bytedance.pangle.helper.b.a());
        a(sb, "ts", String.valueOf(System.currentTimeMillis()));
        sb.deleteCharAt(sb.length() - 1);
        return sb.toString();
    }

    @Nullable
    public static JSONArray b() {
        List<Plugin> plugins = PluginManager.getInstance().getPlugins();
        if (plugins == null || plugins.isEmpty()) {
            return null;
        }
        JSONArray jSONArray = new JSONArray();
        for (Plugin plugin : plugins) {
            if (plugin != null) {
                try {
                    jSONArray.put(a(plugin));
                } catch (JSONException e) {
                    e.printStackTrace();
                }
            }
        }
        return jSONArray;
    }

    public static void a(StringBuilder sb, String str, String str2) {
        sb.append(str);
        sb.append(RequestEncryptUtils.NAME_VALUE_SEPARATOR);
        sb.append(str2);
        sb.append(RequestEncryptUtils.PARAMETER_SEPARATOR);
    }

    public static PluginDownloadBean a(@NonNull JSONObject jSONObject) {
        PluginDownloadBean pluginDownloadBean = new PluginDownloadBean();
        pluginDownloadBean.mPackageName = jSONObject.optString("packagename");
        pluginDownloadBean.mVersionCode = jSONObject.optInt("versioncode");
        pluginDownloadBean.mUrl = jSONObject.optString("url");
        pluginDownloadBean.mMd5 = jSONObject.optString("md5");
        pluginDownloadBean.mOrder = jSONObject.optInt("Order");
        pluginDownloadBean.isOffline = jSONObject.optBoolean("offline");
        pluginDownloadBean.isRevert = jSONObject.optBoolean("revert");
        pluginDownloadBean.isWifiOnly = jSONObject.optBoolean("wifionly", true);
        pluginDownloadBean.mClientVersionMin = jSONObject.optInt("clientversion_min", 0);
        pluginDownloadBean.mClientVersionMax = jSONObject.optInt("clientversion_max", Integer.MAX_VALUE);
        int optInt = jSONObject.optInt("download_type", 0);
        pluginDownloadBean.mDownloadType = optInt != 2 ? optInt : 1;
        if (pluginDownloadBean.mClientVersionMax == 0) {
            pluginDownloadBean.mClientVersionMax = Integer.MAX_VALUE;
        }
        pluginDownloadBean.mBackupUrlList = new LinkedList();
        JSONArray optJSONArray = jSONObject.optJSONArray("backup_urls");
        if (optJSONArray != null && optJSONArray.length() > 0) {
            for (int i2 = 0; i2 < optJSONArray.length(); i2++) {
                pluginDownloadBean.mBackupUrlList.add(optJSONArray.getString(i2));
            }
        }
        return pluginDownloadBean;
    }

    @NonNull
    public static JSONObject a(@NonNull Plugin plugin) {
        JSONObject jSONObject = new JSONObject();
        jSONObject.putOpt("packagename", plugin.mPkgName);
        jSONObject.putOpt("versioncode", Integer.valueOf(plugin.getVersion()));
        jSONObject.putOpt("maxversion", Integer.valueOf(plugin.mMaxVersionCode));
        jSONObject.putOpt("minversion", Integer.valueOf(plugin.mMinVersionCode));
        return jSONObject;
    }
}