package com.tencent.mm.plugin.sns.ui;

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.bp.d;
import com.tencent.mm.g.a.gt;
import com.tencent.mm.g.a.ok;
import com.tencent.mm.kernel.g;
import com.tencent.mm.n.a;
import com.tencent.mm.plugin.messenger.foundation.a.j;
import com.tencent.mm.protocal.protobuf.TimeLineObject;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;

class bc$8 implements OnClickListener {
    final /* synthetic */ bc rDG;

    bc$8(bc bcVar) {
        this.rDG = bcVar;
    }

    public final void onClick(View view) {
        boolean z;
        String str;
        AppMethodBeat.i(39869);
        bc bcVar = this.rDG;
        if (view == null || !(view.getTag() instanceof TimeLineObject)) {
            z = true;
        } else {
            str = ((TimeLineObject) view.getTag()).xfH.Id;
            Intent intent;
            if ("wx485a97c844086dc9".equals(str)) {
                d.b(view.getContext(), "shake", ".ui.ShakeReportUI", new Intent().putExtra("shake_music", true));
                z = true;
            } else if ("wx7fa037cc7dfabad5".equals(str)) {
                com.tencent.mm.plugin.sport.a.d.kT(34);
                g.RQ();
                if (a.jh(((j) g.K(j.class)).XM().aoO("gh_43f2581f6fd6").field_type)) {
                    intent = new Intent();
                    intent.putExtra("Chat_User", "gh_43f2581f6fd6");
                    intent.putExtra("finish_direct", true);
                    d.f(bcVar.context, ".ui.chatting.ChattingUI", intent);
                } else {
                    intent = new Intent();
                    intent.putExtra("Contact_User", "gh_43f2581f6fd6");
                    d.b(bcVar.context, "profile", ".ui.ContactInfoUI", intent);
                }
                z = true;
            } else if ("wx9181ed3f223e6d76".equals(str) || "wx2fe12a395c426fcf".equals(str)) {
                ab.i("MicroMsg.TimeLineClickEvent", "hy: shake new year closed. try to go to shake TV");
                intent = new Intent();
                intent.putExtra("shake_tv", true);
                d.b(view.getContext(), "shake", ".ui.ShakeReportUI", intent);
                z = true;
            } else if ("wx751a1acca5688ba3".equals(str)) {
                intent = new Intent();
                intent.putExtra("BaseScanUI_select_scan_mode", 5);
                if (!(com.tencent.mm.r.a.bI(bcVar.context) || com.tencent.mm.r.a.bH(bcVar.context))) {
                    d.b(bcVar.context, "scanner", ".ui.BaseScanUI", intent);
                }
                z = true;
            } else if ("wxfbc915ff7c30e335".equals(str)) {
                intent = new Intent();
                intent.putExtra("BaseScanUI_select_scan_mode", 1);
                if (!(com.tencent.mm.r.a.bI(bcVar.context) || com.tencent.mm.r.a.bH(bcVar.context))) {
                    d.b(bcVar.context, "scanner", ".ui.BaseScanUI", intent);
                }
                z = true;
            } else if ("wx482a4001c37e2b74".equals(str)) {
                intent = new Intent();
                intent.putExtra("BaseScanUI_select_scan_mode", 2);
                if (!(com.tencent.mm.r.a.bI(bcVar.context) || com.tencent.mm.r.a.bH(bcVar.context))) {
                    d.b(bcVar.context, "scanner", ".ui.BaseScanUI", intent);
                }
                z = true;
            } else if (!"wxaf060266bfa9a35c".equals(str)) {
                z = false;
            } else if (com.tencent.mm.aw.d.aim()) {
                intent = new Intent();
                intent.putExtra("shake_tv", true);
                d.b(bcVar.context, "shake", ".ui.ShakeReportUI", intent);
                z = true;
            } else {
                z = true;
            }
        }
        if (!z) {
            if (view == null || !(view.getTag() instanceof TimeLineObject)) {
                AppMethodBeat.o(39869);
                return;
            }
            TimeLineObject timeLineObject = (TimeLineObject) view.getTag();
            if (timeLineObject == null || timeLineObject.xfH == null) {
                ab.e("MicroMsg.TimeLineClickEvent", "appInfo is null");
                AppMethodBeat.o(39869);
                return;
            }
            String str2 = timeLineObject.xfH.Id;
            String df = com.tencent.mm.plugin.sns.c.a.gkF.df(str2);
            if (bo.isNullOrNil(df)) {
                str = com.tencent.mm.plugin.sns.c.a.gkF.f(this.rDG.context, str2, "timeline");
                if (str == null || str.length() == 0) {
                    AppMethodBeat.o(39869);
                    return;
                }
                Intent intent2 = new Intent();
                intent2.putExtra("rawUrl", str);
                intent2.putExtra("shortUrl", str);
                intent2.putExtra("useJs", true);
                intent2.putExtra("type", -255);
                intent2.putExtra("geta8key_scene", 2);
                com.tencent.mm.plugin.sns.c.a.gkE.i(intent2, this.rDG.context);
            } else {
                int i;
                String str3 = timeLineObject == null ? null : timeLineObject.jBB;
                if (timeLineObject.xfI.wbJ == 1) {
                    i = 2;
                } else if (timeLineObject.xfI.wbJ == 3) {
                    i = 5;
                } else {
                    i = 2;
                }
                String str4 = null;
                if (!(timeLineObject.qNO == null || timeLineObject.qNO.vCy == null)) {
                    str4 = timeLineObject.qNO.vCy.vCs;
                }
                ok okVar = new ok();
                okVar.cKI.context = this.rDG.context;
                okVar.cKI.scene = 4;
                okVar.cKI.csB = str2;
                okVar.cKI.packageName = df;
                okVar.cKI.msgType = i;
                okVar.cKI.cEV = str3;
                okVar.cKI.mediaTagName = str4;
                okVar.cKI.cKJ = 5;
                okVar.cKI.cKK = 0;
                okVar.cKI.cKL = timeLineObject.Id;
                com.tencent.mm.sdk.b.a.xxA.m(okVar);
                gt gtVar = new gt();
                gtVar.cBv.actionCode = 2;
                gtVar.cBv.scene = 3;
                gtVar.cBv.extMsg = "timeline_src=3";
                gtVar.cBv.appId = str2;
                gtVar.cBv.context = this.rDG.context;
                com.tencent.mm.sdk.b.a.xxA.m(gtVar);
                AppMethodBeat.o(39869);
                return;
            }
        }
        AppMethodBeat.o(39869);
    }
}
