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

Commit 9df170b5 authored by Archie Pusaka's avatar Archie Pusaka Committed by Gerrit Code Review
Browse files

Merge "Floss: enable A2DP profile before enabling AVRCP"

parents 9738f710 dd52c7a0
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1754,9 +1754,14 @@ impl IBluetoothMedia for BluetoothMedia {
        self.hfp = Some(Hfp::new(&self.intf.lock().unwrap()));
        self.hfp.as_mut().unwrap().initialize(hfp_dispatcher);

        for profile in self.delay_enable_profiles.clone() {
        // TODO(b/284811956) A2DP needs to be enabled before AVRCP otherwise AVRCP gets memset'd.
        // Iterate the delay_enable_profiles hashmap directly when this is fixed.
        let profile_order = vec![Profile::A2dpSource, Profile::AvrcpTarget, Profile::Hfp];
        for profile in profile_order {
            if self.delay_enable_profiles.contains(&profile) {
                self.enable_profile(&profile);
            }
        }
        true
    }