Skip to content

Commit 19856ff

Browse files
committedFeb 12, 2024
Add BluetoothConnect permission to TransportManagerTests
1 parent fb9827f commit 19856ff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/TransportManagerTests.java

+5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package com.smartdevicelink.transport;
22

3+
import android.Manifest;
34
import android.content.ComponentName;
45
import android.os.Looper;
56

67
import androidx.test.ext.junit.runners.AndroidJUnit4;
8+
import androidx.test.rule.GrantPermissionRule;
79

810
import com.smartdevicelink.protocol.SdlPacket;
911
import com.smartdevicelink.protocol.SdlPacketFactory;
@@ -13,6 +15,7 @@
1315
import com.smartdevicelink.transport.utl.TransportRecord;
1416

1517
import org.junit.Before;
18+
import org.junit.Rule;
1619
import org.junit.Test;
1720
import org.junit.runner.RunWith;
1821

@@ -29,6 +32,8 @@
2932
@RunWith(AndroidJUnit4.class)
3033
public class TransportManagerTests {
3134

35+
@Rule
36+
public GrantPermissionRule btRuntimePermissionRule = GrantPermissionRule.grant(Manifest.permission.BLUETOOTH_CONNECT);
3237
MultiplexTransportConfig config;
3338
final TransportRecord defaultBtRecord = new TransportRecord(TransportType.BLUETOOTH, "12:34:56:78:90");
3439
final ComponentName routerServiceComponentName = new ComponentName("com.smartdevicelink.test", "com.smartdevicelink.test.SdlRouterService");

0 commit comments

Comments
 (0)
Please sign in to comment.