陈奇
2018-11-01 cdbaf79d124d46b69dc62b653fde55f9d40b5534
FastBleLib/src/main/java/com/clj/fastble/BleManager.java
@@ -22,7 +22,6 @@
    public BleManager(Context context) {
        this.mContext = context;
        if (isSupportBle()) {
            if (bleBluetooth == null) {
                bleBluetooth = new BleBluetooth(context);
@@ -30,6 +29,10 @@
        }
        bleExceptionHandler = new DefaultBleExceptionHandler();
    }
    public void setMtu(int mtu) {
        bleBluetooth.setMtu(mtu);
    }
    /**
@@ -172,8 +175,8 @@
     * cancel scan
     */
    public void cancelScan() {
        if(bleBluetooth!=null)
           bleBluetooth.cancelScan();
        if (bleBluetooth != null)
            bleBluetooth.cancelScan();
    }
    /**
@@ -342,19 +345,19 @@
    }
    public boolean isInScanning() {
        return bleBluetooth != null &&bleBluetooth.isInScanning();
        return bleBluetooth != null && bleBluetooth.isInScanning();
    }
    public boolean isConnectingOrConnected() {
        return bleBluetooth != null &&bleBluetooth.isConnectingOrConnected();
        return bleBluetooth != null && bleBluetooth.isConnectingOrConnected();
    }
    public boolean isConnected() {
        return bleBluetooth != null &&bleBluetooth.isConnected();
        return bleBluetooth != null && bleBluetooth.isConnected();
    }
    public boolean isServiceDiscovered() {
        return bleBluetooth != null &&bleBluetooth.isServiceDiscovered();
        return bleBluetooth != null && bleBluetooth.isServiceDiscovered();
    }
    /**