Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a972acf authored by Jake Hamby's avatar Jake Hamby Committed by Android (Google) Code Review
Browse files

Merge "Typo fixes in comments and minor code cleanups." into gingerbread

parents e0c12c88 f51eadaf
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package android.bluetooth;

import java.util.*;

/**
 * The result of execution of an single AT command.<p>
 *
+10 −13
Original line number Diff line number Diff line
@@ -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.
 * <p>
 *
 * 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.<p>
@@ -48,7 +45,7 @@ import java.util.*;
 * are no arguments for get commands.
 * <li>Set Command. For example "AT+VGM=14". The command name is "VGM", and
 * there is a single integer argument in this case. In the general case then
 * can be zero or more arguments (comma deliminated) each of integer or string
 * can be zero or more arguments (comma delimited) each of integer or string
 * form.
 * <li>Test Command. For example "AT+VGM=?. No arguments.
 * </ul>
@@ -60,7 +57,7 @@ import java.util.*;
 * headset/handsfree use this is acceptable, because they only use the basic
 * commands ATA and ATD, which are not allowed to be chained. For general V.250
 * use we would need to improve this class to allow Basic command chaining -
 * however its tricky to get right becuase there is no deliminator for Basic
 * however it's tricky to get right because there is no delimiter for Basic
 * command chaining.<p>
 *
 * Extended commands can be chained. For example:<p>
@@ -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.<p>
 * chain fails the rest are abandoned.<p>
 *
 * 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:<ul>
 * <li>ITU-T Recommendation V.250
 * <li>ETSI TS 127.007  (AT Comannd set for User Equipment, 3GPP TS 27.007)
 * <li>ETSI TS 127.007  (AT Command set for User Equipment, 3GPP TS 27.007)
 * <li>Bluetooth Headset Profile Spec (K6)
 * <li>Bluetooth Handsfree Profile Spec (HFP 1.5)
 * </ul>
@@ -188,7 +185,7 @@ public class AtParser {
    }

    /**
     * Break an argument string into individual arguments (comma deliminated).
     * Break an argument string into individual arguments (comma delimited).
     * Integer arguments are turned into Integer objects. Otherwise a String
     * object is used.
     */
@@ -212,7 +209,7 @@ public class AtParser {
    }

    /**
     * Return the index of the end of character after the last characeter in
     * Return the index of the end of character after the last character in
     * the extended command name. Uses the V.250 spec for allowed command
     * names.
     */
@@ -244,7 +241,7 @@ public class AtParser {
     * Processes an incoming AT command line.<p>
     * This method will invoke zero or one command handler methods for each
     * command in the command line.<p>
     * @param raw_input The AT input, without EOL deliminator (e.g. <CR>).
     * @param raw_input The AT input, without EOL delimiter (e.g. <CR>).
     * @return          Result object for this command line. This can be
     *                  converted to a String[] response with toStrings().
     */
@@ -297,8 +294,8 @@ public class AtParser {

            if (c == '+') {
                // Option 2: Extended Command
                // Search for first non-name character. Shortcircuit if we dont
                // handle this command name.
                // Search for first non-name character. Short-circuit if
                // we don't handle this command name.
                int i = findEndExtendedName(input, index + 1);
                String commandName = input.substring(index, i);
                if (!mExtHandlers.containsKey(commandName)) {
+4 −4
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ public final class BluetoothAdapter {
    private static final int ADDRESS_LENGTH = 17;

    /**
     * Lazyily initialized singleton. Guaranteed final after first object
     * Lazily initialized singleton. Guaranteed final after first object
     * constructed.
     */
    private static BluetoothAdapter sAdapter;
@@ -410,7 +410,7 @@ public final class BluetoothAdapter {
     * user action to turn off Bluetooth.
     * <p>This gracefully shuts down all Bluetooth connections, stops Bluetooth
     * system services, and powers down the underlying Bluetooth hardware.
     * <p class="caution"><strong>Bluetooth should never be disbled without
     * <p class="caution"><strong>Bluetooth should never be disabled without
     * direct user consent</strong>. The {@link #disable()} method is
     * provided only for applications that include a user interface for changing
     * system settings, such as a "power manager" app.</p>
@@ -876,8 +876,8 @@ public final class BluetoothAdapter {
    public Pair<byte[], byte[]> readOutOfBandData() {
        if (getState() != STATE_ON) return null;
        try {
            byte[] hash = new byte[16];
            byte[] randomizer = new byte[16];
            byte[] hash;
            byte[] randomizer;

            byte[] ret = mService.readOutOfBandData();

+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ import android.os.Handler;
import android.util.Log;

/**
 * Listen's for incoming RFCOMM connection for the headset / handsfree service.
 * Listens for incoming RFCOMM connection for the headset / handsfree service.
 *
 * TODO: Use the new generic BluetoothSocket class instead of this legacy code
 *
+2 −2
Original line number Diff line number Diff line
@@ -34,8 +34,8 @@ import android.os.Parcelable;
 * Bluetooth profiles or services are actually supported by a device. Accurate
 * service discovery is done through SDP requests, which are automatically
 * performed when creating an RFCOMM socket with {@link
 * BluetoothDevice#createRfcommSocketToServiceRecord(UUID)} and {@link
 * BluetoothAdapter#listenUsingRfcommWithServiceRecord(String,UUID)}</p>
 * BluetoothDevice#createRfcommSocketToServiceRecord} and {@link
 * BluetoothAdapter#listenUsingRfcommWithServiceRecord}</p>
 *
 * <p>Use {@link BluetoothDevice#getBluetoothClass} to retrieve the class for
 * a remote device.
Loading