diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-08 02:08:28 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-08 02:08:28 +0000 |
commit | 22389fee67a014fed221aadadcfbc1dc9cd7335f (patch) | |
tree | 24b5864c0fccfd1ae7549e3616dbc5ee1aa5bafb /framework/java/android/bluetooth/BluetoothHeadsetClient.java | |
parent | 4739b8feb4c2a5becbb584b1f62f0e5321079d17 (diff) | |
parent | c4c4f9227fb198e838b5b7de5d1a048f2d3a0c52 (diff) |
Snap for 8270536 from c4c4f9227fb198e838b5b7de5d1a048f2d3a0c52 to tm-release
Change-Id: I11136ce6eeaed10d012ef29fb7c081cbc5c1ced2
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHeadsetClient.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothHeadsetClient.java | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHeadsetClient.java b/framework/java/android/bluetooth/BluetoothHeadsetClient.java index 9be1b328f3..6a67923f11 100644 --- a/framework/java/android/bluetooth/BluetoothHeadsetClient.java +++ b/framework/java/android/bluetooth/BluetoothHeadsetClient.java @@ -17,6 +17,7 @@ package android.bluetooth; import static android.bluetooth.BluetoothUtils.getSyncTimeout; +import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; @@ -1742,8 +1743,19 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose private final String mOperatorName; /** - * The general signal strength - * (0 - Unknown, 1 - Poor, 2 - Fair, 3 - Good, 4 - Great, 5 - Excellent) + * The general signal strength, from 0 to 5. + * + * Bluetooth HFP v1.8 specifies that the signal strength of a device can be [0, 5]. It does + * place any requirements on how a device derives those values. While they're typically + * derived from signal quality/RSSI buckets, there's way to be certain on the exact meaning. + * + * That said, you can "generally" interpret the values relative to each other as follows: + * - Level 0: None/Unknown + * - Level 1: Very Poor + * - Level 2: Poor + * - Level 3: Fair + * - Level 4: Good + * - Level 5: Great */ private final int mSignalStrength; @@ -1804,20 +1816,19 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose * @hide */ @SystemApi - public @Nullable String getOperatorName() { + public @Nullable String getNetworkOperatorName() { return mOperatorName; } /** * Get the network's general signal strength * - * @return The general signal strength (0 - None, 1 - Poor, 2 - Fair, 3 - Good, - * 4 - Great, 5 - Excellent) + * @return The general signal strength, range [0, 5] * * @hide */ @SystemApi - public int getSignalStrength() { + public @IntRange(from = 0, to = 5) int getSignalStrength() { return mSignalStrength; } |