package g.i.a.b.f;

import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothManager;
import android.content.Context;
import g.h.a.i;
import g.i.a.b.e.h.c;
import g.i.a.b.e.h.e;
import java.util.Objects;

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public BluetoothAdapter f5436b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public boolean f5437c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public e f5438d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public InterfaceC0076a f5439e;

    /* JADX INFO: renamed from: g.i.a.b.f.a$a, reason: collision with other inner class name */
    public interface InterfaceC0076a {
    }

    public a(Context context) {
        this.a = false;
        this.a = i.f5270b;
        BluetoothManager bluetoothManager = (BluetoothManager) context.getSystemService("bluetooth");
        this.f5436b = bluetoothManager != null ? bluetoothManager.getAdapter() : null;
    }

    public boolean a() {
        InterfaceC0076a interfaceC0076a = this.f5439e;
        if (interfaceC0076a != null) {
            c.a aVar = (c.a) interfaceC0076a;
            Objects.requireNonNull(g.i.a.b.e.h.c.this);
            i.V3(false, "onLeScanStop");
            g.i.a.b.e.h.c.this.a(3);
        } else {
            i.V3(false, "no listeners register");
        }
        this.f5437c = false;
        return true;
    }

    public boolean b(e eVar) {
        BluetoothAdapter bluetoothAdapter = this.f5436b;
        if (bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {
            i.W3("BT Adapter is not turned ON");
            return false;
        }
        i.V3(false, "LeScanner--startScan");
        InterfaceC0076a interfaceC0076a = this.f5439e;
        if (interfaceC0076a != null) {
        } else {
            i.V3(false, "no listeners register");
        }
        this.f5437c = true;
        this.f5438d = eVar;
        return true;
    }
}
