summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Xie2015-01-23 14:51:46 -0800
committerMatthew Xie2015-01-26 10:40:47 -0800
commit9b0177459ddc1412c4e9d44af53a1badb476bdd9 (patch)
tree5d38123786ce785ecfac41a7fed7ba4dcd6945a4
parent0e3af27dd1acd8034efb9b53bdb824fc342e7c7b (diff)
Use LTE signal level when under LTE
Bug: 17898918 Change-Id: I9f3bb8d874e24440c2b8de85a6a0d7dbdadb3935
-rw-r--r--src/com/android/bluetooth/hfp/HeadsetPhoneState.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/bluetooth/hfp/HeadsetPhoneState.java b/src/com/android/bluetooth/hfp/HeadsetPhoneState.java
index ec96375..ee81e62 100644
--- a/src/com/android/bluetooth/hfp/HeadsetPhoneState.java
+++ b/src/com/android/bluetooth/hfp/HeadsetPhoneState.java
@@ -249,7 +249,15 @@ class HeadsetPhoneState {
if (mService == HeadsetHalConstants.NETWORK_STATE_NOT_AVAILABLE) {
mSignal = 0;
} else if (signalStrength.isGsm()) {
- mSignal = gsmAsuToSignal(signalStrength);
+ mSignal = signalStrength.getLteLevel();
+ if (mSignal == SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN) {
+ mSignal = gsmAsuToSignal(signalStrength);
+ } else {
+ // SignalStrength#getLteLevel returns the scale from 0-4
+ // Bluetooth signal scales at 0-5
+ // Let's match up the larger side
+ mSignal++;
+ }
} else {
mSignal = cdmaDbmEcioToSignal(signalStrength);
}