package com.tencent.mm.plugin.appbrand.jsapi.media;

import com.tencent.luggage.g.d;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.choosemsgfile.compat.MsgFile;
import com.tencent.mm.choosemsgfile.compat.a.a;
import com.tencent.mm.plugin.appbrand.jsapi.c;
import com.tencent.mm.plugin.appbrand.r.m;
import com.tencent.mm.sdk.platformtools.bo;
import java.util.ArrayList;

class c$1 implements a {
    final /* synthetic */ int eIl;
    final /* synthetic */ c hIt;
    final /* synthetic */ c hPz;

    c$1(c cVar, c cVar2, int i) {
        this.hPz = cVar;
        this.hIt = cVar2;
        this.eIl = i;
    }

    public final void a(int i, String str, ArrayList<MsgFile> arrayList) {
        AppMethodBeat.i(131215);
        d.i("MicroMsg.JsApiChooseMessageFile", "resultCode:%d filePaths:%s", new Object[]{Integer.valueOf(i), arrayList});
        switch (i) {
            case -1:
                m.aNS().aa(new 1(this, arrayList));
                AppMethodBeat.o(131215);
                return;
            case 0:
                this.hIt.M(this.eIl, this.hPz.j("fail:cancel", null));
                break;
            case 1:
                if (bo.isNullOrNil(str)) {
                    this.hIt.M(this.eIl, this.hPz.j("fail", null));
                    AppMethodBeat.o(131215);
                    return;
                }
                this.hIt.M(this.eIl, this.hPz.j("fail:".concat(String.valueOf(str)), null));
                AppMethodBeat.o(131215);
                return;
        }
        AppMethodBeat.o(131215);
    }
}
