Fix issue #17323751: Additional items in aggregated battery stats
- Now aggregate number of times each process has crashed and ANRed. - Now aggregate total number of connectivity changes. - Now record connectivity changes in the history. Crash and ANR counts are new entries at the end of "pr" in checkin. Connectivity change counts is a new entry at the end of "m" in checkin. Connectivity changes in the history checkin are Ecn and include the type of connection and its state. Change-Id: I0c01186446034cf6c3fb97d45f5e3b5c69a0438a
This commit is contained in:
@@ -1524,6 +1524,17 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
}
|
||||
|
||||
final long ident = Binder.clearCallingIdentity();
|
||||
if (ConnectivityManager.CONNECTIVITY_ACTION.equals(intent.getAction())) {
|
||||
final IBatteryStats bs = BatteryStatsService.getService();
|
||||
try {
|
||||
NetworkInfo ni = intent.getParcelableExtra(
|
||||
ConnectivityManager.EXTRA_NETWORK_INFO);
|
||||
bs.noteConnectivityChanged(intent.getIntExtra(
|
||||
ConnectivityManager.EXTRA_NETWORK_TYPE, ConnectivityManager.TYPE_NONE),
|
||||
ni != null ? ni.getState().toString() : "?");
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
try {
|
||||
mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user