diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-05-21 15:01:03 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2014-05-22 16:43:17 -0700 |
commit | 293251318168ad2dbfeb3d18176936fe2cc16325 (patch) | |
tree | 3560e1823cc8308ee089b7ec8f0dc6c60a32ae3e /services | |
parent | 42b30e1b832df5bbf109db2f4f864f8ba4cfd44a (diff) | |
download | frameworks_base-293251318168ad2dbfeb3d18176936fe2cc16325.zip frameworks_base-293251318168ad2dbfeb3d18176936fe2cc16325.tar.gz frameworks_base-293251318168ad2dbfeb3d18176936fe2cc16325.tar.bz2 |
(DO NOT MERGE) 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
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/ConnectivityService.java | 9 | ||||
-rw-r--r-- | services/core/java/com/android/server/NetworkManagementService.java | 5 |
2 files changed, 7 insertions, 7 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 0ad5ce2..7ecf248 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -5750,10 +5750,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) { diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java index cf91782..137387e 100644 --- a/services/core/java/com/android/server/NetworkManagementService.java +++ b/services/core/java/com/android/server/NetworkManagementService.java @@ -240,9 +240,8 @@ public class NetworkManagementService extends INetworkManagementService.Stub mPhoneStateListener = new PhoneStateListener(mDaemonHandler.getLooper()) { public void onDataConnectionRealTimeInfoChanged( DataConnectionRealTimeInfo dcRtInfo) { - // Disabled for now, until we are getting good data. - //notifyInterfaceClassActivity(ConnectivityManager.TYPE_MOBILE, - // dcRtInfo.getDcPowerState(), dcRtInfo.getTime(), true); + notifyInterfaceClassActivity(ConnectivityManager.TYPE_MOBILE, + dcRtInfo.getDcPowerState(), dcRtInfo.getTime(), true); } }; |