Merge "Fix issue #17323751: Additional items in aggregated battery stats" into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f91526cec0
@@ -1544,6 +1544,17 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
final long ident = Binder.clearCallingIdentity();
|
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 {
|
try {
|
||||||
mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
|
mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user