Do not call bluetooth state listener after service is destroyed.

fork-5.53.8
Greyson Parrelli 2018-10-24 10:43:08 -07:00
rodzic f164ac90db
commit 2b14c98eb0
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -109,7 +109,7 @@ public class BluetoothStateManager {
}
private void handleBluetoothStateChange() {
if (listener != null) listener.onBluetoothStateChanged(isBluetoothAvailable());
if (listener != null && !destroyed.get()) listener.onBluetoothStateChanged(isBluetoothAvailable());
}
private boolean isBluetoothAvailable() {