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

Commit 4b6d834b authored by Charlie Boutier's avatar Charlie Boutier Committed by Automerger Merge Worker
Browse files

Merge changes I50ecdf34,I62bb8555 into main am: 828d45be

parents a3d43ba2 828d45be
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@ import com.android.compatibility.common.util.AdoptShellPermissionsRule;
import com.google.common.util.concurrent.SettableFuture;
import com.google.protobuf.ByteString;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -68,11 +70,19 @@ public class SdpClientTest {
                }
            };

    @Test
    public void remoteConnectServiceDiscoveryTest() throws Exception {
    @Before
    public void setup() {
        IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_UUID);
        mContext.registerReceiver(mConnectionStateReceiver, filter);
    }

    @After
    public void tearDown() {
        mContext.unregisterReceiver(mConnectionStateReceiver);
    }

    @Test
    public void remoteConnectServiceDiscoveryTest() throws Exception {
        mFutureIntent = SettableFuture.create();

        String local_addr = mAdapter.getAddress();
@@ -89,12 +99,10 @@ public class SdpClientTest {
        assertThat(device.fetchUuidsWithSdp()).isTrue();

        assertThat(mFutureIntent.get())
                .containsExactly(
                .containsAtLeast(
                        BluetoothUuid.HFP,
                        BluetoothUuid.A2DP_SOURCE,
                        BluetoothUuid.A2DP_SINK,
                        BluetoothUuid.AVRCP);

        mContext.unregisterReceiver(mConnectionStateReceiver);
    }
}