From 0f5843069bd419fba4fb253986645dfbca0784b7 Mon Sep 17 00:00:00 2001 From: Jake Hamby Date: Thu, 16 Sep 2010 18:12:51 -0700 Subject: Fix Bluetooth Javadoc to clarify the maximum device name length. The maximum length of a Bluetooth device name is 248 bytes using UTF-8 encoding. Updated the Javadoc to clarify that the length is limited by the number of UTF-8 bytes and not the number of characters. Change-Id: I135671f5ee6c5eb6372f3fbbc5fccb02de65e6c4 --- core/java/android/bluetooth/BluetoothAdapter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index 16a8c571f41c..33fd39513f52 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -465,11 +465,11 @@ public final class BluetoothAdapter { } /** - * Set the friendly Bluetooth name of the local Bluetoth adapter. + * Set the friendly Bluetooth name of the local Bluetooth adapter. *

This name is visible to remote Bluetooth devices. - *

Valid Bluetooth names are a maximum of 248 UTF-8 characters, however - * many remote devices can only display the first 40 characters, and some - * may be limited to just 20. + *

Valid Bluetooth names are a maximum of 248 bytes using UTF-8 + * encoding, although many remote devices can only display the first + * 40 characters, and some may be limited to just 20. *

If Bluetooth state is not {@link #STATE_ON}, this API * will return false. After turning on Bluetooth, * wait for {@link #ACTION_STATE_CHANGED} with {@link #STATE_ON} @@ -488,7 +488,7 @@ public final class BluetoothAdapter { } /** - * Get the current Bluetooth scan mode of the local Bluetooth adaper. + * Get the current Bluetooth scan mode of the local Bluetooth adapter. *

The Bluetooth scan mode determines if the local adapter is * connectable and/or discoverable from remote Bluetooth devices. *

Possible values are: @@ -611,7 +611,7 @@ public final class BluetoothAdapter { /** * Cancel the current device discovery process. *

Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}. - *

Because discovery is a heavyweight precedure for the Bluetooth + *

Because discovery is a heavyweight procedure for the Bluetooth * adapter, this method should always be called before attempting to connect * to a remote device with {@link * android.bluetooth.BluetoothSocket#connect()}. Discovery is not managed by -- cgit v1.2.3-59-g8ed1b