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

Commit a2f9396a authored by Pradeep Panigrahi's avatar Pradeep Panigrahi
Browse files

Bluetooth: MAP: Restrict Connection to only one device at a time

Do not allow two different device to connect to separate mas
instances. Restrict map connection to only one device at a time
and reject the connection request from another devices,if a
device is already connected to either of the MAS instance 0/1

CRs-fixed: 590641

Change-Id: I63a5188715e6cf66c6adda635d087810d26b4b44
parent 89a8b112
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -795,6 +795,11 @@ public class BluetoothMapService extends ProfileService {
                      if (TextUtils.isEmpty(sRemoteDeviceName)) {
                          sRemoteDeviceName = getString(R.string.defaultname);
                      }
                      if (!mConnectionManager.isAllowedConnection(mRemoteDevice)) {
                          mConnSocket.close();
                          mConnSocket = null;
                          continue;
                      }
                      boolean trust = mRemoteDevice.getTrustState();
                      if (DEBUG) Log.d(TAG, "GetTrustState() = " + trust);