package g.i.a.b.f;

import android.content.Context;
import g.h.a.i;
import g.i.a.b.e.h.e;

/* JADX INFO: loaded from: classes.dex */
public class b {
    public a a;

    public b(Context context, int i2) {
        this.a = i2 >= 21 ? new d(context) : i2 >= 18 ? new c(context) : null;
    }

    public boolean a(e eVar, boolean z2) {
        a aVar = this.a;
        if (!z2) {
            return aVar.a();
        }
        if (aVar.f5436b.isEnabled()) {
            return aVar.b(eVar);
        }
        i.w0("BT Adapter is not enable");
        return false;
    }
}
