改为2分钟之后再发送广播

lowmem
Matthew 1 month ago
parent d27321974f
commit c7351b8000

@ -883,7 +883,7 @@ public class MpMasterService extends Service {
relaunchIntent.setPackage("com.android.systemui");
// getApplicationContext().sendBroadcast(restartIntent);
long launchTs = System.currentTimeMillis() + (mHeartbeatDuration + 2) * 1000;
long launchTs = System.currentTimeMillis() + (mHeartbeatDuration + 120) * 1000;
PendingIntent sysKAPendingIntent = PendingIntent.getBroadcast(this, BROADCAST_REQUEST_CODE_SYS_KEEPALIVE, relaunchIntent, PendingIntent.FLAG_UPDATE_CURRENT);
alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, launchTs, sysKAPendingIntent);

Loading…
Cancel
Save