Browse Source

优化纯sip通话

vothin 1 year ago
parent
commit
d225b5895e
3 changed files with 13 additions and 12 deletions
  1. 13 12
      jni/logic/startLogic.cc
  2. BIN
      libs/armeabi/libzkgui.so
  3. BIN
      obj/activity/startActivity.o

+ 13 - 12
jni/logic/startLogic.cc

@@ -58,11 +58,6 @@ namespace {
 		if (state == voip::STATE_CALL_INCOMING
 				|| state == voip::STATE_CALL_CALLING
 				|| state == voip::STATE_CALL_CONFIRMED) {
-			if (StoragePreferences::getString(STORE_SIGNAL_TYPE, SIGNAL_TYPE) == "SIP"){
-				//EASYUICONTEXT->goHome();
-				EASYUICONTEXT->openActivity("callActivity");
-				CloseUi();
-			}
 
 			voip::CallInfo info = GetTelephone()->GetCallInfo();
 			LOGD("info.id == %d", info.id);
@@ -71,13 +66,19 @@ namespace {
 
 			string sipId = info.remote_uri.substr(info.remote_uri.find(":") + 1, info.remote_uri.find("@") - info.remote_uri.find(":") - 1);
 			LOGD("sipId == %s", sipId.c_str());
-			if (sipId != "0000000000") {
-				const char* currentAppName = EASYUICONTEXT->currentAppName();
-				string _currentAppName = currentAppName;
-				if (_currentAppName != "callActivity") {
-					telephone->Hangup();
-					LOGD("=================> 不在通话界面,直接挂断!");
-					return;
+
+			if (StoragePreferences::getString(STORE_SIGNAL_TYPE, SIGNAL_TYPE) == "SIP"){
+				EASYUICONTEXT->openActivity("callActivity");
+			}
+			else {
+				if (sipId != "0000000000") {
+					const char* currentAppName = EASYUICONTEXT->currentAppName();
+					string _currentAppName = currentAppName;
+					if (_currentAppName != "callActivity") {
+						telephone->Hangup();
+						LOGD("=================> 不在通话界面,直接挂断!");
+						return;
+					}
 				}
 			}
 

BIN
libs/armeabi/libzkgui.so


BIN
obj/activity/startActivity.o