|
|
|
@ -359,15 +359,17 @@ public class MpMasterService extends Service {
|
|
|
|
|
try {
|
|
|
|
|
final Context context = getApplicationContext();
|
|
|
|
|
|
|
|
|
|
if (MicroPhotoContext.isAppAlive(context, MicroPhotoContext.PACKAGE_NAME_MPAPP)) {
|
|
|
|
|
logger.warning("MpAPP is STILL Running");
|
|
|
|
|
if (!MicroPhotoContext.isAppAlive(context, MicroPhotoContext.PACKAGE_NAME_MPAPP)) {
|
|
|
|
|
MicroPhotoContext.restartMpApp(context);
|
|
|
|
|
mTimeToStartMpApp = System.currentTimeMillis();
|
|
|
|
|
logger.warning("Restart MpAPP as it is NOT Running");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
final String appPath = MicroPhotoContext.buildMpAppDir(context);
|
|
|
|
|
final long ts = System.currentTimeMillis();
|
|
|
|
|
if (ts - mTimeToStartMpApp < 30000) {
|
|
|
|
|
logger.warning("MpAPP has restarted in 30s");
|
|
|
|
|
logger.warning("MpAPP has restarted in 30s, skip the check.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|