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
This commit is contained in:
Dianne Hackborn
2013-06-13 19:06:50 -07:00
parent 756a53f4e4
commit 91268cf21e
11 changed files with 471 additions and 140 deletions

View File

@@ -43,6 +43,7 @@ import android.net.NetworkUtils;
import android.net.RouteInfo;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiConfiguration.KeyMgmt;
import android.os.BatteryStats;
import android.os.Binder;
import android.os.Handler;
import android.os.INetworkManagementService;
@@ -347,7 +348,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub
if (mBandwidthControlEnabled) {
try {
IBatteryStats.Stub.asInterface(ServiceManager.getService("batteryinfo"))
IBatteryStats.Stub.asInterface(ServiceManager.getService(BatteryStats.SERVICE_NAME))
.noteNetworkStatsEnabled();
} catch (RemoteException e) {
}