Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa9426ef authored by Rongxuan Liu's avatar Rongxuan Liu Committed by Gerrit Code Review
Browse files

Merge "[le audio] Fix bass client disconnection issues when connection state changed" into main

parents 803d1097 410abb41
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1192,7 +1192,7 @@ public class BassClientStateMachine extends StateMachine {
                if (mLastConnectionState != BluetoothProfile.STATE_DISCONNECTED) {
                    // Reconnect in background if not disallowed by the service
                    if (mService.okToConnect(mDevice) && mAllowReconnect) {
                        connectGatt(false);
                        connectGatt(true);
                    }
                }
            }
@@ -1588,6 +1588,11 @@ public class BassClientStateMachine extends StateMachine {
                        Log.w(TAG, "device is already connected to Bass" + mDevice);
                    } else {
                        Log.w(TAG, "unexpected disconnected from " + mDevice);
                        // cleanup mBluetoothGatt
                        if (mBluetoothGatt != null) {
                            mBluetoothGatt.close();
                            mBluetoothGatt = null;
                        }
                        cancelActiveSync(null);
                        transitionTo(mDisconnected);
                    }