|
@@ -26,6 +26,7 @@ import android.os.RemoteException;
|
|
import android.provider.Settings;
|
|
import android.provider.Settings;
|
|
import android.util.Log;
|
|
import android.util.Log;
|
|
import android.view.KeyEvent;
|
|
import android.view.KeyEvent;
|
|
|
|
+import android.view.View;
|
|
|
|
|
|
import com.artncore.WallPadDataMgr.WallpadCarEventInfo;
|
|
import com.artncore.WallPadDataMgr.WallpadCarEventInfo;
|
|
import com.artncore.WallPadDataMgr.WallpadDevStatus;
|
|
import com.artncore.WallPadDataMgr.WallpadDevStatus;
|
|
@@ -146,6 +147,7 @@ public class iMapServer extends Service {
|
|
String IPaddr;
|
|
String IPaddr;
|
|
String AddrDong;
|
|
String AddrDong;
|
|
String AddrHo;
|
|
String AddrHo;
|
|
|
|
+ boolean m_CallAppRunDelay = false; //add KSJ
|
|
int ho;
|
|
int ho;
|
|
boolean log_sw = true;
|
|
boolean log_sw = true;
|
|
String SVRIP = "";
|
|
String SVRIP = "";
|
|
@@ -3377,30 +3379,43 @@ public class iMapServer extends Service {
|
|
sip_result = "fail";
|
|
sip_result = "fail";
|
|
}
|
|
}
|
|
|
|
|
|
- retXML = XMLHeader + "<service type=\"reply\" name=\"check_sip_activation\" result=\"" + sip_result + "\">\r\n <message>\"null\"</message>\r\n</service>\r\n</imap>\r\n";
|
|
|
|
|
|
+ if(m_CallAppRunDelay == false)
|
|
|
|
+ {
|
|
|
|
+ retXML = XMLHeader + "<service type=\"reply\" name=\"check_sip_activation\" result=\"" + sip_result + "\">\r\n <message>\"null\"</message>\r\n</service>\r\n</imap>\r\n";
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //add KSJ 2021.11.02 check_sip_activation msg recv 이후 wallpadcall app start
|
|
|
|
+ String[] IP_Parse = strIP.split("\\.");
|
|
|
|
+ Log.d(TAG, "1" + strIP);
|
|
|
|
+ //Log.d(TAG, "2" + strSplit[1]);
|
|
|
|
+ //Log.d(TAG, "3" + strSplit[2]);
|
|
|
|
+ //Log.d(TAG, "4" + strSplit[3]);
|
|
|
|
+ CALLTYPE eCallType = CALLTYPE.LOBBY;
|
|
|
|
+ if (IP_Parse[2].equals("0")) {
|
|
|
|
|
|
- //add KSJ 2021.11.02 check_sip_activation msg recv 이후 wallpadcall app start
|
|
|
|
- String[] IP_Parse = strIP.split("\\.");
|
|
|
|
- Log.d(TAG, "1" + strIP);
|
|
|
|
- //Log.d(TAG, "2" + strSplit[1]);
|
|
|
|
- //Log.d(TAG, "3" + strSplit[2]);
|
|
|
|
- //Log.d(TAG, "4" + strSplit[3]);
|
|
|
|
- CALLTYPE eCallType = CALLTYPE.LOBBY;
|
|
|
|
- if (IP_Parse[2].equals("0")) {
|
|
|
|
|
|
+ eCallType = CALLTYPE.LOBBY;
|
|
|
|
|
|
- eCallType = CALLTYPE.LOBBY;
|
|
|
|
|
|
+ if (IP_Parse[3].equals("11"))
|
|
|
|
+ eCallType = CALLTYPE.FRONT;
|
|
|
|
|
|
- if (IP_Parse[3].equals("11"))
|
|
|
|
|
|
+ } else if (IP_Parse[2].equals("129")) {
|
|
eCallType = CALLTYPE.FRONT;
|
|
eCallType = CALLTYPE.FRONT;
|
|
|
|
+ } else {
|
|
|
|
+ eCallType = CALLTYPE.RESIDENCE;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if ((eCallType == CALLTYPE.LOBBY) || (eCallType == CALLTYPE.FRONT)) {
|
|
|
|
+ m_CallAppRunDelay = true;
|
|
|
|
+ runCallMainActivity_moip(CALLEVENTTYPE.RECEIVE_CALL, eCallType, strIP);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ sip_result = "fail";
|
|
|
|
+ retXML = XMLHeader + "<service type=\"reply\" name=\"check_sip_activation\" result=\"" + sip_result + "\">\r\n <message>\"null\"</message>\r\n</service>\r\n</imap>\r\n";
|
|
|
|
|
|
- } else if (IP_Parse[2].equals("129")) {
|
|
|
|
- eCallType = CALLTYPE.FRONT;
|
|
|
|
- } else {
|
|
|
|
- eCallType = CALLTYPE.RESIDENCE;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- if ((eCallType == CALLTYPE.LOBBY) || (eCallType == CALLTYPE.FRONT))
|
|
|
|
- runCallMainActivity_moip(CALLEVENTTYPE.RECEIVE_CALL, eCallType, strIP);
|
|
|
|
}
|
|
}
|
|
//add KSJ 2021.11.02 stop_talking msg 추가 (wallpadcall 종료)
|
|
//add KSJ 2021.11.02 stop_talking msg 추가 (wallpadcall 종료)
|
|
else if (cmd.equals("stop_talking")) {
|
|
else if (cmd.equals("stop_talking")) {
|
|
@@ -14524,9 +14539,20 @@ public class iMapServer extends Service {
|
|
mIntent.setComponent(mComponentName);
|
|
mIntent.setComponent(mComponentName);
|
|
startActivity(mIntent);
|
|
startActivity(mIntent);
|
|
Thread.sleep(500); // Call app이 실행되는 시간을 기다려준다. (빨리 띄우면 이벤트를 수신 못함)
|
|
Thread.sleep(500); // Call app이 실행되는 시간을 기다려준다. (빨리 띄우면 이벤트를 수신 못함)
|
|
|
|
+
|
|
|
|
+ new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
|
|
|
|
+ @Override
|
|
|
|
+ public void run() {
|
|
|
|
+ Log.w(TAG, "[runCallMainActivity_moip] m_CallAppRunDelay " + m_CallAppRunDelay);
|
|
|
|
+ m_CallAppRunDelay = false;
|
|
|
|
+ }
|
|
|
|
+ }, 3000);
|
|
} else {
|
|
} else {
|
|
Log.w(TAG, "[runCallMainActivity_moip] WallPadCall is already running!!");
|
|
Log.w(TAG, "[runCallMainActivity_moip] WallPadCall is already running!!");
|
|
|
|
+ m_CallAppRunDelay = false;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
} catch (RuntimeException re) {
|
|
} catch (RuntimeException re) {
|
|
LogUtil.errorLogInfo("", TAG, re);
|
|
LogUtil.errorLogInfo("", TAG, re);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|