优化simcard切换的日志

hdrplus
Matthew 11 months ago
parent b971200d88
commit aa3347b2d2

@ -663,8 +663,6 @@ public class AppMaster {
return;
}
JSONObject jsonFrp = new JSONObject(frp);
String server = jsonFrp.optString("server_addr");
int port = jsonFrp.optInt("server_port", 7000);

@ -469,7 +469,7 @@ public class MpMasterService extends Service {
MicroPhotoContext.AppConfig appConfig = MicroPhotoContext.getMpAppConfig(getApplicationContext());
logger.warning("Start Mntn report: " + masterUrl + " Mntn Mode=" + Boolean.toString(mMntnMode) + " QuickHB=" + Boolean.toString(mQuickHbMode));
logger.warning("Start Mntn report: " + masterUrl + " MntnMode=" + (mMntnMode ? "1" : "0") + " QuickHB=" + (mQuickHbMode ? "1" : "0"));
AppMaster appMaster = new AppMaster(this, masterUrl, appConfig.cmdid, bundleWithMpApp);
appMaster.start();
@ -632,7 +632,7 @@ public class MpMasterService extends Service {
registerHeartbeatTimer(zeroPoint + closestTime * 1000, keepAlive);
}
} else {
if (mPreviousHeartbeatTime - currentTimeMs < mHeartbeatDuration * 1000) {
if ((mPreviousHeartbeatTime != 0) && (mPreviousHeartbeatTime - currentTimeMs < mHeartbeatDuration * 1000)) {
registerHeartbeatTimer(mPreviousHeartbeatTime + mHeartbeatDuration * 1000, keepAlive);
} else {
registerHeartbeatTimer(currentTimeMs + timeout * 1000, keepAlive);
@ -970,6 +970,8 @@ public class MpMasterService extends Service {
if (subIds != null && subIds.length > 0) {
setDefaultDataSubId(subIds[0]);
logger.info("Switched To SimCard: " + Integer.toString(num));
} else {
logger.warning("NO available network for simcard " + Integer.toString(num));
}
}
} else {

Loading…
Cancel
Save