OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046

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


package com.excelliance.kxqp.gs.l;

import android.content.Context;
import android.util.Log;
import com.excelliance.kxqp.bitmap.bean.RequestList;
import com.excelliance.kxqp.bitmap.bean.ResponseList;
import com.excelliance.kxqp.bitmap.model.AppInfo;
import com.excelliance.kxqp.bitmap.model.ResponseData;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bd;
import com.excelliance.kxqp.gs.util.cd;
import com.excelliance.kxqp.gs.util.cn;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.util.ArrayList;
import java.util.List;

public class g {

    private static volatile g f6604a;

    private Gson f6605b;
    private Context c;

    private g(Context context) {
        this.c = context;
    }

    public static g a(Context context) {
        if (f6604a == null) {
            synchronized (g.class) {
                if (f6604a == null) {
                    f6604a = new g(context.getApplicationContext());
                }
            }
        }
        return f6604a;
    }

    private Gson a() {
        if (this.f6605b == null) {
            this.f6605b = new Gson();
        }
        return this.f6605b;
    }

    public List<AppInfo> a(int i, int i2, String str, boolean z) {
        RequestList requestList;
        try {
            requestList = (RequestList) a().a(cn.i(this.c).toString(), new TypeToken<RequestList>() {
            }.getType());
        } catch (Exception e) {
            e.printStackTrace();
            Log.d("SinglePlayerRepository", "SinglePlayerRepository/getAppList ex: " + e.getMessage());
            requestList = null;
        }
        if (requestList != null) {
            ArrayList arrayList = new ArrayList();
            arrayList.add("all");
            requestList.setField(arrayList);
            ArrayList arrayList2 = new ArrayList();
            arrayList2.add(str);
            requestList.setId(arrayList2);
            requestList.setPage(String.valueOf(i));
            requestList.setType("list");
            requestList.setPos(z ? 1 : 0);
            requestList.setSize(String.valueOf(i2));
            requestList.setAreas(1);
            requestList.setControlapi(1);
            if (com.excelliance.kxqp.util.d.b.c) {
                requestList.setSupportMulti(1);
            }
            if (com.excelliance.kxqp.gs.util.b.bh(this.c)) {
                requestList.setIsFromDomestic(1);
            }
            requestList.setIsFromDomestic(1);
        }
        String a2 = a().a(requestList);
        az.d("SinglePlayerRepository", "SinglePlayerRepository/getAppList requestDataString:" + a2);
        return a(bd.b("https://api.ourplay.com.cn/v1/rank/typelist", a2, 10000, 10000));
    }

    public List<AppInfo> a(String str) {
        String str2;
        ResponseData responseData;
        List list;
        if (str == null) {
            return null;
        }
        try {
            str2 = cn.a(str);
        } catch (Exception unused) {
            str2 = str;
        }
        try {
            az.d("SinglePlayerRepository", "SinglePlayerRepository/getListResponseData: rawResponse:" + str);
            cd.d("SinglePlayerRepository", "SinglePlayerRepository/getListResponseData: decryptResult:" + str2);
            responseData = (ResponseData) a().a(str2, new TypeToken<ResponseData<List<ResponseList>>>() {
            }.getType());
        } catch (Exception e) {
            e = e;
            responseData = null;
        }
        try {
            az.d("SinglePlayerRepository", "SinglePlayerRepository/getListResponseData: " + responseData.data);
        } catch (Exception e2) {
            e = e2;
            az.e("SinglePlayerRepository", "SinglePlayerRepository/getListResponseDat:" + e.toString());
            return responseData != null ? null : null;
        }
        if (responseData != null || (list = (List) responseData.data) == null || list.size() <= 0 || list.get(0) == null || ((ResponseList) list.get(0)).list == null || ((ResponseList) list.get(0)).list.size() <= 0) {
            return null;
        }
        List<AppInfo> list2 = ((ResponseList) list.get(0)).list;
        az.d("SinglePlayerRepository", "SinglePlayerRepository/getListResponseData: appInfoList" + list2);
        return list2;
    }
}