scanning = false if no adapter present

This commit is contained in:
Milos Kozak 2019-05-02 21:51:44 +02:00 committed by GitHub
parent 6c7a18067f
commit a303d71d25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,10 +167,10 @@ public class InsightPairingActivity extends AppCompatActivity implements Insight
intentFilter.addAction(BluetoothDevice.ACTION_FOUND); intentFilter.addAction(BluetoothDevice.ACTION_FOUND);
registerReceiver(broadcastReceiver, intentFilter); registerReceiver(broadcastReceiver, intentFilter);
bluetoothAdapter.startDiscovery(); bluetoothAdapter.startDiscovery();
}
scanning = true; scanning = true;
} }
} }
}
private void stopBLScan() { private void stopBLScan() {
if (scanning) { if (scanning) {