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

Commit e09ce6e8 authored by Michal Belusiak's avatar Michal Belusiak Committed by Gerrit Code Review
Browse files

Merge "BASS: Allow to notify about broadcaster without public announcement" into main

parents a77dee9a 6fad21ed
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2263,8 +2263,8 @@ public class BassClientService extends ProfileService {
            }
        }

        if (broadcastId == BassConstants.INVALID_BROADCAST_ID || pbData == null) {
            Log.w(TAG, "Invalid broadcast ID or public broadcast data");
        if (broadcastId == BassConstants.INVALID_BROADCAST_ID) {
            Log.w(TAG, "Invalid broadcast ID");
            mPeriodicAdvCallbacksMap.remove(BassConstants.INVALID_SYNC_HANDLE);
            handleSelectSourceRequest();
            return;
+2 −2
Original line number Diff line number Diff line
@@ -461,8 +461,8 @@ public class BassClientStateMachine extends StateMachine {
                }
            }

            if (broadcastId == BassConstants.INVALID_BROADCAST_ID || pbData == null) {
                Log.w(TAG, "Invalid broadcast ID or public broadcast data");
            if (broadcastId == BassConstants.INVALID_BROADCAST_ID) {
                Log.w(TAG, "Invalid broadcast ID");
                return false;
            }

+6 −4
Original line number Diff line number Diff line
@@ -2177,7 +2177,7 @@ public class BassClientServiceTest {
                        0);

        mBassClientService.addSelectSourceRequest(scanResult, false);
        verify(mMethodProxy, never())
        verify(mMethodProxy)
                .periodicAdvertisingManagerRegisterSync(
                        any(), any(), anyInt(), anyInt(), any(), any());
    }
@@ -2224,8 +2224,10 @@ public class BassClientServiceTest {
                    0x56,
                    0x18,
                    0x07,
                    0x03,
                    0x06, // WRONG PUBLIC_BROADCAST data
                    0x04, // WRONG PUBLIC_BROADCAST data (metada size)
                    0x06,
                    0x07,
                    0x08,
                    // service data - public broadcast,
                    // feature - 0x7, metadata len - 0x3, metadata - 0x6, 0x7, 0x8
                    0x05,
@@ -2253,7 +2255,7 @@ public class BassClientServiceTest {
                        0);

        mBassClientService.addSelectSourceRequest(scanResult, false);
        verify(mMethodProxy, never())
        verify(mMethodProxy)
                .periodicAdvertisingManagerRegisterSync(
                        any(), any(), anyInt(), anyInt(), any(), any());
    }