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

Commit 93badc9d authored by Stanley Tng's avatar Stanley Tng Committed by android-build-merger
Browse files

Merge "Update SL4A for LE CoC with LE Data Length changes" am: 87bd88c1

am: 28402ac5

Change-Id: I9d055a29c968542fa17ffac850965475b83f8a91
parents 5fc3770b 28402ac5
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -35,7 +35,8 @@ Status BluetoothSocketManagerBinderServer::connectSocket(
    std::unique_ptr<ParcelFileDescriptor>* _aidl_return) {
  if (!isCallerActiveUserOrManagedProfile()) {
    LOG(WARNING) << "connectSocket() - Not allowed for non-active users";
    return Status::ok();
    return Status::fromExceptionCode(
        Status::EX_SECURITY, String8("Not allowed for non-active users"));
  }

  ENFORCE_PERMISSION(PERMISSION_BLUETOOTH);
@@ -67,7 +68,8 @@ Status BluetoothSocketManagerBinderServer::createSocketChannel(
    std::unique_ptr<ParcelFileDescriptor>* _aidl_return) {
  if (!isCallerActiveUserOrManagedProfile()) {
    LOG(WARNING) << "createSocketChannel() - Not allowed for non-active users";
    return Status::ok();
    return Status::fromExceptionCode(
        Status::EX_SECURITY, String8("Not allowed for non-active users"));
  }

  ENFORCE_PERMISSION(PERMISSION_BLUETOOTH);
@@ -100,5 +102,21 @@ Status BluetoothSocketManagerBinderServer::createSocketChannel(
  return Status::ok();
}

Status BluetoothSocketManagerBinderServer::requestMaximumTxDataLength(
    const BluetoothDevice& device) {
  if (!isCallerActiveUserOrManagedProfile()) {
    LOG(WARNING) << __func__ << ": Not allowed for non-active users";
    return Status::fromExceptionCode(
        Status::EX_SECURITY, String8("Not allowed for non-active users"));
  }

  ENFORCE_PERMISSION(PERMISSION_BLUETOOTH);

  VLOG(1) << __func__;

  socketInterface->request_max_tx_data_length(device.address);
  return Status::ok();
}

}  // namespace bluetooth
}  // namespace android
+2 −0
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@ class BluetoothSocketManagerBinderServer : public BnBluetoothSocketManager {
      std::unique_ptr<::android::os::ParcelFileDescriptor>* _aidl_return)
      override;

  Status requestMaximumTxDataLength(const BluetoothDevice& device);

 private:
  const btsock_interface_t* socketInterface;
  DISALLOW_COPY_AND_ASSIGN(BluetoothSocketManagerBinderServer);