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

Commit 10802fbd authored by Xin Li's avatar Xin Li
Browse files

DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into

stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
parents a3ca55f8 fc760870
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3044,7 +3044,7 @@ public final class BluetoothAdapter {
     * socket will be encrypted.
     * <p>Use {@link BluetoothServerSocket#accept} to retrieve incoming connections from a listening
     * {@link BluetoothServerSocket}.
     * <p>The system will assign a dynamic PSM value. This PSM value can be read from the {#link
     * <p>The system will assign a dynamic PSM value. This PSM value can be read from the {@link
     * BluetoothServerSocket#getPsm()} and this value will be released when this server socket is
     * closed, Bluetooth is turned off, or the application exits unexpectedly.
     * <p>The mechanism of disclosing the assigned dynamic PSM value to the initiating peer is
@@ -3102,7 +3102,7 @@ public final class BluetoothAdapter {
     * <p>Use {@link BluetoothServerSocket#accept} to retrieve incoming connections from a listening
     * {@link BluetoothServerSocket}.
     * <p>The system will assign a dynamic protocol/service multiplexer (PSM) value. This PSM value
     * can be read from the {#link BluetoothServerSocket#getPsm()} and this value will be released
     * can be read from the {@link BluetoothServerSocket#getPsm()} and this value will be released
     * when this server socket is closed, Bluetooth is turned off, or the application exits
     * unexpectedly.
     * <p>The mechanism of disclosing the assigned dynamic PSM value to the initiating peer is
+5 −5
Original line number Diff line number Diff line
@@ -793,7 +793,7 @@ public final class BluetoothDevice implements Parcelable {
    public static final int ACCESS_REJECTED = 2;

    /**
     * No preferrence of physical transport for GATT connections to remote dual-mode devices
     * No preference of physical transport for GATT connections to remote dual-mode devices
     */
    public static final int TRANSPORT_AUTO = 0;

@@ -1799,7 +1799,7 @@ public final class BluetoothDevice implements Parcelable {
     * For example, for Bluetooth 2.1 devices, if any of the devices does not
     * have an input and output capability or just has the ability to
     * display a numeric key, a secure socket connection is not possible.
     * In such a case, use {#link createInsecureRfcommSocket}.
     * In such a case, use {@link createInsecureRfcommSocket}.
     * For more details, refer to the Security Model section 5.2 (vol 3) of
     * Bluetooth Core Specification version 2.1 + EDR.
     * <p>Use {@link BluetoothSocket#connect} to initiate the outgoing
@@ -1834,7 +1834,7 @@ public final class BluetoothDevice implements Parcelable {
     * For example, for Bluetooth 2.1 devices, if any of the devices does not
     * have an input and output capability or just has the ability to
     * display a numeric key, a secure socket connection is not possible.
     * In such a case, use {#link createInsecureRfcommSocket}.
     * In such a case, use {@link createInsecureRfcommSocket}.
     * For more details, refer to the Security Model section 5.2 (vol 3) of
     * Bluetooth Core Specification version 2.1 + EDR.
     * <p>Use {@link BluetoothSocket#connect} to initiate the outgoing
@@ -1891,7 +1891,7 @@ public final class BluetoothDevice implements Parcelable {
     * For example, for Bluetooth 2.1 devices, if any of the devices does not
     * have an input and output capability or just has the ability to
     * display a numeric key, a secure socket connection is not possible.
     * In such a case, use {#link createInsecureRfcommSocketToServiceRecord}.
     * In such a case, use {@link #createInsecureRfcommSocketToServiceRecord}.
     * For more details, refer to the Security Model section 5.2 (vol 3) of
     * Bluetooth Core Specification version 2.1 + EDR.
     * <p>Hint: If you are connecting to a Bluetooth serial board then try
@@ -2175,7 +2175,7 @@ public final class BluetoothDevice implements Parcelable {
     * encrypted.
     * <p> Use this socket if an authenticated socket link is possible. Authentication refers
     * to the authentication of the link key to prevent man-in-the-middle type of attacks. When a
     * secure socket connection is not possible, use {#link createInsecureLeL2capCocSocket(int,
     * secure socket connection is not possible, use {@link createInsecureLeL2capCocSocket(int,
     * int)}.
     *
     * @param psm dynamic PSM value from remote device
+1 −1
Original line number Diff line number Diff line
@@ -1293,7 +1293,7 @@ public final class BluetoothGatt implements BluetoothProfile {
     * <p>After all characteristics have been queued up and verified,
     * {@link #executeReliableWrite} will execute all writes. If a characteristic
     * was not written correctly, calling {@link #abortReliableWrite} will
     * cancel the current transaction without commiting any values on the
     * cancel the current transaction without committing any values on the
     * remote device.
     *
     * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
+2 −2
Original line number Diff line number Diff line
@@ -522,7 +522,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
     * {@link BluetoothGattServerCallback#onConnectionStateChange} callback will be
     * invoked when the connection state changes as a result of this function.
     *
     * <p>The autoConnect paramter determines whether to actively connect to
     * <p>The autoConnect parameter determines whether to actively connect to
     * the remote device, or rather passively scan and finalize the connection
     * when the remote device is in range/available. Generally, the first ever
     * connection to a device should be direct (autoConnect set to false) and
@@ -695,7 +695,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
    /**
     * Add a service to the list of services to be hosted.
     *
     * <p>Once a service has been addded to the the list, the service and its
     * <p>Once a service has been addded to the list, the service and its
     * included characteristics will be provided by the local device.
     *
     * <p>If the local device has already exposed services when this function
+9 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.bluetooth;

import android.os.Parcel;
import android.os.Parcelable;
import android.util.EventLog;


/**
@@ -30,6 +31,8 @@ import android.os.Parcelable;
 */
public final class BluetoothHidDeviceAppSdpSettings implements Parcelable {

    private static final int MAX_DESCRIPTOR_SIZE = 2048;

    private final String mName;
    private final String mDescription;
    private final String mProvider;
@@ -55,6 +58,12 @@ public final class BluetoothHidDeviceAppSdpSettings implements Parcelable {
        mDescription = description;
        mProvider = provider;
        mSubclass = subclass;

        if (descriptors == null || descriptors.length > MAX_DESCRIPTOR_SIZE) {
            EventLog.writeEvent(0x534e4554, "119819889", -1, "");
            throw new IllegalArgumentException("descriptors must be not null and shorter than "
                    + MAX_DESCRIPTOR_SIZE);
        }
        mDescriptors = descriptors.clone();
    }

Loading