@@ -382,18 +382,22 @@ private void wakeUpApplication(String uuid, String number, String displayName) {
382382 // Avoid to call wake up the app again in wakeUpAfterReachabilityTimeout.
383383 this .currentConnectionRequest = null ;
384384
385- Intent headlessIntent = new Intent (
386- this .getApplicationContext (),
387- RNCallKeepBackgroundMessagingService .class
388- );
389- headlessIntent .putExtra ("callUUID" , uuid );
390- headlessIntent .putExtra ("name" , displayName );
391- headlessIntent .putExtra ("handle" , number );
392-
393- ComponentName name = this .getApplicationContext ().startService (headlessIntent );
394- if (name != null ) {
395- Log .d (TAG , "[VoiceConnectionService] wakeUpApplication, acquiring lock for application:" + name );
396- HeadlessJsTaskService .acquireWakeLockNow (this .getApplicationContext ());
385+ try {
386+ Intent headlessIntent = new Intent (
387+ this .getApplicationContext (),
388+ RNCallKeepBackgroundMessagingService .class
389+ );
390+ headlessIntent .putExtra ("callUUID" , uuid );
391+ headlessIntent .putExtra ("name" , displayName );
392+ headlessIntent .putExtra ("handle" , number );
393+
394+ ComponentName name = this .getApplicationContext ().startService (headlessIntent );
395+ if (name != null ) {
396+ Log .d (TAG , "[VoiceConnectionService] wakeUpApplication, acquiring lock for application:" + name );
397+ HeadlessJsTaskService .acquireWakeLockNow (this .getApplicationContext ());
398+ }
399+ } catch (Exception e ) {
400+ Log .w (TAG , "[VoiceConnectionService] wakeUpApplication, error" + e .toString ());
397401 }
398402 }
399403
0 commit comments