diff options
author | zzy <zhenye@broadcom.com> | 2012-09-07 17:33:59 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-09-10 11:59:52 -0700 |
commit | 6665ee321082b1c7c1afed640f99ce0ac225bdf6 (patch) | |
tree | d7f6f438192e40fa94a9ea6508027e1faac26a6e /src/com/android/settings/TetherSettings.java | |
parent | 710aeba1ce0bf2d121aaaf659284074750b43c6e (diff) | |
download | packages_apps_settings-6665ee321082b1c7c1afed640f99ce0ac225bdf6.zip packages_apps_settings-6665ee321082b1c7c1afed640f99ce0ac225bdf6.tar.gz packages_apps_settings-6665ee321082b1c7c1afed640f99ce0ac225bdf6.tar.bz2 |
Fixed the display count of connected panu device.
Root cause: Bluez relies on the count of activated pan network
interfaces to show how many panu devices are connected. But
Bluedroid has only one shared pan network interface for any
number of connected panu devices.
Change-Id: I52e3d6d79e2f1b9f8afab1d70c9ff1eca3ef2349
Diffstat (limited to 'src/com/android/settings/TetherSettings.java')
-rw-r--r-- | src/com/android/settings/TetherSettings.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/com/android/settings/TetherSettings.java b/src/com/android/settings/TetherSettings.java index ce53550..f6c1734 100644 --- a/src/com/android/settings/TetherSettings.java +++ b/src/com/android/settings/TetherSettings.java @@ -374,12 +374,6 @@ public class TetherSettings extends SettingsPreferenceFragment private void updateBluetoothState(String[] available, String[] tethered, String[] errored) { - int bluetoothTethered = 0; - for (String s : tethered) { - for (String regex : mBluetoothRegexs) { - if (s.matches(regex)) bluetoothTethered++; - } - } boolean bluetoothErrored = false; for (String s: errored) { for (String regex : mBluetoothRegexs) { @@ -399,6 +393,7 @@ public class TetherSettings extends SettingsPreferenceFragment mBluetoothPan != null && mBluetoothPan.isTetheringOn()) { mBluetoothTether.setChecked(true); mBluetoothTether.setEnabled(true); + int bluetoothTethered = mBluetoothPan.getConnectedDevices().size(); if (bluetoothTethered > 1) { String summary = getString( R.string.bluetooth_tethering_devices_connected_subtext, bluetoothTethered); |