Clearing task queues fixed

This commit is contained in:
Aleksander Nowakowski
2017-03-16 12:43:40 +01:00
parent a01d3d5b41
commit 409f9573bd
2 changed files with 2 additions and 2 deletions

View File

@@ -1182,7 +1182,7 @@ public abstract class BleManager<E extends BleManagerCallbacks> implements ILogg
Logger.w(mLogSession, "Error: (0x" + Integer.toHexString(status) + "): " + GattError.parseConnectionError(status));
mOperationInProgress = true; // no more calls are possible
mInitQueue.clear();
mInitQueue = null;
mTaskQueue.clear();
if (mConnected) {
notifyDeviceDisconnected(gatt.getDevice());

View File

@@ -611,7 +611,7 @@ public class BleManager implements BleProfileApi {
} else {
if (newState == BluetoothProfile.STATE_DISCONNECTED) {
mOperationInProgress = true; // no more calls are possible
mInitQueue.clear();
mInitQueue = null;
mTaskQueue.clear();
if (mConnected) {
notifyDeviceDisconnected(gatt.getDevice());