diff --git a/mpmaster/src/main/java/com/xypower/mpmaster/MpMasterService.java b/mpmaster/src/main/java/com/xypower/mpmaster/MpMasterService.java index 9de2f634..ef6f26eb 100644 --- a/mpmaster/src/main/java/com/xypower/mpmaster/MpMasterService.java +++ b/mpmaster/src/main/java/com/xypower/mpmaster/MpMasterService.java @@ -435,7 +435,10 @@ public class MpMasterService extends Service { FilesUtils.closeFriendly(runningFile); } - if (mPreviousMpHbTime <= ts && ts - mPreviousMpHbTime > mMpHeartbeatDuration * 2) { + long tempduration = mMpHeartbeatDuration; + if(mMpHeartbeatDuration < 600000) + tempduration = 300000; + if (mPreviousMpHbTime <= ts && ts - mPreviousMpHbTime > tempduration * 2) { // MpApp is not running if (ts - mTimeToStartMpApp >= 1800000) { // 30 minutes 30 * 60 * 1000 MicroPhotoContext.restartMpApp(context, "MpMST Keep Alive Detection");