From 5da0d5a316f591ca12eb14b11cc1b7d81266f040 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 11 Feb 2014 17:18:35 -0800 Subject: [PATCH] Start tracking radio up time. We now always turn on network state tracking for mobile, and push this information down to battery stats. In battery stats we use this to both log the changes in the history and keep track of the total time the mobile radio was active. Power computation is switched over to using this information to help determine power use, which will hopefully make it more accurate (not counting inaccuracies in knowing when it actually goes down). Note yet done is aggregating this data per-uid, to better emphasize which apps are causing the radio to be up. Right now we just spread the total time across all uids weighted by the total number of packets they have sent and received. Also put in the battery stats infrastructure for bluetooth to address issue #12973036: Improve power_profile.xml Change-Id: I39d11b7ff6ae4f336f253d1cba308d8569de7e0d --- services/core/java/com/android/server/ConnectivityService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 934973064a..ba08a2e88f 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -2352,7 +2352,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { if (ConnectivityManager.isNetworkTypeMobile(type)) { timeout = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE, - 0); + 5); // Canonicalize mobile network type type = ConnectivityManager.TYPE_MOBILE; } else if (ConnectivityManager.TYPE_WIFI == type) {