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

import android.view.View;
import android.view.View.OnClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.au.b;
import com.tencent.mm.kernel.g;
import com.tencent.mm.sdk.platformtools.aa;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.storage.ac.a;
import com.tencent.ytcommon.BuildConfig;

class LocationWidget$2 implements OnClickListener {
    final /* synthetic */ LocationWidget rko;

    LocationWidget$2(LocationWidget locationWidget) {
        this.rko = locationWidget;
    }

    public final void onClick(View view) {
        AppMethodBeat.i(38286);
        if (!b.sO((String) g.RP().Ry().get(274436, null))) {
            ab.i("MicroMsg.LocationWidget", "summerper checkPermission checkLocation[%b]", new Object[]{Boolean.valueOf(com.tencent.mm.pluginsdk.permission.b.a(LocationWidget.d(this.rko), "android.permission.ACCESS_COARSE_LOCATION", 64, BuildConfig.FLAVOR, BuildConfig.FLAVOR))});
            if (!com.tencent.mm.pluginsdk.permission.b.a(LocationWidget.d(this.rko), "android.permission.ACCESS_COARSE_LOCATION", 64, BuildConfig.FLAVOR, BuildConfig.FLAVOR)) {
                AppMethodBeat.o(38286);
                return;
            }
        } else if (!com.tencent.mm.pluginsdk.permission.b.o(LocationWidget.d(this.rko), "android.permission.ACCESS_COARSE_LOCATION")) {
            if (((Boolean) g.RP().Ry().get(a.xVP, Boolean.FALSE)).booleanValue()) {
                com.tencent.mm.pluginsdk.permission.b.b(LocationWidget.d(this.rko), "android.permission.ACCESS_COARSE_LOCATION", 64);
                AppMethodBeat.o(38286);
                return;
            }
            com.tencent.mm.plugin.account.a.b.a.b(LocationWidget.d(this.rko), this.rko.getResources().getString(2131305910, new Object[]{aa.dor()}), 30764, true);
            AppMethodBeat.o(38286);
            return;
        }
        this.rko.crS();
        AppMethodBeat.o(38286);
    }
}
