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

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.scanner.a.e;
import com.tencent.mm.plugin.scanner.util.p.a;
import com.tencent.mm.plugin.scanner.util.p.b;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.al;
import com.tencent.mm.sdk.platformtools.bo;

class ScanTranslationCaptureUI$7 implements a {
    final /* synthetic */ String pZc;
    final /* synthetic */ ScanTranslationCaptureUI qgh;

    ScanTranslationCaptureUI$7(ScanTranslationCaptureUI scanTranslationCaptureUI, String str) {
        this.qgh = scanTranslationCaptureUI;
        this.pZc = str;
    }

    public final void a(String str, b bVar) {
        AppMethodBeat.i(138492);
        if (!bo.isNullOrNil(str) && str.equals(ScanTranslationCaptureUI.w(this.qgh))) {
            ScanTranslationCaptureUI.j(this.qgh).cWY = (long) ((int) (System.currentTimeMillis() - ScanTranslationCaptureUI.i(this.qgh)[1]));
            ab.i("MicroMsg.ScanTranslationCaptureUI", "upload img cost %d", new Object[]{Long.valueOf(ScanTranslationCaptureUI.j(this.qgh).cWY)});
            switch (bVar.errCode) {
                case -21009:
                case -21000:
                    al.d(new 2(this));
                    ScanTranslationCaptureUI.j(this.qgh).cWX = 3;
                    break;
                case 0:
                    if (!bo.Q(new String[]{bVar.fileId, bVar.aeskey})) {
                        ab.i("MicroMsg.ScanTranslationCaptureUI", "fileId %s", new Object[]{bVar.fileId});
                        g.Rg().a(new e(ScanTranslationCaptureUI.x(this.qgh), com.tencent.mm.a.e.cs(this.pZc), bVar.fileId, bVar.aeskey), 0);
                        break;
                    }
                    al.d(new 1(this));
                    break;
            }
            if (ScanTranslationCaptureUI.e(this.qgh) == 1 && ScanTranslationCaptureUI.y(this.qgh) != 0) {
                ab.i("delete tmp path %s", this.pZc);
                com.tencent.mm.vfs.e.deleteFile(this.pZc);
            }
        }
        AppMethodBeat.o(138492);
    }
}
