导航菜单

页面标题

页面副标题

MX Player v1.97.8 - a.java 源代码

正在查看: MX Player v1.97.8 应用的 a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.mxtech.videoplayer.ad.online.inappnotify;

import android.os.AsyncTask;
import com.mxtech.videoplayer.ad.online.apiclient.UrlInvalidException;
import com.mxtech.videoplayer.ad.online.model.bean.next.OnlineResource;
import defpackage.c0;
import defpackage.py8;
import java.io.IOException;
import java.util.ArrayList;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public final class a extends AsyncTask<Object, Object, InAppNotifyResource> {
    public final InAppNotifyResource a;
    public final InterfaceC0077a b;
    public b c;

    public interface InterfaceC0077a {
        void a1(b bVar, InAppNotifyResource inAppNotifyResource);
    }

    public static final class b {
        public static final b b;
        public static final b c;
        public static final b d;
        public static final b[] f;

        static {
            b bVar = new b("OK", 0);
            b = bVar;
            b bVar2 = new b("NETWORK_ERROR", 1);
            c = bVar2;
            b bVar3 = new b("GENERIC_ERROR", 2);
            d = bVar3;
            f = new b[]{bVar, bVar2, bVar3};
        }

        public b() {
            throw null;
        }

        public static b valueOf(String str) {
            return (b) Enum.valueOf(b.class, str);
        }

        public static b[] values() {
            return (b[]) f.clone();
        }
    }

    public a(InAppNotifyResource inAppNotifyResource, InterfaceC0077a interfaceC0077a) {
        this.a = inAppNotifyResource;
        this.b = interfaceC0077a;
    }

    @Override
    public final InAppNotifyResource doInBackground(Object[] objArr) {
        b bVar = b.c;
        b bVar2 = b.d;
        InAppNotifyResource inAppNotifyResource = null;
        try {
            JSONObject jSONObject = new JSONObject();
            InAppNotifyResource inAppNotifyResource2 = this.a;
            jSONObject.put("path", inAppNotifyResource2 != null ? inAppNotifyResource2.nextUrl : "mxplay://www.mxplay.com/top_view");
            JSONObject optJSONObject = new JSONObject(c0.k("https://androidapi.mxplay.com/v1/deeplink/parser", jSONObject.toString())).optJSONArray("resources").optJSONObject(0);
            String optString = optJSONObject.optString("nextUrl");
            String optString2 = optJSONObject.optString("refreshUrl");
            JSONObject optJSONObject2 = optJSONObject.optJSONObject("topChart");
            String[] strArr = {optJSONObject2.optString("light"), optJSONObject2.optString("dark")};
            JSONObject optJSONObject3 = optJSONObject.optJSONObject("barBg");
            String[] strArr2 = {optJSONObject3.optString("light"), optJSONObject3.optString("dark")};
            JSONArray optJSONArray = optJSONObject.optJSONArray("resources");
            ArrayList arrayList = new ArrayList();
            ArrayList arrayList2 = new ArrayList();
            for (int i = 0; i < optJSONArray.length(); i++) {
                JSONObject jSONObject2 = optJSONArray.getJSONObject(i);
                OnlineResource from = OnlineResource.from(jSONObject2);
                arrayList.add(new py8(from, jSONObject2.optString("category"), jSONObject2.optString("viewCountDesc")));
                arrayList2.add(from);
            }
            InAppNotifyResource inAppNotifyResource3 = new InAppNotifyResource(optString, optString2, arrayList, arrayList2, strArr, strArr2, optJSONObject.optString("topText", ""));
            try {
                this.c = b.b;
                return inAppNotifyResource3;
            } catch (UrlInvalidException unused) {
                inAppNotifyResource = inAppNotifyResource3;
                this.c = bVar;
                return inAppNotifyResource;
            } catch (IOException unused2) {
                inAppNotifyResource = inAppNotifyResource3;
                this.c = bVar;
                return inAppNotifyResource;
            } catch (JSONException unused3) {
                inAppNotifyResource = inAppNotifyResource3;
                this.c = bVar2;
                return inAppNotifyResource;
            } catch (Exception unused4) {
                inAppNotifyResource = inAppNotifyResource3;
                this.c = bVar2;
                return inAppNotifyResource;
            }
        } catch (UrlInvalidException unused5) {
        } catch (IOException unused6) {
        } catch (JSONException unused7) {
        } catch (Exception unused8) {
        }
    }

    @Override
    public final void onPostExecute(InAppNotifyResource inAppNotifyResource) {
        InAppNotifyResource inAppNotifyResource2 = inAppNotifyResource;
        this.b.a1(this.c, inAppNotifyResource2 != null ? inAppNotifyResource2.mergeOriginal(this.a) : null);
    }
}