summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dianne Hackborn <hackbod@google.com> 2014-12-04 13:58:46 -0800
committer Dianne Hackborn <hackbod@google.com> 2014-12-04 13:58:46 -0800
commit57a873fcaa4dd95fc844887b0c255f650b9159e5 (patch)
tree5aba0921d42543bdffc3a44aab8b738055c740e6
parent109ec376da86de1275f73fa432d6344431a457e9 (diff)
Fix issue #18593636: Turn on "kill important processes that...
...have ballooned" for all devices Actually, this was supposed to be on for all devices, but it was no longer being run due to changes in the idle maintenance code in L. So now we run it again. And moved the idle maintenance window to 3am. Change-Id: I8e90723e1431b82896d261cf90f8bf84f43b0bf2
-rw-r--r--services/core/java/com/android/server/MountServiceIdler.java11
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java2
2 files changed, 11 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/MountServiceIdler.java b/services/core/java/com/android/server/MountServiceIdler.java
index bc851a3f0ce0..e0b2307e89f3 100644
--- a/services/core/java/com/android/server/MountServiceIdler.java
+++ b/services/core/java/com/android/server/MountServiceIdler.java
@@ -18,12 +18,14 @@ package com.android.server;
import java.util.Calendar;
+import android.app.ActivityManagerNative;
import android.app.job.JobInfo;
import android.app.job.JobParameters;
import android.app.job.JobScheduler;
import android.app.job.JobService;
import android.content.ComponentName;
import android.content.Context;
+import android.os.RemoteException;
import android.util.Slog;
public class MountServiceIdler extends JobService {
@@ -53,6 +55,13 @@ public class MountServiceIdler extends JobService {
@Override
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
// 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
@@ -98,7 +107,7 @@ public class MountServiceIdler extends JobService {
private static Calendar tomorrowMidnight() {
Calendar calendar = Calendar.getInstance();
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.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 6823119d0c02..a9640d608945 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -12883,7 +12883,7 @@ public final class ActivityManagerService extends ActivityManagerNative
+ PowerManagerInternal.wakefulnessToString(mWakefulness));
pw.println(" mSleeping=" + mSleeping + " mLockScreenShown="
+ lockScreenShownToString());
- pw.print(" mShuttingDown=" + mShuttingDown + " mRunningVoice=" + mRunningVoice);
+ pw.println(" mShuttingDown=" + mShuttingDown + " mRunningVoice=" + mRunningVoice);
}
if (mDebugApp != null || mOrigDebugApp != null || mDebugTransient
|| mOrigWaitForDebugger) {