|
|
@@ -105,13 +105,16 @@ class RNConnectionService extends ReactContextBaseJavaModule {
|
|
105
|
105
|
|
|
106
|
106
|
ConnectionService.registerStartCallPromise(callUUID, promise);
|
|
107
|
107
|
|
|
108
|
|
- try {
|
|
109
|
|
- TelecomManager tm
|
|
110
|
|
- = (TelecomManager) ctx.getSystemService(
|
|
111
|
|
- Context.TELECOM_SERVICE);
|
|
|
108
|
+ TelecomManager tm = null;
|
|
112
|
109
|
|
|
|
110
|
+ try {
|
|
|
111
|
+ tm = (TelecomManager) ctx.getSystemService(Context.TELECOM_SERVICE);
|
|
113
|
112
|
tm.placeCall(address, extras);
|
|
114
|
113
|
} catch (Exception e) {
|
|
|
114
|
+ JitsiMeetLogger.e(e, TAG + " error in startCall");
|
|
|
115
|
+ if (tm != null) {
|
|
|
116
|
+ tm.unregisterPhoneAccount(accountHandle);
|
|
|
117
|
+ }
|
|
115
|
118
|
ConnectionService.unregisterStartCallPromise(callUUID);
|
|
116
|
119
|
promise.reject(e);
|
|
117
|
120
|
}
|