package com.tencent.mm.plugin.appbrand.jsapi.bluetooth.sdk.scan;

import android.annotation.TargetApi;
import android.bluetooth.BluetoothAdapter;
import android.os.Build.VERSION;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.jsapi.bluetooth.sdk.a;
import com.tencent.mm.sdk.platformtools.ab;
import java.util.List;

@TargetApi(18)
public final class b {
    static final e hFm;

    public static boolean a(BluetoothAdapter bluetoothAdapter, List<ScanFilterCompat> list, ScanSettingsCompat scanSettingsCompat, e eVar) {
        AppMethodBeat.i(94304);
        boolean a = hFm.a(bluetoothAdapter, list, scanSettingsCompat, eVar);
        AppMethodBeat.o(94304);
        return a;
    }

    public static boolean a(BluetoothAdapter bluetoothAdapter, e eVar) {
        AppMethodBeat.i(94305);
        boolean a = hFm.a(bluetoothAdapter, eVar);
        AppMethodBeat.o(94305);
        return a;
    }

    static {
        AppMethodBeat.i(94306);
        int i = VERSION.SDK_INT;
        if (!a.hDX) {
            ab.i("MicroMsg.ble.BleScannerCompat", "use 18");
            hFm = new a();
            AppMethodBeat.o(94306);
        } else if (i >= 21) {
            ab.i("MicroMsg.ble.BleScannerCompat", "use 21");
            hFm = new c();
            AppMethodBeat.o(94306);
        } else {
            ab.i("MicroMsg.ble.BleScannerCompat", "use 18");
            hFm = new a();
            AppMethodBeat.o(94306);
        }
    }
}
