diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-18 12:39:34 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-18 12:39:34 -0700 |
commit | b22293590cb10b1d8722dbf9c226cb58f240d7d5 (patch) | |
tree | e26e594879b7252601c413bd52a68020d1a03d7d /core | |
parent | 97e470048a9ce703c7192f08a86b0ce0eed00eaa (diff) | |
parent | 82cb029e2a4907ee55fed4a00493b76b3e11a7a1 (diff) | |
download | frameworks_base-b22293590cb10b1d8722dbf9c226cb58f240d7d5.zip frameworks_base-b22293590cb10b1d8722dbf9c226cb58f240d7d5.tar.gz frameworks_base-b22293590cb10b1d8722dbf9c226cb58f240d7d5.tar.bz2 |
Merge change 21748 into eclair
* changes:
Get At command count from Bluetooth headset.
Diffstat (limited to 'core')
-rw-r--r-- | core/java/com/android/internal/os/BatteryStatsImpl.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java index a449e5f..2da72df 100644 --- a/core/java/com/android/internal/os/BatteryStatsImpl.java +++ b/core/java/com/android/internal/os/BatteryStatsImpl.java @@ -978,10 +978,13 @@ public final class BatteryStatsImpl extends BatteryStats { } else if (mBtHeadset != null) { return getCurrentBluetoothPingCount() - mBluetoothPingStart; } - return -1; + return 0; } public void setBtHeadset(BluetoothHeadset headset) { + if (headset != null && mBtHeadset == null && isOnBattery() && mBluetoothPingStart == -1) { + mBluetoothPingStart = getCurrentBluetoothPingCount(); + } mBtHeadset = headset; } |