package com.tencent.mm.plugin.webview.luggage.permission;

import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ai.f;
import com.tencent.mm.ai.m;
import com.tencent.mm.kernel.g;
import com.tencent.mm.modelsimple.h;
import com.tencent.mm.plugin.appbrand.ipc.MainProcessTask;
import com.tencent.mm.protocal.protobuf.adp;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.ytcommon.BuildConfig;
import java.io.IOException;

public final class LuggageGetA8Key$RunCgiTask extends MainProcessTask implements f {
    public static final Creator<LuggageGetA8Key$RunCgiTask> CREATOR = new 1();
    String aIm;
    String appId;
    int boZ;
    byte[] cPB;
    int ctE;
    int errCode;
    int errType;
    int scene;
    adp uli;
    Runnable ulj;
    h ulk;
    private byte[] ull;
    String url;
    String username;

    public LuggageGetA8Key$RunCgiTask(String str, String str2, int i, int i2, int i3, String str3, byte[] bArr) {
        AppMethodBeat.i(6460);
        this.url = str;
        this.username = str2;
        this.scene = i;
        this.boZ = i2;
        this.ctE = i3;
        this.appId = str3;
        this.cPB = bArr;
        aBV();
        AppMethodBeat.o(6460);
    }

    public final void asP() {
        AppMethodBeat.i(6461);
        ab.i("MicroMsg.LuggageGetA8Key.RunCgiTask", "start, url: %s", new Object[]{this.url});
        this.ulk = new h(this.url, this.username, this.scene, this.boZ, 0, LuggageGetA8Key.access$200(), this.ctE, this.appId, BuildConfig.FLAVOR, 0, this.cPB);
        g.RO().eJo.a(233, this);
        g.RO().eJo.a(this.ulk, 0);
        AppMethodBeat.o(6461);
    }

    public final void onSceneEnd(int i, int i2, String str, m mVar) {
        AppMethodBeat.i(6462);
        if (mVar != this.ulk) {
            AppMethodBeat.o(6462);
            return;
        }
        ab.i("MicroMsg.LuggageGetA8Key.RunCgiTask", "onSceneEnd, url: %s", new Object[]{this.url});
        g.RO().eJo.b(233, this);
        this.errType = i;
        this.errCode = i2;
        this.aIm = str;
        try {
            this.ull = ((h) mVar).ehh.fsH.fsP.toByteArray();
        } catch (Exception e) {
        }
        aCb();
        AppMethodBeat.o(6462);
    }

    public final void asQ() {
        AppMethodBeat.i(6463);
        ab.i("MicroMsg.LuggageGetA8Key.RunCgiTask", "runInClientProcess: %s", new Object[]{this.url});
        try {
            aBW();
            if (this.ull != null) {
                this.uli = new adp();
                this.uli.parseFrom(this.ull);
            }
            this.ulj.run();
            AppMethodBeat.o(6463);
        } catch (IOException e) {
            ab.printErrStackTrace("MicroMsg.LuggageGetA8Key.RunCgiTask", e, BuildConfig.FLAVOR, new Object[0]);
            AppMethodBeat.o(6463);
        }
    }

    public final void g(Parcel parcel) {
        AppMethodBeat.i(6464);
        this.url = parcel.readString();
        this.username = parcel.readString();
        this.scene = parcel.readInt();
        this.boZ = parcel.readInt();
        this.ctE = parcel.readInt();
        this.appId = parcel.readString();
        this.cPB = parcel.createByteArray();
        this.ull = parcel.createByteArray();
        this.errType = parcel.readInt();
        this.errCode = parcel.readInt();
        this.aIm = parcel.readString();
        AppMethodBeat.o(6464);
    }

    public final void writeToParcel(Parcel parcel, int i) {
        AppMethodBeat.i(6465);
        parcel.writeString(this.url);
        parcel.writeString(this.username);
        parcel.writeInt(this.scene);
        parcel.writeInt(this.boZ);
        parcel.writeInt(this.ctE);
        parcel.writeString(this.appId);
        parcel.writeByteArray(this.cPB);
        parcel.writeByteArray(this.ull);
        parcel.writeInt(this.errType);
        parcel.writeInt(this.errCode);
        parcel.writeString(this.aIm);
        AppMethodBeat.o(6465);
    }

    static {
        AppMethodBeat.i(6466);
        AppMethodBeat.o(6466);
    }
}
