diff options
author | Adam Lesinski <adamlesinski@google.com> | 2016-04-11 12:18:18 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2016-04-15 15:27:52 -0700 |
commit | 6b31ff83910fe3ceb75f4af508bff62c13d71bc5 (patch) | |
tree | 46b94ad7bd3e70da2be777f711b3373f9bc72ef4 /framework/java/android/bluetooth/BluetoothActivityEnergyInfo.java | |
parent | 75f3ec20467e276ce24fb55758ee02e360ddc9cd (diff) |
BatteryStats: Introduce Async external stats requests
Instead of calling out to external processes with a blocking IPC,
pass along a Binder on which the external process can pass back
the response. The calling process can then wait for the reply with
a timeout.
This eliminates watchdog restarts of the system_server when an external
process like telephony or bluetooth hangs.
Bug:26842468
Change-Id: I1b242e4ed22a63f1a4a0be8c78de8ac4d7bf56c5
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothActivityEnergyInfo.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothActivityEnergyInfo.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/java/android/bluetooth/BluetoothActivityEnergyInfo.java b/framework/java/android/bluetooth/BluetoothActivityEnergyInfo.java index e32a47056f..84f6060d3a 100644 --- a/framework/java/android/bluetooth/BluetoothActivityEnergyInfo.java +++ b/framework/java/android/bluetooth/BluetoothActivityEnergyInfo.java @@ -156,8 +156,8 @@ public final class BluetoothActivityEnergyInfo implements Parcelable { * @return if the record is valid */ public boolean isValid() { - return ((mControllerTxTimeMs !=0) || - (mControllerRxTimeMs !=0) || - (mControllerIdleTimeMs !=0)); + return ((mControllerTxTimeMs >=0) && + (mControllerRxTimeMs >=0) && + (mControllerIdleTimeMs >=0)); } } |