File tree Expand file tree Collapse file tree
android/sdl_android/src/androidTest/java/com/smartdevicelink/transport Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .smartdevicelink .transport ;
22
3+ import android .Manifest ;
34import android .content .ComponentName ;
5+ import android .os .Build ;
46import android .os .Looper ;
57
68import androidx .test .ext .junit .runners .AndroidJUnit4 ;
9+ import androidx .test .rule .GrantPermissionRule ;
710
811import com .smartdevicelink .protocol .SdlPacket ;
912import com .smartdevicelink .protocol .SdlPacketFactory ;
1316import com .smartdevicelink .transport .utl .TransportRecord ;
1417
1518import org .junit .Before ;
19+ import org .junit .Rule ;
1620import org .junit .Test ;
1721import org .junit .runner .RunWith ;
1822
2933@ RunWith (AndroidJUnit4 .class )
3034public class TransportManagerTests {
3135
36+
37+ @ Rule
38+ public GrantPermissionRule btRuntimePermissionRule = Build .VERSION .SDK_INT >= Build .VERSION_CODES .S ? GrantPermissionRule .grant (Manifest .permission .BLUETOOTH_CONNECT ) : null ;
3239 MultiplexTransportConfig config ;
3340 final TransportRecord defaultBtRecord = new TransportRecord (TransportType .BLUETOOTH , "12:34:56:78:90" );
3441 final ComponentName routerServiceComponentName = new ComponentName ("com.smartdevicelink.test" , "com.smartdevicelink.test.SdlRouterService" );
You can’t perform that action at this time.
0 commit comments