package com.tencent.mm.plugin.webview.ui.tools;

import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.graphics.Bitmap.CompressFormat;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bc;
import com.tencent.mm.sdk.platformtools.d;
import java.io.File;
import java.io.IOException;

class j$5 implements OnClickListener {
    final /* synthetic */ j utN;
    final /* synthetic */ Intent val$intent;

    j$5(j jVar, Intent intent) {
        this.utN = jVar;
        this.val$intent = intent;
    }

    public final void onClick(DialogInterface dialogInterface, int i) {
        AppMethodBeat.i(7646);
        try {
            File dir = this.utN.cZv().getDir("expose", 0);
            dir.mkdirs();
            String str = dir.getAbsolutePath() + "/screenshot.jpg";
            d.a(bc.am(this.utN.cZv()), 75, CompressFormat.JPEG, str, true);
            this.val$intent.putExtra("k_webview_img", str);
            com.tencent.mm.bp.d.b(this.utN.cZv(), "webview", ".ui.tools.WebViewUI", this.val$intent);
            AppMethodBeat.o(7646);
        } catch (IOException e) {
            ab.e("MicroMsg.WebViewMenuHelper", "[oneliang]save screen shot to file error, ex = " + e.getMessage());
            AppMethodBeat.o(7646);
        }
    }
}
