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

Commit f4796842 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I38afbf6d,Iff42492d

* changes:
  leaudio: Adjust new methods permissions
  btm: set link policy only for BR/EDR cases
parents 6256d412 98f40f9e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -60,10 +60,10 @@ interface IBluetoothLeAudio {
     */
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)")
    int getGroupId(in BluetoothDevice device, in AttributionSource attributionSource);
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)")
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT,android.Manifest.permission.BLUETOOTH_PRIVILEGED})")
    void setVolume(int volume, in AttributionSource attributionSource);
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)")
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT,android.Manifest.permission.BLUETOOTH_PRIVILEGED})")
    boolean groupAddNode(int group_id, in BluetoothDevice device, in AttributionSource attributionSource);
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)")
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT,android.Manifest.permission.BLUETOOTH_PRIVILEGED})")
    boolean groupRemoveNode(int group_id, in BluetoothDevice device, in AttributionSource attributionSource);
}
+7 −2
Original line number Diff line number Diff line
@@ -372,7 +372,9 @@ void btm_acl_created(const RawAddress& bda, uint16_t hci_handle,
    p_acl->hci_handle = hci_handle;
    p_acl->link_role = link_role;
    p_acl->transport = transport;
    if (transport == BT_TRANSPORT_BR_EDR) {
      btm_set_link_policy(p_acl, btm_cb.acl_cb_.DefaultLinkPolicy());
    }
    LOG_WARN(
        "Unable to create duplicate acl when one already exists handle:%hu"
        " role:%s transport:%s",
@@ -402,7 +404,10 @@ void btm_acl_created(const RawAddress& bda, uint16_t hci_handle,
      "Created new ACL connection peer:%s role:%s handle:0x%04x transport:%s",
      PRIVATE_ADDRESS(bda), RoleText(p_acl->link_role).c_str(), hci_handle,
      bt_transport_text(transport).c_str());

  if (transport == BT_TRANSPORT_BR_EDR) {
    btm_set_link_policy(p_acl, btm_cb.acl_cb_.DefaultLinkPolicy());
  }

  if (transport == BT_TRANSPORT_LE) {
    btm_ble_refresh_local_resolvable_private_addr(