diff --git a/core/java/android/bluetooth/AtCommandResult.java b/core/java/android/bluetooth/AtCommandResult.java index 638be2d2e998e..375a6ddba860b 100644 --- a/core/java/android/bluetooth/AtCommandResult.java +++ b/core/java/android/bluetooth/AtCommandResult.java @@ -16,8 +16,6 @@ package android.bluetooth; -import java.util.*; - /** * The result of execution of an single AT command.
* diff --git a/core/java/android/bluetooth/AtParser.java b/core/java/android/bluetooth/AtParser.java index 1ea31503bb7b9..328fb2bbd5964 100644 --- a/core/java/android/bluetooth/AtParser.java +++ b/core/java/android/bluetooth/AtParser.java @@ -16,16 +16,13 @@ package android.bluetooth; -import android.bluetooth.AtCommandHandler; -import android.bluetooth.AtCommandResult; - import java.util.*; /** * An AT (Hayes command) Parser based on (a subset of) the ITU-T V.250 standard. *
* - * Conforment with the subset of V.250 required for implementation of the + * Conformant with the subset of V.250 required for implementation of the * Bluetooth Headset and Handsfree Profiles, as per Bluetooth SIP * specifications. Also implements some V.250 features not required by * Bluetooth - such as chained commands.
@@ -48,7 +45,7 @@ import java.util.*; * are no arguments for get commands. *
* * Extended commands can be chained. For example:
@@ -71,7 +68,7 @@ import java.util.*; * AT+CIMI * Except that only one final result code is return (although several * intermediate responses may be returned), and as soon as one command in the - * chain fails the rest are abandonded.
+ * chain fails the rest are abandoned.
* * Handlers are registered by there command name via register(Char c, ...) or * register(String s, ...). Handlers for Basic command should be registered by @@ -80,7 +77,7 @@ import java.util.*; * * Refer to:
* This method will invoke zero or one command handler methods for each * command in the command line.
- * @param raw_input The AT input, without EOL deliminator (e.g. This gracefully shuts down all Bluetooth connections, stops Bluetooth
* system services, and powers down the underlying Bluetooth hardware.
- * Bluetooth should never be disbled without
+ * Bluetooth should never be disabled without
* direct user consent. The {@link #disable()} method is
* provided only for applications that include a user interface for changing
* system settings, such as a "power manager" app.
Use {@link BluetoothDevice#getBluetoothClass} to retrieve the class for * a remote device. diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java index e577ec4f737c1..ada3c24e5d00c 100644 --- a/core/java/android/bluetooth/BluetoothDevice.java +++ b/core/java/android/bluetooth/BluetoothDevice.java @@ -32,7 +32,7 @@ import java.util.UUID; /** * Represents a remote Bluetooth device. A {@link BluetoothDevice} lets you - * create a connection with the repective device or query information about + * create a connection with the respective device or query information about * it, such as the name, address, class, and bonding state. * *
This class is really just a thin wrapper for a Bluetooth hardware @@ -48,7 +48,7 @@ import java.util.UUID; * {@link BluetoothAdapter}) or get one from the set of bonded devices * returned by {@link BluetoothAdapter#getBondedDevices() * BluetoothAdapter.getBondedDevices()}. You can then open a - * {@link BluetoothSocket} for communciation with the remote device, using + * {@link BluetoothSocket} for communication with the remote device, using * {@link #createRfcommSocketToServiceRecord(UUID)}. * *
Note: @@ -226,8 +226,8 @@ public final class BluetoothDevice implements Parcelable { *
A shared link keys exists locally for the remote device, so * communication can be authenticated and encrypted. *
Being bonded (paired) with a remote device does not necessarily - * mean the device is currently connected. It just means that the ponding - * procedure was compeleted at some earlier time, and the link key is still + * mean the device is currently connected. It just means that the pending + * procedure was completed at some earlier time, and the link key is still * stored locally, ready to use on the next connection. * */ @@ -283,7 +283,7 @@ public final class BluetoothDevice implements Parcelable { * not respond to pin request in time * @hide */ public static final int UNBOND_REASON_AUTH_FAILED = 1; - /** A bond attempt failed because the other side explicilty rejected + /** A bond attempt failed because the other side explicitly rejected * bonding * @hide */ public static final int UNBOND_REASON_AUTH_REJECTED = 2; @@ -515,7 +515,7 @@ public final class BluetoothDevice implements Parcelable { * Cancel an in-progress bonding request started with {@link #createBond}. *
Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}. * - * @return true on sucess, false on error + * @return true on success, false on error * @hide */ public boolean cancelBondProcess() { @@ -532,7 +532,7 @@ public final class BluetoothDevice implements Parcelable { * authentication and encryption. *
Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}. * - * @return true on sucess, false on error + * @return true on success, false on error * @hide */ public boolean removeBond() { @@ -617,7 +617,7 @@ public final class BluetoothDevice implements Parcelable { * with the UUIDs supported by the remote end. If there is an error * in getting the SDP records or if the process takes a long time, * an Intent is sent with the UUIDs that is currently present in the - * cache. Clients should use the {@link getUuids} to get UUIDs + * cache. Clients should use the {@link #getUuids} to get UUIDs * is SDP is not to be performed. * * @return False if the sanity check fails, True if the process @@ -693,7 +693,7 @@ public final class BluetoothDevice implements Parcelable { * outgoing connection to this remote device on given channel. *
The remote device will be authenticated and communication on this * socket will be encrypted. - *
Use {@link BluetoothSocket#connect} to intiate the outgoing + *
Use {@link BluetoothSocket#connect} to initiate the outgoing * connection. *
Valid RFCOMM channels are in range 1 to 30. *
Requires {@link android.Manifest.permission#BLUETOOTH} @@ -715,7 +715,7 @@ public final class BluetoothDevice implements Parcelable { *
This is designed to be used with {@link * BluetoothAdapter#listenUsingRfcommWithServiceRecord} for peer-peer * Bluetooth applications. - *
Use {@link BluetoothSocket#connect} to intiate the outgoing + *
Use {@link BluetoothSocket#connect} to initiate the outgoing * connection. This will also perform an SDP lookup of the given uuid to * determine which channel to connect to. *
The remote device will be authenticated and communication on this @@ -772,9 +772,9 @@ public final class BluetoothDevice implements Parcelable { /** * Check that a pin is valid and convert to byte array. * - * Bluetooth pin's are 1 to 16 bytes of UTF8 characters. + * Bluetooth pin's are 1 to 16 bytes of UTF-8 characters. * @param pin pin as java String - * @return the pin code as a UTF8 byte array, or null if it is an invalid + * @return the pin code as a UTF-8 byte array, or null if it is an invalid * Bluetooth pin. * @hide */ @@ -784,9 +784,9 @@ public final class BluetoothDevice implements Parcelable { } byte[] pinBytes; try { - pinBytes = pin.getBytes("UTF8"); + pinBytes = pin.getBytes("UTF-8"); } catch (UnsupportedEncodingException uee) { - Log.e(TAG, "UTF8 not supported?!?"); // this should not happen + Log.e(TAG, "UTF-8 not supported?!?"); // this should not happen return null; } if (pinBytes.length <= 0 || pinBytes.length > 16) { diff --git a/core/java/android/bluetooth/BluetoothDevicePicker.java b/core/java/android/bluetooth/BluetoothDevicePicker.java index 05eed0e6de633..3a07033eab71b 100644 --- a/core/java/android/bluetooth/BluetoothDevicePicker.java +++ b/core/java/android/bluetooth/BluetoothDevicePicker.java @@ -36,7 +36,8 @@ public interface BluetoothDevicePicker { /** * Broadcast when one BT device is selected from BT device picker screen. - * Selected BT device address is contained in extra string {@link BluetoothIntent} + * Selected {@link BluetoothDevice} is returned in extra data named + * {@link BluetoothDevice#EXTRA_DEVICE}. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_DEVICE_SELECTED = diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java index 53d6a378616bf..da1aa450c1e44 100644 --- a/core/java/android/bluetooth/BluetoothHeadset.java +++ b/core/java/android/bluetooth/BluetoothHeadset.java @@ -153,11 +153,11 @@ public final class BluetoothHeadset { public static final int LOCAL_DISCONNECT = 1; - /** Default priority for headsets that for which we will accept - * inconing connections and auto-connect */ + /** Default priority for headsets for which we will accept + * incoming connections and auto-connect. */ public static final int PRIORITY_AUTO_CONNECT = 1000; - /** Default priority for headsets that for which we will accept - * inconing connections but not auto-connect */ + /** Default priority for headsets for which we will accept + * incoming connections but not auto-connect. */ public static final int PRIORITY_ON = 100; /** Default priority for headsets that should not be auto-connected * and not allow incoming connections. */ @@ -305,7 +305,7 @@ public final class BluetoothHeadset { /** * Disconnects the current headset. Currently this call blocks, it may soon - * be made asynchornous. Returns false if this proxy object is + * be made asynchronous. Returns false if this proxy object is * not currently connected to the Headset service. */ public boolean disconnectHeadset(BluetoothDevice device) { diff --git a/core/java/android/bluetooth/BluetoothPbap.java b/core/java/android/bluetooth/BluetoothPbap.java index b48f48e9f1977..4be077c0e7b91 100644 --- a/core/java/android/bluetooth/BluetoothPbap.java +++ b/core/java/android/bluetooth/BluetoothPbap.java @@ -197,7 +197,7 @@ public class BluetoothPbap { /** * Disconnects the current Pbap client (PCE). Currently this call blocks, - * it may soon be made asynchornous. Returns false if this proxy object is + * it may soon be made asynchronous. Returns false if this proxy object is * not currently connected to the Pbap service. */ public boolean disconnect() { diff --git a/core/java/android/bluetooth/BluetoothServerSocket.java b/core/java/android/bluetooth/BluetoothServerSocket.java index c9c6c0acd9a76..83e59e266d8e3 100644 --- a/core/java/android/bluetooth/BluetoothServerSocket.java +++ b/core/java/android/bluetooth/BluetoothServerSocket.java @@ -29,14 +29,14 @@ import java.io.IOException; * side, use a {@link BluetoothServerSocket} to create a listening server * socket. When a connection is accepted by the {@link BluetoothServerSocket}, * it will return a new {@link BluetoothSocket} to manage the connection. - * On the client side, use a single {@link BluetoothSocket} to both intiate + * On the client side, use a single {@link BluetoothSocket} to both initiate * an outgoing connection and to manage the connection. * *
The most common type of Bluetooth socket is RFCOMM, which is the type * supported by the Android APIs. RFCOMM is a connection-oriented, streaming * transport over Bluetooth. It is also known as the Serial Port Profile (SPP). * - *
To create a listenting {@link BluetoothServerSocket} that's ready for + *
To create a listening {@link BluetoothServerSocket} that's ready for * incoming connections, use * {@link BluetoothAdapter#listenUsingRfcommWithServiceRecord * BluetoothAdapter.listenUsingRfcommWithServiceRecord()}. Then call @@ -70,7 +70,7 @@ public final class BluetoothServerSocket implements Closeable { * @param encrypt require the connection to be encrypted * @param port remote port * @throws IOException On error, for example Bluetooth not available, or - * insufficient priveleges + * insufficient privileges */ /*package*/ BluetoothServerSocket(int type, boolean auth, boolean encrypt, int port) throws IOException { diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java index ad033999e0d2e..719d730770d29 100644 --- a/core/java/android/bluetooth/BluetoothSocket.java +++ b/core/java/android/bluetooth/BluetoothSocket.java @@ -35,7 +35,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; * side, use a {@link BluetoothServerSocket} to create a listening server * socket. When a connection is accepted by the {@link BluetoothServerSocket}, * it will return a new {@link BluetoothSocket} to manage the connection. - * On the client side, use a single {@link BluetoothSocket} to both intiate + * On the client side, use a single {@link BluetoothSocket} to both initiate * an outgoing connection and to manage the connection. * *
The most common type of Bluetooth socket is RFCOMM, which is the type
@@ -113,7 +113,7 @@ public final class BluetoothSocket implements Closeable {
* @param port remote port
* @param uuid SDP uuid
* @throws IOException On error, for example Bluetooth not available, or
- * insufficient priveleges
+ * insufficient privileges
*/
/*package*/ BluetoothSocket(int type, int fd, boolean auth, boolean encrypt,
BluetoothDevice device, int port, ParcelUuid uuid) throws IOException {
@@ -158,7 +158,7 @@ public final class BluetoothSocket implements Closeable {
* @param address remote device that this socket can connect to
* @param port remote port
* @throws IOException On error, for example Bluetooth not available, or
- * insufficient priveleges
+ * insufficient privileges
*/
private BluetoothSocket(int type, int fd, boolean auth, boolean encrypt, String address,
int port) throws IOException {
@@ -226,7 +226,7 @@ public final class BluetoothSocket implements Closeable {
}
// all native calls are guaranteed to immediately return after
- // abortNative(), so this lock should immediatley acquire
+ // abortNative(), so this lock should immediately acquire
mLock.writeLock().lock();
try {
mClosed = true;
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java
index 2a5f8676ec5d7..75807bfa925ba 100644
--- a/core/java/android/server/BluetoothEventLoop.java
+++ b/core/java/android/server/BluetoothEventLoop.java
@@ -36,7 +36,7 @@ import android.os.PowerManager;
/**
* TODO: Move this to
* java/services/com/android/server/BluetoothEventLoop.java
- * and make the contructor package private again.
+ * and make the constructor package private again.
*
* @hide
*/
@@ -617,7 +617,7 @@ class BluetoothEventLoop {
private void onRestartRequired() {
if (mBluetoothService.isEnabled()) {
- Log.e(TAG, "*** A serious error occured (did bluetoothd crash?) - " +
+ Log.e(TAG, "*** A serious error occurred (did bluetoothd crash?) - " +
"restarting Bluetooth ***");
mHandler.sendEmptyMessage(EVENT_RESTART_BLUETOOTH);
}
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index dfe3a25fbc15c..71b4ee244425a 100644
--- a/core/java/android/server/BluetoothService.java
+++ b/core/java/android/server/BluetoothService.java
@@ -464,7 +464,7 @@ public class BluetoothService extends IBluetooth.Stub {
// forked multiple times in a row, probably because there is
// some race in sdptool or bluez when operated in parallel.
// As a workaround, delay 500ms between each fork of sdptool.
- // TODO: Don't fork sdptool in order to regsiter service
+ // TODO: Don't fork sdptool in order to register service
// records, use a DBUS call instead.
switch (msg.arg1) {
case 1:
@@ -673,7 +673,7 @@ public class BluetoothService extends IBluetooth.Stub {
/** local cache of bonding state.
/* we keep our own state to track the intermediate state BONDING, which
/* bluez does not track.
- * All addreses must be passed in upper case.
+ * All addresses must be passed in upper case.
*/
public class BondState {
private final HashMap