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

import a.l;
import a.v;
import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.radar.b.e.e;
import java.util.LinkedList;

@l(dWo = {1, 1, 13}, dWp = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, dWq = {"<anonymous>", "", "it", "Landroid/view/View;", "kotlin.jvm.PlatformType", "onClick"})
final class RadarViewController$f implements OnClickListener {
    final /* synthetic */ RadarViewController pEg;

    RadarViewController$f(RadarViewController radarViewController) {
        this.pEg = radarViewController;
    }

    public final void onClick(View view) {
        AppMethodBeat.i(103097);
        if (this.pEg.getRadarStatus() == e.pBM || this.pEg.getRadarStatus() == e.pBN) {
            Context context = this.pEg.getContext();
            if (context == null) {
                v vVar = new v("null cannot be cast to non-null type android.app.Activity");
                AppMethodBeat.o(103097);
                throw vVar;
            }
            ((Activity) context).finish();
            AppMethodBeat.o(103097);
            return;
        }
        RadarViewController radarViewController = this.pEg;
        RadarViewController$c d = RadarViewController.d(this.pEg);
        LinkedList linkedList = new LinkedList();
        for (Object obj : d.pEi) {
            if (obj != null) {
                linkedList.add(obj);
            }
        }
        if (RadarViewController.a(radarViewController, linkedList)) {
            RadarViewController.f(this.pEg).cdU();
            RadarViewController.f(this.pEg).setVisibility(0);
            RadarViewController.c(this.pEg).cdA();
            RadarViewController.a(this.pEg, e.pBN);
        } else {
            RadarViewController.a(this.pEg, e.pBM);
        }
        RadarViewController.d(this.pEg).aPw();
        AppMethodBeat.o(103097);
    }
}
