|
|
|
@ -883,8 +883,12 @@ public class MpMasterService extends Service {
|
|
|
|
|
relaunchIntent.setPackage("com.android.systemui");
|
|
|
|
|
// getApplicationContext().sendBroadcast(restartIntent);
|
|
|
|
|
|
|
|
|
|
long launchTs = System.currentTimeMillis() + (mHeartbeatDuration + 2) * 1000;
|
|
|
|
|
|
|
|
|
|
PendingIntent sysKAPendingIntent = PendingIntent.getBroadcast(this, BROADCAST_REQUEST_CODE_SYS_KEEPALIVE, relaunchIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
|
|
|
|
alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, SystemClock.elapsedRealtime() + (mHeartbeatDuration + 2) * 1000, sysKAPendingIntent);
|
|
|
|
|
alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, launchTs, sysKAPendingIntent);
|
|
|
|
|
|
|
|
|
|
logger.info(String.format("Register KeepAlive Launch Clock: " + format.format(new Date(launchTs))));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|