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

Commit 20f4ec0e authored by Hsin-chen Chuang's avatar Hsin-chen Chuang Committed by Automerger Merge Worker
Browse files

Merge "floss: Add software rotation advertising feature for legacy controller"...

Merge "floss: Add software rotation advertising feature for legacy controller" into main am: c1888102

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2974411



Change-Id: Ib87b8803810e84d29b20b30a43f5fe9a515846e9
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 33c1125c c1888102
Loading
Loading
Loading
Loading
+719 −22

File changed.

Preview size limit exceeded, changes collapsed.

+6 −2
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@ use bt_utils::array_utils;
use crate::async_helper::{AsyncHelper, CallbackSender};
use crate::bluetooth::{Bluetooth, BluetoothDevice};
use crate::bluetooth_adv::{
    AdvertiseData, AdvertiseManager, AdvertisingSetParameters, BtifGattAdvCallbacks,
    IAdvertisingSetCallback, PeriodicAdvertisingParameters,
    AdvertiseData, AdvertiseManager, AdvertiserActions, AdvertisingSetParameters,
    BtifGattAdvCallbacks, IAdvertisingSetCallback, PeriodicAdvertisingParameters,
};
use crate::callbacks::Callbacks;
use crate::uuid::UuidHelper;
@@ -1881,6 +1881,10 @@ impl BluetoothGatt {
            }
        }
    }

    pub fn handle_adv_action(&mut self, action: AdvertiserActions) {
        self.adv_manager.get_impl().handle_action(action);
    }
}

#[derive(Debug, FromPrimitive, ToPrimitive)]
+6 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ use crate::bluetooth::{
    BluetoothDevice, DelayedActions, IBluetooth,
};
use crate::bluetooth_admin::{BluetoothAdmin, IBluetoothAdmin};
use crate::bluetooth_adv::dispatch_le_adv_callbacks;
use crate::bluetooth_adv::{dispatch_le_adv_callbacks, AdvertiserActions};
use crate::bluetooth_gatt::{
    dispatch_gatt_client_callbacks, dispatch_gatt_server_callbacks, dispatch_le_scanner_callbacks,
    dispatch_le_scanner_inband_callbacks, BluetoothGatt, GattActions,
@@ -116,6 +116,7 @@ pub enum Message {

    // Advertising related
    AdvertiserCallbackDisconnected(u32),
    AdvertiserActions(AdvertiserActions),

    SocketManagerActions(SocketActions),
    SocketManagerCallbackDisconnected(u32),
@@ -367,6 +368,10 @@ impl Stack {
                    bluetooth_gatt.lock().unwrap().remove_adv_callback(id);
                }

                Message::AdvertiserActions(action) => {
                    bluetooth_gatt.lock().unwrap().handle_adv_action(action);
                }

                Message::SocketManagerActions(action) => {
                    bluetooth_socketmgr.lock().unwrap().handle_actions(action);
                }