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

Commit 4c4d125b authored by Anton Hansson's avatar Anton Hansson
Browse files

Fix broken @see/@link references in Bluetooth

IntDefs are not present in the generated documentation, so can not be
referenced in other documentation. There is however automatic
documentation generated for IntDefs, which makes the linking
unnecessary.

Bug: 303184203
Test: m docs
Change-Id: I4c29d1ef022b04a992c69c315594d29aa4ae7ea1
parent 832c154f
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -427,19 +427,21 @@ public final class BluetoothSocket implements Closeable {
    }
    /**
     * Attempt to connect to a remote device.
     *
     * <p>This method will block until a connection is made or the connection fails. If this method
     * returns without an exception then this socket is now connected.
     *
     * <p>Creating new connections to remote Bluetooth devices should not be attempted while device
     * discovery is in progress. Device discovery is a heavyweight procedure on the Bluetooth
     * adapter and will significantly slow a device connection. Use
     * {@link BluetoothAdapter#cancelDiscovery()} to cancel an ongoing discovery. Discovery is not
     * managed by the Activity, but is run as a system service, so an application should always call
     * {@link BluetoothAdapter#cancelDiscovery()} even if it did not directly request a discovery,
     * just to be sure.
     * adapter and will significantly slow a device connection. Use {@link
     * BluetoothAdapter#cancelDiscovery()} to cancel an ongoing discovery. Discovery is not managed
     * by the Activity, but is run as a system service, so an application should always call {@link
     * BluetoothAdapter#cancelDiscovery()} even if it did not directly request a discovery, just to
     * be sure.
     *
     * <p>{@link #close} can be used to abort this call from another thread.
     *
     * @throws BluetoothSocketException in case of failure, with the corresponding
     * {@link BluetoothSocketException#ErrorCode}.
     * @throws BluetoothSocketException in case of failure, with the corresponding error code.
     * @throws IOException for other errors (eg: InputStream read failures etc.).
     */
    @RequiresBluetoothConnectPermission
+5 −5
Original line number Diff line number Diff line
@@ -204,9 +204,9 @@ public class BluetoothSocketException extends IOException {
    @ErrorCode private final int mErrorCode;

    /**
     * Create a {@link BluetoothSocketException} with a {@link ErrorCode} and custom error message.
     * Create a {@link BluetoothSocketException} with an error code and custom error message.
     *
     * @param code : {@link ErrorCode} representing the reason for failure.
     * @param code : error code representing the reason for failure.
     * @param msg : Custom error message associated to the failure.
     */
    public BluetoothSocketException(@ErrorCode int code, @NonNull String msg) {
@@ -215,10 +215,10 @@ public class BluetoothSocketException extends IOException {
    }

    /**
     * Create a {@link BluetoothSocketException} with an error {@link ErrorCode}. A generic error
     * message is generated based on the {@code code} provided.
     * Create a {@link BluetoothSocketException} with an error code. A generic error message is
     * generated based on the {@code code} provided.
     *
     * @param code : {@link ErrorCode} representing the reason for failure.
     * @param code : error code representing the reason for failure.
     */
    public BluetoothSocketException(@ErrorCode int code) {
        this(code, getMessage(code));