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
This commit is contained in:
Jake Hamby
2010-12-03 17:02:02 -08:00
committed by Jean-Baptiste Queru
parent 5c20526246
commit c681e939dd

View File

@@ -40,7 +40,8 @@ import android.widget.EditText;
*/ */
public class BluetoothNamePreference extends EditTextPreference implements TextWatcher { public class BluetoothNamePreference extends EditTextPreference implements TextWatcher {
private static final String TAG = "BluetoothNamePreference"; private static final String TAG = "BluetoothNamePreference";
private static final int BLUETOOTH_NAME_MAX_LENGTH_BYTES = 248; // max. length reduced from 248 to 246 bytes to work around Bluez bug
private static final int BLUETOOTH_NAME_MAX_LENGTH_BYTES = 246;
private LocalBluetoothManager mLocalManager; private LocalBluetoothManager mLocalManager;