酷狗概念版 v2.5.5版本的 MD5 值为:782d327088fca4e58310f35a56f41319

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


package com.kugou.android.station.main.special.edit;

import android.support.v4.app.NotificationCompat;
import c.t;
import com.huawei.hms.push.constant.RemoteMessageConst;
import com.kugou.android.app.home.channel.protocol.bi;
import com.kugou.android.topic2.detail.base.CommonListResponse;
import com.kugou.android.topic2.submit.special.adapter.SubmitSpecialEntity;
import com.kugou.common.app.KGCommonApplication;
import com.kugou.common.network.w;
import com.kugou.common.utils.as;
import com.kugou.common.utils.br;
import com.tencent.open.SocialOperation;
import com.tencent.stat.DeviceInfo;
import d.ab;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import kotlin.Metadata;
import org.jetbrains.annotations.NotNull;
import org.json.JSONArray;
import org.json.JSONObject;

@Metadata(bv = {1, 0, 3}, d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0000\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J,\u0010\u0007\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\n0\t0\b2\u0006\u0010\u000b\u001a\u00020\u00042\u0006\u0010\f\u001a\u00020\u00042\b\b\u0002\u0010\r\u001a\u00020\u000eR\u0014\u0010\u0003\u001a\u00020\u00048BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u000f"}, d2 = {"Lcom/kugou/android/station/main/special/edit/GetAddSpecialListProtocol;", "", "()V", "moduleName", "", "getModuleName", "()Ljava/lang/String;", "getList", "Lrx/Observable;", "Lcom/kugou/android/topic2/detail/base/CommonListResponse;", "Lcom/kugou/android/station/main/special/edit/MultiTypeEntity;", RemoteMessageConst.Notification.CHANNEL_ID, "moduleId", "isDraft", "", "androidkugou_release"}, k = 1, mv = {1, 1, 15})
public final class GetAddSpecialListProtocol {

    public static final GetAddSpecialListProtocol f40962a = new GetAddSpecialListProtocol();

    private final String a() {
        return "get_special_list";
    }

    private GetAddSpecialListProtocol() {
    }

    @NotNull
    public final rx.e<CommonListResponse<MultiTypeEntity>> a(@NotNull String str, @NotNull String str2, boolean z) {
        kotlin.jvm.internal.i.b(str, RemoteMessageConst.Notification.CHANNEL_ID);
        kotlin.jvm.internal.i.b(str2, "moduleId");
        t b2 = new t.a().b(a()).a(c.a.a.i.a()).a(w.a(com.kugou.android.app.a.a.vu, "https://youth.kugou.com/api/amway/v2/get_special_list")).a(c.b.a.a.a()).a().b();
        HashMap hashMap = new HashMap();
        hashMap.put("appid", Integer.valueOf(com.kugou.common.config.c.a().d(com.kugou.android.app.a.a.lo)));
        hashMap.put("clientver", Integer.valueOf(br.F(KGCommonApplication.getContext())));
        hashMap.put("clienttime", Long.valueOf(br.d() / 1000));
        String j = br.j(KGCommonApplication.getContext());
        kotlin.jvm.internal.i.a((Object) j, "SystemUtils.getMid(KGCom…Application.getContext())");
        hashMap.put(DeviceInfo.TAG_MID, j);
        com.kugou.common.q.b a2 = com.kugou.common.q.b.a();
        kotlin.jvm.internal.i.a((Object) a2, "CommonSettingPrefs.getInstance()");
        String cS = a2.cS();
        kotlin.jvm.internal.i.a((Object) cS, "CommonSettingPrefs.getIn…deviceFingerIdDateNotNull");
        hashMap.put("dfid", cS);
        com.kugou.common.q.b a3 = com.kugou.common.q.b.a();
        kotlin.jvm.internal.i.a((Object) a3, "CommonSettingPrefs.getInstance()");
        String ak = a3.ak();
        kotlin.jvm.internal.i.a((Object) ak, "CommonSettingPrefs.getInstance().uuid");
        hashMap.put("uuid", ak);
        hashMap.put("global_collection_id", str);
        hashMap.put("id", str2);
        hashMap.put("page", 1);
        hashMap.put("is_draft", Integer.valueOf(z ? 1 : 0));
        hashMap.put("pagesize", 20);
        String a4 = w.a(w.c(hashMap));
        kotlin.jvm.internal.i.a((Object) a4, "Utils.getSign(Utils.map2SortString(params))");
        hashMap.put(SocialOperation.GAME_SIGNATURE, a4);
        rx.e c2 = ((bi) b2.a(bi.class)).a(hashMap).c(a.f40963a);
        kotlin.jvm.internal.i.a((Object) c2, "request.create(IChannelC…         }\n            })");
        return c2;
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0018\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a>\u0012\u0018\u0012\u0016\u0012\u0004\u0012\u00020\u0003 \u0004*\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u00020\u0002 \u0004*\u001e\u0012\u0018\u0012\u0016\u0012\u0004\u0012\u00020\u0003 \u0004*\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u00020\u0002\u0018\u00010\u00010\u00012\u000e\u0010\u0005\u001a\n \u0004*\u0004\u0018\u00010\u00060\u0006H\n¢\u0006\u0002\b\u0007"}, d2 = {"<anonymous>", "Lrx/Observable;", "Lcom/kugou/android/topic2/detail/base/CommonListResponse;", "Lcom/kugou/android/station/main/special/edit/MultiTypeEntity;", "kotlin.jvm.PlatformType", "responseBody", "Lokhttp3/ResponseBody;", NotificationCompat.CATEGORY_CALL}, k = 3, mv = {1, 1, 15})
    static final class a<T, R> implements rx.b.e<ab, rx.e<CommonListResponse<MultiTypeEntity>>> {

        public static final a f40963a = new a();

        a() {
        }

        @Override
        public final rx.e<CommonListResponse<MultiTypeEntity>> call(ab abVar) {
            String str = (String) null;
            try {
                String f = abVar.f();
                as.f("lzq-young", f);
                JSONObject jSONObject = new JSONObject(f != null ? f : "");
                int optInt = jSONObject.optInt("status");
                int optInt2 = jSONObject.optInt("error_code");
                CommonListResponse commonListResponse = new CommonListResponse(0, null, 0, 0, null, 31, null);
                commonListResponse.a(optInt);
                commonListResponse.b(optInt2);
                if (optInt == 1) {
                    ArrayList arrayList = new ArrayList();
                    JSONObject optJSONObject = jSONObject.optJSONObject("data");
                    optJSONObject.optInt("is_end");
                    JSONArray optJSONArray = optJSONObject.optJSONArray("list");
                    if (optJSONArray != null) {
                        ArrayList arrayList2 = new ArrayList();
                        int length = optJSONArray.length();
                        for (int i = 0; i < length; i++) {
                            arrayList2.add(new PlaylistWrapper(new SubmitSpecialEntity(null, com.kugou.android.netmusic.bills.classfication.entity.e.fromJsonObject(optJSONArray.getJSONObject(i)), null, 5, null)));
                        }
                        arrayList.addAll(arrayList2);
                        commonListResponse.a((List) arrayList2);
                    }
                    commonListResponse.e(1);
                    return rx.e.a(commonListResponse);
                }
                return rx.e.a((Throwable) new com.kugou.android.app.home.channel.f.d(optInt2));
            } catch (Exception e2) {
                e2.printStackTrace();
                return rx.e.a((Throwable) new com.kugou.android.app.home.channel.f.c(str));
            }
        }
    }
}