package com.tencent.mm.plugin.appbrand.ipc;

import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.DialogInterface.OnDismissListener;
import android.os.ResultReceiver;
import com.tencent.matrix.trace.core.AppMethodBeat;

class AppBrandProcessProxyUI$a implements OnClickListener, OnDismissListener {
    final /* synthetic */ AppBrandProcessProxyUI hvi;
    private boolean hvk;

    private AppBrandProcessProxyUI$a(AppBrandProcessProxyUI appBrandProcessProxyUI) {
        this.hvi = appBrandProcessProxyUI;
        this.hvk = false;
    }

    /* synthetic */ AppBrandProcessProxyUI$a(AppBrandProcessProxyUI appBrandProcessProxyUI, byte b) {
        this(appBrandProcessProxyUI);
    }

    public final void onClick(DialogInterface dialogInterface, int i) {
        AppMethodBeat.i(73129);
        nX(i);
        AppMethodBeat.o(73129);
    }

    public final void onDismiss(DialogInterface dialogInterface) {
        AppMethodBeat.i(73130);
        nX(-2);
        this.hvi.a(null);
        AppMethodBeat.o(73130);
    }

    private void nX(int i) {
        AppMethodBeat.i(73131);
        if (this.hvk) {
            AppMethodBeat.o(73131);
            return;
        }
        this.hvk = true;
        ResultReceiver resultReceiver = (ResultReceiver) this.hvi.getIntent().getParcelableExtra("key_result_receiver");
        if (resultReceiver != null) {
            resultReceiver.send(i, null);
        }
        AppMethodBeat.o(73131);
    }
}
