Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cb6496b authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am 25d2c2d6: Merge "Fix issue #18593636: Turn on "kill important processes...

am 25d2c2d6: Merge "Fix issue #18593636: Turn on "kill important processes that..." into lmp-mr1-dev

* commit '25d2c2d6':
  Fix issue #18593636: Turn on "kill important processes that...
parents 108e5394 25d2c2d6
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -18,12 +18,14 @@ package com.android.server;


import java.util.Calendar;
import java.util.Calendar;


import android.app.ActivityManagerNative;
import android.app.job.JobInfo;
import android.app.job.JobInfo;
import android.app.job.JobParameters;
import android.app.job.JobParameters;
import android.app.job.JobScheduler;
import android.app.job.JobScheduler;
import android.app.job.JobService;
import android.app.job.JobService;
import android.content.ComponentName;
import android.content.ComponentName;
import android.content.Context;
import android.content.Context;
import android.os.RemoteException;
import android.util.Slog;
import android.util.Slog;


public class MountServiceIdler extends JobService {
public class MountServiceIdler extends JobService {
@@ -53,6 +55,13 @@ public class MountServiceIdler extends JobService {


    @Override
    @Override
    public boolean onStartJob(JobParameters params) {
    public boolean onStartJob(JobParameters params) {
        // First have the activity manager do its idle maintenance.  (Yes this job
        // is really more than just mount, some day it should be renamed to be system
        // idleer).
        try {
            ActivityManagerNative.getDefault().performIdleMaintenance();
        } catch (RemoteException e) {
        }
        // The mount service will run an fstrim operation asynchronously
        // The mount service will run an fstrim operation asynchronously
        // on a designated separate thread, so we provide it with a callback
        // on a designated separate thread, so we provide it with a callback
        // that lets us cleanly end our idle timeslice.  It's safe to call
        // that lets us cleanly end our idle timeslice.  It's safe to call
@@ -98,7 +107,7 @@ public class MountServiceIdler extends JobService {
    private static Calendar tomorrowMidnight() {
    private static Calendar tomorrowMidnight() {
        Calendar calendar = Calendar.getInstance();
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(System.currentTimeMillis());
        calendar.setTimeInMillis(System.currentTimeMillis());
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.HOUR_OF_DAY, 3);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
+1 −1
Original line number Original line Diff line number Diff line
@@ -12900,7 +12900,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                    + PowerManagerInternal.wakefulnessToString(mWakefulness));
                    + PowerManagerInternal.wakefulnessToString(mWakefulness));
            pw.println("  mSleeping=" + mSleeping + " mLockScreenShown="
            pw.println("  mSleeping=" + mSleeping + " mLockScreenShown="
                    + lockScreenShownToString());
                    + lockScreenShownToString());
            pw.print("  mShuttingDown=" + mShuttingDown + " mRunningVoice=" + mRunningVoice);
            pw.println("  mShuttingDown=" + mShuttingDown + " mRunningVoice=" + mRunningVoice);
        }
        }
        if (mDebugApp != null || mOrigDebugApp != null || mDebugTransient
        if (mDebugApp != null || mOrigDebugApp != null || mDebugTransient
                || mOrigWaitForDebugger) {
                || mOrigWaitForDebugger) {