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

Commit 423dd861 authored by Yun-hao Chung's avatar Yun-hao Chung Committed by Gerrit Code Review
Browse files

Merge "Floss: Empower avrcp to be toggled by admin"

parents b4707b67 50138ed4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -508,7 +508,7 @@ impl Bluetooth {
                self.hh.as_mut().unwrap().activate_hogp(false);
            }

            Profile::A2dpSource | Profile::Hfp => {
            Profile::A2dpSource | Profile::Hfp | Profile::AvrcpTarget => {
                self.bluetooth_media.lock().unwrap().disable_profile(profile);
            }
            // Ignore profiles that we don't connect.
@@ -530,7 +530,7 @@ impl Bluetooth {
                self.hh.as_mut().unwrap().activate_hogp(true);
            }

            Profile::A2dpSource | Profile::Hfp => {
            Profile::A2dpSource | Profile::Hfp | Profile::AvrcpTarget => {
                self.bluetooth_media.lock().unwrap().enable_profile(profile);
            }
            // Ignore profiles that we don't connect.
@@ -548,7 +548,7 @@ impl Bluetooth {

            Profile::Hogp => Some(self.hh.as_ref().unwrap().is_hogp_activated),

            Profile::A2dpSource | Profile::Hfp => {
            Profile::A2dpSource | Profile::Hfp | Profile::AvrcpTarget => {
                self.bluetooth_media.lock().unwrap().is_profile_enabled(profile)
            }
            // Ignore profiles that we don't connect.
+0 −5
Original line number Diff line number Diff line
@@ -1464,11 +1464,6 @@ impl IBluetoothMedia for BluetoothMedia {
        for profile in self.delay_enable_profiles.clone() {
            self.enable_profile(&profile);
        }

        // Default to enable AVRCP since btadapterd will crash when connecting a headset while
        // avrcp is disabled.
        // TODO: fix b/251692015
        self.enable_profile(&Profile::AvrcpTarget);
        true
    }

+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ lazy_static! {
        Profile::A2dpSink,
        Profile::A2dpSource,
        Profile::AvrcpController,
        Profile::AvrcpTarget,
        Profile::Bas,
        Profile::Hsp,
        Profile::Hfp,