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

Commit a352f480 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6160382 from c7e7661b7f7042281cab86b9bc7013652c6dc44a to rvc-release

Change-Id: I872e3f500f50d490c4c0aa4c47d293d6f730245c
parents 8a8b721e a0cab5b2
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -297,7 +297,8 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     */
    @SystemApi
    @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
    public boolean setConnectionPolicy(@Nullable BluetoothDevice device, int connectionPolicy) {
    public boolean setConnectionPolicy(@Nullable BluetoothDevice device,
            @ConnectionPolicy int connectionPolicy) {
        if (DBG) log("setConnectionPolicy(" + device + ", " + connectionPolicy + ")");
        final IBluetoothA2dpSink service = getService();
        if (service != null && isEnabled() && isValidDevice(device)) {
@@ -345,7 +346,7 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     */
    @SystemApi
    @RequiresPermission(Manifest.permission.BLUETOOTH)
    public int getConnectionPolicy(@Nullable BluetoothDevice device) {
    public @ConnectionPolicy int getConnectionPolicy(@Nullable BluetoothDevice device) {
        if (VDBG) log("getConnectionPolicy(" + device + ")");
        final IBluetoothA2dpSink service = getService();
        if (service != null && isEnabled() && isValidDevice(device)) {
+0 −25
Original line number Diff line number Diff line
@@ -3235,18 +3235,6 @@ public final class BluetoothAdapter {
        return socket;
    }

    /**
     * TODO: Remove this hidden method once all the SL4A and other tests are updated to use the new
     * API name, listenUsingL2capChannel.
     * @hide
     */
    @RequiresPermission(Manifest.permission.BLUETOOTH)
    public BluetoothServerSocket listenUsingL2capCoc(int transport)
            throws IOException {
        Log.e(TAG, "listenUsingL2capCoc: PLEASE USE THE OFFICIAL API, listenUsingL2capChannel");
        return listenUsingL2capChannel();
    }

    /**
     * Create an insecure L2CAP Connection-oriented Channel (CoC) {@link BluetoothServerSocket} and
     * assign a dynamic PSM value. This socket can be used to listen for incoming connections. The
@@ -3293,19 +3281,6 @@ public final class BluetoothAdapter {
        return socket;
    }

    /**
     * TODO: Remove this hidden method once all the SL4A and other tests are updated to use the new
     * API name, listenUsingInsecureL2capChannel.
     * @hide
     */
    @RequiresPermission(Manifest.permission.BLUETOOTH)
    public BluetoothServerSocket listenUsingInsecureL2capCoc(int transport)
            throws IOException {
        Log.e(TAG, "listenUsingInsecureL2capCoc: PLEASE USE THE OFFICIAL API, "
                    + "listenUsingInsecureL2capChannel");
        return listenUsingInsecureL2capChannel();
    }

    /**
     * Register a {@link #OnMetadataChangedListener} to receive update about metadata
     * changes for this {@link BluetoothDevice}.
+0 −22
Original line number Diff line number Diff line
@@ -2171,17 +2171,6 @@ public final class BluetoothDevice implements Parcelable {
                null);
    }

    /**
     * TODO: Remove this hidden method once all the SL4A and other tests are updated to use the new
     * API name, createL2capChannel.
     * @hide
     */
    @RequiresPermission(Manifest.permission.BLUETOOTH)
    public BluetoothSocket createL2capCocSocket(int transport, int psm) throws IOException {
        Log.e(TAG, "createL2capCocSocket: PLEASE USE THE OFFICIAL API, createL2capChannel");
        return createL2capChannel(psm);
    }

    /**
     * Create a Bluetooth L2CAP Connection-oriented Channel (CoC) {@link BluetoothSocket} that can
     * be used to start a secure outgoing connection to the remote device with the same dynamic
@@ -2212,17 +2201,6 @@ public final class BluetoothDevice implements Parcelable {
                null);
    }

    /**
     * TODO: Remove this hidden method once all the SL4A and other tests are updated to use the new
     * API name, createInsecureL2capChannel.
     * @hide
     */
    @RequiresPermission(Manifest.permission.BLUETOOTH)
    public BluetoothSocket createInsecureL2capCocSocket(int transport, int psm) throws IOException {
        Log.e(TAG, "createL2capCocSocket: PLEASE USE THE OFFICIAL API, createInsecureL2capChannel");
        return createInsecureL2capChannel(psm);
    }

    /**
     * Set a keyed metadata of this {@link BluetoothDevice} to a
     * {@link String} value.
+3 −2
Original line number Diff line number Diff line
@@ -584,7 +584,8 @@ public final class BluetoothHeadsetClient implements BluetoothProfile {
     */
    @SystemApi
    @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
    public boolean setConnectionPolicy(BluetoothDevice device, int connectionPolicy) {
    public boolean setConnectionPolicy(BluetoothDevice device,
            @ConnectionPolicy int connectionPolicy) {
        if (DBG) log("setConnectionPolicy(" + device + ", " + connectionPolicy + ")");
        final IBluetoothHeadsetClient service =
                getService();
@@ -633,7 +634,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile {
     */
    @SystemApi
    @RequiresPermission(Manifest.permission.BLUETOOTH)
    public int getConnectionPolicy(BluetoothDevice device) {
    public @ConnectionPolicy int getConnectionPolicy(BluetoothDevice device) {
        if (VDBG) log("getConnectionPolicy(" + device + ")");
        final IBluetoothHeadsetClient service =
                getService();
+3 −2
Original line number Diff line number Diff line
@@ -416,7 +416,8 @@ public final class BluetoothHidHost implements BluetoothProfile {
     */
    @SystemApi
    @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
    public boolean setConnectionPolicy(@Nullable BluetoothDevice device, int connectionPolicy) {
    public boolean setConnectionPolicy(@Nullable BluetoothDevice device,
            @ConnectionPolicy int connectionPolicy) {
        if (DBG) log("setConnectionPolicy(" + device + ", " + connectionPolicy + ")");
        final IBluetoothHidHost service = getService();
        if (service != null && isEnabled() && isValidDevice(device)) {
@@ -464,7 +465,7 @@ public final class BluetoothHidHost implements BluetoothProfile {
     */
    @SystemApi
    @RequiresPermission(Manifest.permission.BLUETOOTH)
    public int getConnectionPolicy(@Nullable BluetoothDevice device) {
    public @ConnectionPolicy int getConnectionPolicy(@Nullable BluetoothDevice device) {
        if (VDBG) log("getConnectionPolicy(" + device + ")");
        final IBluetoothHidHost service = getService();
        if (service != null && isEnabled() && isValidDevice(device)) {
Loading