Commit Graph

12 Commits

Author SHA1 Message Date
Jake Hamby
c681e939dd Reduce max BT device length to 246 bytes due to Bluez bug. (DO NOT MERGE)
The maximum Bluetooth device name length is 248 bytes. There are bugs in
Bluez and D-Bus that can cause the Bluetooth service to go into a reboot
loop when the device name is set to the maximum length. Changed Settings
app to limit the device name length to 246 bytes.

Bug: 3246147
Change-Id: I2f46303cf44951f0b3907c43d4b096736f08765b
2010-12-09 07:50:04 -08:00
Jake Hamby
59091c08f4 Fix Bluetooth device name max length checking.
The Bluetooth device name has a maximum length of 248 bytes in UTF-8
encoding. The settings app previously limited the Bluetooth device
name entered by the user based on the number of characters, which is
incorrect when the name includes non-ASCII characters.

Created a new Utf8ByteLengthFilter class for BluetoothNamePreference
which counts UTF-8 bytes instead of Unicode characters, along with
unit tests.

We can move Utf8ByteLengthFilter into the framework in the future
if it would be useful elsewhere in the system or for applications.

Change-Id: I9debface09659f09d750f3bfe8ad6ddfd34c75c5
2010-09-22 16:04:50 -07:00
Jaikumar Ganesh
4b6b2aa123 Restrict Bluetooth adapater name length to 200 characters.
The max allowed as per spec is 248.
Change-Id: I287fb7f861a30e736d6078923712433c52f3031a
2009-09-25 10:27:17 -07:00
Nick Pelly
16cc86315d Update application for Bluetooth API changes.
Change-Id: I8351611f0f0c5eda3e423dbe7e7b53e52d75ac36
2009-09-10 18:44:25 -07:00
Nick Pelly
f4779354b3 Update application for Bluetooth API change: deprecation of BluetoothError. 2009-09-08 17:49:57 -07:00
Nick Pelly
ca564d6bda Update application for Bluetooth API change. 2009-09-08 16:24:03 -07:00
Nick Pelly
d63c011225 Bluetooth: Update Settings.apk to match BT API change.
Split BluetoothDevice into BluetoothDevice and BluetoothAdapter.

BluetoothAdapter: Represents the local BT adapter. Operations on the local
                  adapter (start a scan, etc).
BluetoothDevice: Represents a remote BT device. Operations on remote devices
                 (pair, connect, etc).
2009-08-17 17:09:44 -07:00
Michael Chan
110befc20e do not merge: cherry-pick e9f4f5dd39 from master branch 2009-08-14 13:33:49 -07:00
The Android Open Source Project
e6dd1fa185 auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:48 -07:00
The Android Open Source Project
afc4ab2ffb auto import from //depot/cupcake/@135843 2009-03-03 19:32:34 -08:00
The Android Open Source Project
4e14e5ccbf auto import from //depot/cupcake/@135843 2009-03-03 18:28:52 -08:00
The Android Open Source Project
abc48f80d8 Code drop from //branches/cupcake/...@124589 2008-12-17 18:06:01 -08:00