diff --git a/app/src/main/java/com/nynja/mobile/communicator/data/sdk/calls/ConferenceSDKModule.java b/app/src/main/java/com/nynja/mobile/communicator/data/sdk/calls/ConferenceSDKModule.java index b00746dd8364d2bf498f808c26a93411eb64171a..37f48ba5fb9e601974b96adb2143e5a22193b57a 100644 --- a/app/src/main/java/com/nynja/mobile/communicator/data/sdk/calls/ConferenceSDKModule.java +++ b/app/src/main/java/com/nynja/mobile/communicator/data/sdk/calls/ConferenceSDKModule.java @@ -1073,9 +1073,7 @@ public class ConferenceSDKModule extends BaseSDKModule { if (!hasCreatedActiveCall()) return; Timber.d("Request conference member with \'ConferenceId\'=\'" + conferenceId + "\' " + (result ? "succeed" : "failed!!!")); - synchronized (mActiveConference.mData) { - mActiveConference.mData.mParticipantArray = mActiveConference.mConference.getParticipants(); - } + mActiveConference.mData.mParticipantArray = mActiveConference.mConference.getParticipants(); // update chatRoomId if (mActiveConference.mData.mParticipantArray != null && @@ -1564,6 +1562,14 @@ public class ConferenceSDKModule extends BaseSDKModule { mBillingManager.setListener(mBillingManagerListener); } + private synchronized void startReplacedNewCall() { + if (hasCreatedActiveCall()) { + mActiveConference.isCallInProgress = true; + mActiveConference.mData.mParticipantArray = mActiveConference.mConference.getParticipants(); + startConferenceActivityImpl(NynjaNavigator.MAIN_NEW_CALL, true); + } + } + private void replaceNewCall(String callId) { NYNCall call = mCallManager.getCallById(callId); if (call != null) { @@ -1572,11 +1578,7 @@ public class ConferenceSDKModule extends BaseSDKModule { if (hasCreatedActiveCall()) { initConferenceCall(false); new Handler(Looper.getMainLooper()).postDelayed(() -> { - mActiveConference.isCallInProgress = true; - synchronized (mActiveConference.mData) { - mActiveConference.mData.mParticipantArray = mActiveConference.mConference.getParticipants(); - } - startConferenceActivityImpl(NynjaNavigator.MAIN_NEW_CALL, true); + startReplacedNewCall(); }, Consts.DELAY_100); } } @@ -2784,7 +2786,7 @@ public class ConferenceSDKModule extends BaseSDKModule { return true; } else if (!mStateDevice.isDeviceActive()) { // launch the activity since the navigation router is unset (while the app is on background) - Intent newIntent = MainActivity.getLaunchIntent(getContext(), false, screenKey != null); + Intent newIntent = MainActivity.getLaunchIntent(getContext(), false, true); getContext().startActivity(newIntent); return true; } @@ -2991,9 +2993,7 @@ public class ConferenceSDKModule extends BaseSDKModule { } } if (mActiveConference.mData.mParticipantArray.size() > 1 && TEMP_ALLOW_UPDATE_CONF_CALLS_NAME) { - synchronized (mActiveConference.mData) { - mActiveConference.mData.mParticipantArray.remove(index); - } + mActiveConference.mData.mParticipantArray.remove(index); tryUpdateConferenceCallName(mActiveConference, generateGroupConferenceName(mActiveConference.mData.mParticipantArray.size() - 1));// exclude me }