package com.google.android.material.bottomsheet;

import android.R;
import android.content.res.TypedArray;
import android.view.View;

/* JADX INFO: loaded from: classes2.dex */
public final class k implements View.OnClickListener {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ o f22321a;

    public k(o oVar) {
        this.f22321a = oVar;
    }

    @Override // android.view.View.OnClickListener
    public final void onClick(View view) {
        o oVar = this.f22321a;
        if (oVar.f22330j && oVar.isShowing()) {
            if (!oVar.f22332l) {
                TypedArray typedArrayObtainStyledAttributes = oVar.getContext().obtainStyledAttributes(new int[]{R.attr.windowCloseOnTouchOutside});
                oVar.f22331k = typedArrayObtainStyledAttributes.getBoolean(0, true);
                typedArrayObtainStyledAttributes.recycle();
                oVar.f22332l = true;
            }
            if (oVar.f22331k) {
                oVar.cancel();
            }
        }
    }
}
