More work on process tracking.
Re-arranged code to be more flexible, now track
state of services, dump ordered list of running
processes while memory was critical and low.
Also rename battery stats service from "batteryinfo" to "batterystats".
Change-Id: I0f4f0c8d443c49d255cb84d0fc917e8ec18b152e
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index f523b55..62ed697 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -16,6 +16,7 @@
package android.app;
+import android.os.BatteryStats;
import android.os.IBinder;
import com.android.internal.app.IUsageStats;
import com.android.internal.os.PkgUsageStats;
@@ -2210,7 +2211,7 @@
pw.println();
dumpService(pw, fd, "package", new String[] { packageName});
pw.println();
- dumpService(pw, fd, "batteryinfo", new String[] { packageName});
+ dumpService(pw, fd, BatteryStats.SERVICE_NAME, new String[] { packageName});
pw.flush();
}
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index fef1818..7c09e89c 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -41,7 +41,10 @@
public abstract class BatteryStats implements Parcelable {
private static final boolean LOCAL_LOGV = false;
-
+
+ /** @hide */
+ public static final String SERVICE_NAME = "batterystats";
+
/**
* A constant indicating a partial wake lock timer.
*/