File tree Expand file tree Collapse file tree
android/sdl_android/src/main/java/com/smartdevicelink/transport Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1107,7 +1107,9 @@ private boolean initCheck(){
11071107 @ Override
11081108 public void onCreate () {
11091109 super .onCreate ();
1110- //This must be done regardless of if this service shuts down or not
1110+ //Add this first to avoid the runtime exceptions for the entire lifecycle of the service
1111+ setRouterServiceExceptionHandler ();
1112+ //This must be done regardless of if this service shuts down or not
11111113 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ) {
11121114 hasCalledStartForeground = false ;
11131115 enterForeground ("Waiting for connection..." , FOREGROUND_TIMEOUT /1000 , false );
@@ -1179,8 +1181,6 @@ protected void deployNextRouterService(){
11791181
11801182 public void startUpSequence (){
11811183
1182- setRouterServiceExceptionHandler ();
1183-
11841184 IntentFilter disconnectFilter = new IntentFilter ();
11851185 disconnectFilter .addAction (BluetoothDevice .ACTION_CLASS_CHANGED );
11861186 disconnectFilter .addAction (BluetoothDevice .ACTION_ACL_DISCONNECTED );
You can’t perform that action at this time.
0 commit comments