package com.tencent.mm.plugin.scanner.a;

import android.app.Activity;
import android.os.Bundle;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.g.a.cf;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.scanner.util.a;
import com.tencent.mm.plugin.scanner.util.a.1;
import com.tencent.mm.plugin.scanner.util.e;
import com.tencent.mm.plugin.scanner.util.r;
import com.tencent.mm.sdk.b.b;
import com.tencent.mm.sdk.b.c;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.mm.ui.base.h;

class b$2 extends c<cf> {
    final /* synthetic */ b pZA;

    b$2(b bVar) {
        this.pZA = bVar;
        AppMethodBeat.i(80825);
        this.xxI = cf.class.getName().hashCode();
        AppMethodBeat.o(80825);
    }

    public final /* synthetic */ boolean a(b bVar) {
        int i = 2;
        AppMethodBeat.i(80826);
        cf cfVar = (cf) bVar;
        if (cfVar == null || !(cfVar instanceof cf)) {
            ab.e("MicroMsg.ExternRequestDealQBarStrHandler", "event is null or not a DealQBarStrEvent instance");
        } else {
            this.pZA.cgE();
            this.pZA.pZu = cfVar.cvm.ctB;
            this.pZA.mActivity = cfVar.cvm.activity;
            ab.i("MicroMsg.ExternRequestDealQBarStrHandler", "request deal qbar, activity:%s, str:%s, codeType: %s, codeVersion: %s, from : %d", new Object[]{this.pZA.mActivity, this.pZA.pZu, Integer.valueOf(cfVar.cvm.cvn), Integer.valueOf(cfVar.cvm.cvo), Integer.valueOf(cfVar.cvm.from)});
            if (cfVar.cvm.cvn == 19 || cfVar.cvm.cvn == 22) {
                this.pZA.pZv = new e();
                this.pZA.pZv.cvp = cfVar.cvm.cvp;
                this.pZA.pZv.imagePath = cfVar.cvm.imagePath;
                this.pZA.pZv.cvr = cfVar.cvm.cvr;
                this.pZA.pZv.source = cfVar.cvm.source;
                if (cfVar.cvm.from >= 0) {
                    i = 3;
                }
                if (cfVar.cvm.scene > 0) {
                    this.pZA.pZv.jSW = cfVar.cvm.scene;
                }
                if (i == 3) {
                    this.pZA.pZv.appId = cfVar.cvm.cvq;
                }
                this.pZA.pZv.a(this.pZA.mActivity, this.pZA.pZu, i, cfVar.cvm.cvn, cfVar.cvm.cvo, this.pZA.pZx, cfVar.cvm.cvs);
            } else {
                this.pZA.pZw = new a();
                a aVar = this.pZA.pZw;
                Activity activity = this.pZA.mActivity;
                String str = this.pZA.pZu;
                int i2 = cfVar.cvm.cvn;
                int i3 = cfVar.cvm.cvo;
                Bundle bundle = cfVar.cvm.cvs;
                if (!bo.isNullOrNil(str)) {
                    String[] split = str.split(",");
                    if (split == null || split.length < 2) {
                        ab.e("MicroMsg.BarcodeStringHandler", "wrong zbar format");
                    } else {
                        aVar.czX = activity;
                        aVar.cvs = bundle;
                        g gVar = new g(r.Ws(split[0]), split[1], i2, i3);
                        g.Rg().a(1061, aVar);
                        g.Rg().a(gVar, 0);
                        activity.getString(2131297061);
                        aVar.ehJ = h.b(activity, activity.getString(2131302102), true, new 1(aVar, gVar));
                    }
                }
            }
        }
        AppMethodBeat.o(80826);
        return false;
    }
}
