Loading android/app/src/com/android/bluetooth/a2dp/A2dpStateMachine.java +5 −1 Original line number Diff line number Diff line Loading @@ -625,6 +625,10 @@ final class A2dpStateMachine extends StateMachine { broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, BluetoothProfile.STATE_CONNECTING); break; } else { broadcastConnectionState(mCurrentDevice, BluetoothProfile.STATE_DISCONNECTING, BluetoothProfile.STATE_CONNECTED); } synchronized (A2dpStateMachine.this) { Loading @@ -643,7 +647,7 @@ final class A2dpStateMachine extends StateMachine { BluetoothProfile.STATE_CONNECTED); if (!disconnectA2dpNative(getByteAddress(device))) { broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTED, BluetoothProfile.STATE_DISCONNECTED); BluetoothProfile.STATE_DISCONNECTING); break; } synchronized (A2dpStateMachine.this) { Loading android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +12 −3 Original line number Diff line number Diff line Loading @@ -503,15 +503,24 @@ class AdapterProperties { private boolean updateCountersAndCheckForConnectionStateChange(int state, int prevState) { switch (prevState) { case BluetoothProfile.STATE_CONNECTING: if (mProfilesConnecting > 0) mProfilesConnecting--; else Log.e(TAG, "mProfilesConnecting " + mProfilesConnecting); break; case BluetoothProfile.STATE_CONNECTED: if (mProfilesConnected > 0) mProfilesConnected--; else Log.e(TAG, "mProfilesConnected " + mProfilesConnected); break; case BluetoothProfile.STATE_DISCONNECTING: if (mProfilesDisconnecting > 0) mProfilesDisconnecting--; else Log.e(TAG, "mProfilesDisconnecting " + mProfilesDisconnecting); break; } Loading android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java +4 −0 Original line number Diff line number Diff line Loading @@ -753,6 +753,10 @@ final class HeadsetStateMachine extends StateMachine { if (mConnectedDevicesList.contains(device)) { Log.w(TAG, "Connected: CONNECT, device " + device + " is connected"); break; } else { broadcastConnectionState(mCurrentDevice, BluetoothProfile.STATE_DISCONNECTING, BluetoothProfile.STATE_CONNECTED); } if (mConnectedDevicesList.size() >= max_hf_connections) { BluetoothDevice DisconnectConnectedDevice = null; Loading Loading
android/app/src/com/android/bluetooth/a2dp/A2dpStateMachine.java +5 −1 Original line number Diff line number Diff line Loading @@ -625,6 +625,10 @@ final class A2dpStateMachine extends StateMachine { broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, BluetoothProfile.STATE_CONNECTING); break; } else { broadcastConnectionState(mCurrentDevice, BluetoothProfile.STATE_DISCONNECTING, BluetoothProfile.STATE_CONNECTED); } synchronized (A2dpStateMachine.this) { Loading @@ -643,7 +647,7 @@ final class A2dpStateMachine extends StateMachine { BluetoothProfile.STATE_CONNECTED); if (!disconnectA2dpNative(getByteAddress(device))) { broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTED, BluetoothProfile.STATE_DISCONNECTED); BluetoothProfile.STATE_DISCONNECTING); break; } synchronized (A2dpStateMachine.this) { Loading
android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +12 −3 Original line number Diff line number Diff line Loading @@ -503,15 +503,24 @@ class AdapterProperties { private boolean updateCountersAndCheckForConnectionStateChange(int state, int prevState) { switch (prevState) { case BluetoothProfile.STATE_CONNECTING: if (mProfilesConnecting > 0) mProfilesConnecting--; else Log.e(TAG, "mProfilesConnecting " + mProfilesConnecting); break; case BluetoothProfile.STATE_CONNECTED: if (mProfilesConnected > 0) mProfilesConnected--; else Log.e(TAG, "mProfilesConnected " + mProfilesConnected); break; case BluetoothProfile.STATE_DISCONNECTING: if (mProfilesDisconnecting > 0) mProfilesDisconnecting--; else Log.e(TAG, "mProfilesDisconnecting " + mProfilesDisconnecting); break; } Loading
android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java +4 −0 Original line number Diff line number Diff line Loading @@ -753,6 +753,10 @@ final class HeadsetStateMachine extends StateMachine { if (mConnectedDevicesList.contains(device)) { Log.w(TAG, "Connected: CONNECT, device " + device + " is connected"); break; } else { broadcastConnectionState(mCurrentDevice, BluetoothProfile.STATE_DISCONNECTING, BluetoothProfile.STATE_CONNECTED); } if (mConnectedDevicesList.size() >= max_hf_connections) { BluetoothDevice DisconnectConnectedDevice = null; Loading