Battery monitoring fixes:

- Improve monitoring of level changes to not be confused
  when it goes up while draining or down while charging.
- Put back in connectivity service code to tell battery
  stats about the interfaces.
- Turn back on reporting of mobile radio active state
  from the RIL.
- Fix bug in marshalling/unmarshalling that would cause
  the UI to show bad data.

Change-Id: I733ef52702894cca81a0813eccdfc1023e546fce
This commit is contained in:
Dianne Hackborn
2014-05-21 15:01:03 -07:00
committed by The Android Automerger
parent 0f0a7c52e1
commit b2754a0b09

View File

@@ -5709,10 +5709,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
// updateNetworkSettings();
}
// notify battery stats service about this network
// try {
// TODO
//BatteryStatsService.getService().noteNetworkInterfaceType(iface, netType);
// } catch (RemoteException e) { }
try {
BatteryStatsService.getService().noteNetworkInterfaceType(
newNetwork.linkProperties.getInterfaceName(),
newNetwork.networkInfo.getType());
} catch (RemoteException e) { }
notifyNetworkCallbacks(newNetwork, ConnectivityManager.CALLBACK_AVAILABLE);
} else {
if (DBG && newNetwork.networkRequests.size() != 0) {