Skip to content

Commit 3688c6c

Browse files
committed
Only allow alt transport in debug mode
1 parent 019b7e3 commit 3688c6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdl_android_lib/src/com/smartdevicelink/transport/SdlRouterService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,9 @@ public IBinder onBind(Intent intent) {
654654
}
655655
String requestType = intent.getAction();//intent.getIntExtra(TransportConstants.ROUTER_BIND_REQUEST_TYPE_EXTRA, TransportConstants.BIND_REQUEST_TYPE_CLIENT);
656656
if(TransportConstants.BIND_REQUEST_TYPE_ALT_TRANSPORT.equals(requestType)){
657-
return this.altTransportMessenger.getBinder();
657+
if(0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)){ //Only allow alt transport in debug mode
658+
return this.altTransportMessenger.getBinder();
659+
}
658660
}else if(TransportConstants.BIND_REQUEST_TYPE_CLIENT.equals(requestType)){
659661
return this.routerMessenger.getBinder();
660662
}else if(TransportConstants.BIND_REQUEST_TYPE_STATUS.equals(requestType)){

0 commit comments

Comments
 (0)