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