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

Commit e75ff2c3 authored by Jayden Kim's avatar Jayden Kim Committed by Automerger Merge Worker
Browse files

Merge changes from topic "offload_socket_aosp" into main am: 3b15d68f am: 44fe8046

parents b84f2f2b 44fe8046
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.bluetooth.pbapclient;

import static android.Manifest.permission.BLUETOOTH_CONNECT;
import static android.Manifest.permission.BLUETOOTH_PRIVILEGED;

import android.accounts.Account;
import android.annotation.RequiresPermission;
@@ -468,7 +469,9 @@ class PbapClientObexClient {

    /* Utilize SDP, if available, to create a socket connection over L2CAP, RFCOMM specified
     * channel, or RFCOMM default channel. */
    @RequiresPermission(BLUETOOTH_CONNECT)
    @RequiresPermission(
            allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED},
            conditional = true)
    private PbapClientSocket connectSocket(int transport, int channelOrPsm) {
        debug(
                "Connect socket, transport="
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.bluetooth.pbapclient;

import static android.Manifest.permission.BLUETOOTH_CONNECT;
import static android.Manifest.permission.BLUETOOTH_PRIVILEGED;

import android.annotation.RequiresPermission;
import android.bluetooth.BluetoothDevice;
@@ -101,7 +102,9 @@ public class PbapClientSocket {
    }

    /** Invokes the underlying BluetoothSocket#connect(), or does nothing if a socket is injected */
    @RequiresPermission(BLUETOOTH_CONNECT)
    @RequiresPermission(
            allOf = {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED},
            conditional = true)
    public void connect() throws IOException {
        if (mSocket != null) {
            mSocket.connect();