package com.tencent.mm.plugin.sns.storage.AdLandingPagesStorage.AdLandingPageComponent.component;

import android.content.Intent;
import android.text.TextUtils;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.bp.d;
import com.tencent.mm.plugin.sns.model.AdLandingPagesProxy.e;
import com.tencent.mm.protocal.protobuf.qc;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import java.io.IOException;

class m$2 implements e {
    final /* synthetic */ m qZO;

    m$2(m mVar) {
        this.qZO = mVar;
    }

    public final void ao(Object obj) {
    }

    public final void f(int i, int i2, Object obj) {
        AppMethodBeat.i(37101);
        if (i == 0 && i2 == 0) {
            qc qcVar = new qc();
            try {
                qcVar.parseFrom((byte[]) obj);
            } catch (IOException e) {
                ab.e("MicroMsg.AdLandingPageDownloadApkBtnComp", bo.l(e));
            }
            if (!TextUtils.isEmpty(qcVar.vGi)) {
                ab.d("MicroMsg.AdLandingPageDownloadApkBtnComp", "opening url " + qcVar.vGi);
                Intent intent = new Intent();
                intent.putExtra("rawUrl", qcVar.vGi);
                intent.putExtra("showShare", true);
                d.b(this.qZO.context, "webview", ".ui.tools.WebViewUI", intent);
                m.a(this.qZO).sendMessage(10);
                AppMethodBeat.o(37101);
                return;
            } else if (qcVar.vXh != null) {
                m.b(this.qZO).qVM = qcVar.vXh.kKY;
                m.b(this.qZO).cvZ = qcVar.vXh.kLL;
                m.b(this.qZO).downloadUrl = qcVar.vXh.vXa;
                m.b(this.qZO).fileSize = (long) qcVar.vXh.vXd;
                m.a(this.qZO).sendMessage(6);
                AppMethodBeat.o(37101);
                return;
            } else {
                ab.i("MicroMsg.AdLandingPageDownloadApkBtnComp", "resp null");
                m.a(this.qZO).sendMessage(5);
                AppMethodBeat.o(37101);
                return;
            }
        }
        m.a(this.qZO).sendMessage(5);
        AppMethodBeat.o(37101);
    }
}
