From 4b6bd8d36b093d36d9ae80b43e95049c259d7319 Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Thu, 19 Mar 2015 14:35:45 -0700 Subject: Retrieve WiFi info outside of BatteryStatsImpl In order to not deadlock the system, we need to retrieve WiFi energy info outside of the BatteryStats lock. We do this, then pass that data down to BatteryStatsImpl to process. b/19729960 Change-Id: Ib8beba1d5ac81d89144d502c4b688d0a88c5b102 --- .../android/net/wifi/WifiActivityEnergyInfo.java | 35 ++++++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'wifi/java/android') diff --git a/wifi/java/android/net/wifi/WifiActivityEnergyInfo.java b/wifi/java/android/net/wifi/WifiActivityEnergyInfo.java index 6263463..9284796 100644 --- a/wifi/java/android/net/wifi/WifiActivityEnergyInfo.java +++ b/wifi/java/android/net/wifi/WifiActivityEnergyInfo.java @@ -26,12 +26,35 @@ import android.os.Parcelable; * @hide */ public final class WifiActivityEnergyInfo implements Parcelable { - private final long mTimestamp; - private final int mStackState; - private final int mControllerTxTimeMs; - private final int mControllerRxTimeMs; - private final int mControllerIdleTimeMs; - private final int mControllerEnergyUsed; + /** + * @hide + */ + public long mTimestamp; + + /** + * @hide + */ + public int mStackState; + + /** + * @hide + */ + public int mControllerTxTimeMs; + + /** + * @hide + */ + public int mControllerRxTimeMs; + + /** + * @hide + */ + public int mControllerIdleTimeMs; + + /** + * @hide + */ + public int mControllerEnergyUsed; public static final int STACK_STATE_INVALID = 0; public static final int STACK_STATE_STATE_ACTIVE = 1; -- cgit v1.1