diff options
| author | 2025-03-12 13:42:04 +0800 | |
|---|---|---|
| committer | 2025-03-11 22:45:28 -0700 | |
| commit | ca127397436df4989d7ff38b84c9edc1b9efffd4 (patch) | |
| tree | e62333e01420256a7a30fd43ccc4c0ebd33c4f1e | |
| parent | 3ee821a4b67062df4b7265ce0445b76fa446bd98 (diff) | |
Update connection summary for bonding loss
Bug: 380801155
Test: tested in local build, can't find a good way to test reflection
Flag: EXEMPT string update
Change-Id: Ic477d0427c1f62afaff6a47dabc0e667a471ee71
| -rw-r--r-- | packages/SettingsLib/res/values/strings.xml | 3 | ||||
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml index 03cb1ffbdef1..1297aa3ff7d5 100644 --- a/packages/SettingsLib/res/values/strings.xml +++ b/packages/SettingsLib/res/values/strings.xml @@ -1510,6 +1510,9 @@ <!-- Warning message to tell user is have problem during profile connect, it need to turn off device and back on. [CHAR_LIMIT=NONE] --> <string name="profile_connect_timeout_subtext">Problem connecting. Turn device off & back on</string> + <!-- Warning message when the bluetooth key is missing. [CHAR_LIMIT=NONE] --> + <string name="bluetooth_key_missing_subtext">Can’t connect</string> + <!-- Name of the 3.5mm audio device. [CHAR LIMIT=40] --> <string name="media_transfer_wired_device_name">Wired audio device</string> diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index 3646842d36ef..41e782e3f756 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -1495,6 +1495,11 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> int leftBattery = -1; int rightBattery = -1; + Integer keyMissingCount = BluetoothUtils.getKeyMissingCount(mDevice); + if (keyMissingCount != null && keyMissingCount > 0) { + return mContext.getString(R.string.bluetooth_key_missing_subtext); + } + if (isProfileConnectedFail() && isConnected()) { return mContext.getString(R.string.profile_connect_timeout_subtext); } |