package com.tencent.mm.pluginsdk.model.app;

import android.content.Context;
import android.content.Intent;
import android.widget.Toast;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.pluginsdk.permission.a;
import com.tencent.mm.pluginsdk.permission.d;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ah;

class q$1 implements d {
    final /* synthetic */ a kNN;
    final /* synthetic */ Context val$context;
    final /* synthetic */ Intent vcl;

    q$1(Context context, Intent intent, a aVar) {
        this.val$context = context;
        this.vcl = intent;
        this.kNN = aVar;
    }

    public final void Cp(int i) {
        AppMethodBeat.i(79350);
        ab.i("MicroMsg.ApplicationUtil", "onRequestPermissionsResult, resultCode = %d", new Object[]{Integer.valueOf(i)});
        if (i == -1) {
            try {
                this.val$context.startActivity(this.vcl);
            } catch (Exception e) {
                ab.printErrStackTrace("MicroMsg.ApplicationUtil", e, "install app failed! %s", new Object[]{this.vcl});
            }
            if (this.kNN != null) {
                this.kNN.dT(true);
                AppMethodBeat.o(79350);
                return;
            }
        }
        ab.e("MicroMsg.ApplicationUtil", "no get!!!");
        Toast.makeText(ah.getContext(), 2131301726, 1).show();
        if (this.kNN != null) {
            this.kNN.dT(false);
        }
        AppMethodBeat.o(79350);
    }
}
