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

Commit 5085a11d authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11438811 from effe7b7b to 24Q2-release

Change-Id: I3a9d6b7e4a961f58712c9e2b4b4f112b1d4a8896
parents 6f4fd0ee effe7b7b
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.R;
import com.android.bluetooth.Utils;
import com.android.bluetooth.bas.BatteryService;
import com.android.bluetooth.flags.FeatureFlagsImpl;
import com.android.bluetooth.flags.Flags;
import com.android.bluetooth.hfp.HeadsetHalConstants;
import com.android.internal.annotations.VisibleForTesting;

@@ -70,7 +70,6 @@ public class RemoteDevices {

    private BluetoothAdapter mAdapter;
    private AdapterService mAdapterService;
    private FeatureFlagsImpl mFeatureFlags;
    private ArrayList<BluetoothDevice> mSdpTracker;
    private final Object mObject = new Object();

@@ -155,7 +154,6 @@ public class RemoteDevices {
    RemoteDevices(AdapterService service, Looper looper) {
        mAdapter = ((Context) service).getSystemService(BluetoothManager.class).getAdapter();
        mAdapterService = service;
        mFeatureFlags = new FeatureFlagsImpl();
        mSdpTracker = new ArrayList<BluetoothDevice>();
        mDevices = new HashMap<String, DeviceProperties>();
        mDualDevicesMap = new HashMap<String, String>();
@@ -1259,7 +1257,7 @@ public class RemoteDevices {
        Log.d(TAG, "keyMissingCallback device: " + bluetoothDevice);

        if (bluetoothDevice.getBondState() == BluetoothDevice.BOND_BONDED) {
            if (!mFeatureFlags.keyMissingBroadcast()) {
            if (!Flags.keyMissingBroadcast()) {
                Log.d(TAG, "flag not set - don't send key missing broadcast");
                return;
            }
+0 −10
Original line number Diff line number Diff line
@@ -111,8 +111,6 @@ public class LeAudioService extends ProfileService {
    // Timeout for state machine thread join, to prevent potential ANR.
    private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000;

    // Upper limit of all LeAudio devices: Bonded or Connected
    private static final int MAX_LE_AUDIO_DEVICES = 10;
    private static LeAudioService sLeAudioService;

    /**
@@ -572,14 +570,6 @@ public class LeAudioService extends ProfileService {
            boolean isInbandRingtoneEnabled) {
        LeAudioDeviceDescriptor descriptor = mDeviceDescriptors.get(device);
        if (descriptor == null) {

            // Limit the maximum number of devices to avoid DoS attack
            if (mDeviceDescriptors.size() >= MAX_LE_AUDIO_DEVICES) {
                Log.e(TAG, "Maximum number of LeAudio state machines reached: "
                        + MAX_LE_AUDIO_DEVICES);
                return null;
            }

            mDeviceDescriptors.put(device, new LeAudioDeviceDescriptor(isInbandRingtoneEnabled));
            descriptor = mDeviceDescriptors.get(device);
            Log.d(TAG, "Created descriptor for device: " + device);
+7 −0
Original line number Diff line number Diff line
@@ -84,3 +84,10 @@ flag {
    description: "Optimize LE scan parameters for BRCM controllers"
    bug: "324238597"
}

flag {
    name: "le_periodic_scanning_reassembler"
    namespace: "bluetooth"
    description: "Enable reassembly of LE periodic advertising events"
    bug: "324886466"
}
+2 −0
Original line number Diff line number Diff line
@@ -339,6 +339,7 @@ cc_defaults {
        "libchrome",
    ],
    shared_libs: [
        "libbase",
        "liblog",
    ],
    target: {
@@ -1379,6 +1380,7 @@ cc_test {
        "test/common/mock_hcic_layer.cc",
    ],
    static_libs: [
        "libbase",
        "libbluetooth-types",
        "libbluetooth_hci_pdl",
        "libbluetooth_log",
+10 −10
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@

#include "bnep_api.h"

#include <base/logging.h>
#include <bluetooth/log.h>
#include <string.h>

#include "bnep_int.h"
@@ -37,6 +37,7 @@
#include "types/bluetooth/uuid.h"
#include "types/raw_address.h"

using namespace bluetooth;
using bluetooth::Uuid;

/*******************************************************************************
@@ -136,7 +137,7 @@ tBNEP_RESULT BNEP_Connect(const RawAddress& p_rem_bda, const Uuid& src_uuid,
  uint16_t cid;
  tBNEP_CONN* p_bcb = bnepu_find_bcb_by_bd_addr(p_rem_bda);

  VLOG(0) << __func__ << " BDA:" << p_rem_bda;
  log::verbose("BDA:{}", ADDRESS_TO_LOGGABLE_STR(p_rem_bda));

  if (!bnep_cb.profile_registered) return BNEP_WRONG_STATE;

@@ -162,7 +163,7 @@ tBNEP_RESULT BNEP_Connect(const RawAddress& p_rem_bda, const Uuid& src_uuid,
     */
    p_bcb->con_state = BNEP_STATE_SEC_CHECKING;

    LOG_VERBOSE("BNEP initiating security procedures for src uuid %s",
    log::verbose("BNEP initiating security procedures for src uuid {}",
                 p_bcb->src_uuid.ToString().c_str());

    bnep_sec_check_complete(&p_bcb->rem_bda, BT_TRANSPORT_BR_EDR, p_bcb);
@@ -177,7 +178,7 @@ tBNEP_RESULT BNEP_Connect(const RawAddress& p_rem_bda, const Uuid& src_uuid,
      p_bcb->l2cap_cid = cid;

    } else {
      LOG_ERROR("BNEP - Originate failed");
      log::error("BNEP - Originate failed");
      if (bnep_cb.p_conn_state_cb)
        (*bnep_cb.p_conn_state_cb)(p_bcb->handle, p_bcb->rem_bda,
                                   BNEP_CONN_FAILED, false);
@@ -221,7 +222,7 @@ tBNEP_RESULT BNEP_ConnectResp(uint16_t handle, tBNEP_RESULT resp) {
      (!(p_bcb->con_flags & BNEP_FLAGS_SETUP_RCVD)))
    return (BNEP_WRONG_STATE);

  LOG_DEBUG("handle %d, responce %d", handle, resp);
  log::debug("handle {}, responce {}", handle, resp);

  /* Form appropriate responce based on profile responce */
  if (resp == BNEP_CONN_FAILED_SRC_UUID)
@@ -294,7 +295,7 @@ tBNEP_RESULT BNEP_Disconnect(uint16_t handle) {

  if (p_bcb->con_state == BNEP_STATE_IDLE) return (BNEP_WRONG_HANDLE);

  LOG_VERBOSE("BNEP_Disconnect()  for handle %d", handle);
  log::verbose("BNEP_Disconnect()  for handle {}", handle);

  L2CA_DisconnectReq(p_bcb->l2cap_cid);

@@ -340,8 +341,7 @@ tBNEP_RESULT BNEP_WriteBuf(uint16_t handle, const RawAddress& dest_addr,
  p_bcb = &(bnep_cb.bcb[handle - 1]);
  /* Check MTU size */
  if (p_buf->len > BNEP_MTU_SIZE) {
    LOG_ERROR("%s length %d exceeded MTU %d", __func__, p_buf->len,
              BNEP_MTU_SIZE);
    log::error("length {} exceeded MTU {}", p_buf->len, BNEP_MTU_SIZE);
    osi_free(p_buf);
    return (BNEP_MTU_EXCEDED);
  }
@@ -445,7 +445,7 @@ tBNEP_RESULT BNEP_Write(uint16_t handle, const RawAddress& dest_addr,

  /* Check MTU size. Consider the possibility of having extension headers */
  if (len > BNEP_MTU_SIZE) {
    LOG_ERROR("%s length %d exceeded MTU %d", __func__, len, BNEP_MTU_SIZE);
    log::error("length {} exceeded MTU {}", len, BNEP_MTU_SIZE);
    return (BNEP_MTU_EXCEDED);
  }

Loading