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

Commit c615c439 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes I9ea7630d,Ia322147e into tm-qpr-dev

* changes:
  MCP: Fix device unauthorizing
  LeAudio: Improve service cleanup
parents 1994ee52 4d1f8718
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -326,6 +326,11 @@ public class LeAudioService extends ProfileService {
        mLeAudioNativeIsInitialized = false;
        mHfpHandoverDevice = null;

        mActiveAudioOutDevice = null;
        mActiveAudioInDevice = null;
        mDatabaseManager = null;
        mLeAudioCodecConfig = null;

        // Set the service and BLE devices as inactive
        setLeAudioService(null);

+4 −4
Original line number Diff line number Diff line
@@ -206,10 +206,10 @@ public class McpService extends ProfileService {
         * 2. authorized devices
         * 3. Any LeAudio devices which are allowed to connect
         */
        if (mDeviceAuthorizations.getOrDefault(device, Utils.isPtsTestMode()
                ? BluetoothDevice.ACCESS_ALLOWED : BluetoothDevice.ACCESS_UNKNOWN)
                        == BluetoothDevice.ACCESS_ALLOWED) {
            return BluetoothDevice.ACCESS_ALLOWED;
        int authorization = mDeviceAuthorizations.getOrDefault(device, Utils.isPtsTestMode()
                ? BluetoothDevice.ACCESS_ALLOWED : BluetoothDevice.ACCESS_UNKNOWN);
        if (authorization != BluetoothDevice.ACCESS_UNKNOWN) {
            return authorization;
        }

        LeAudioService leAudioService = LeAudioService.getLeAudioService();