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

Commit 995fef3d authored by Archie Pusaka's avatar Archie Pusaka Committed by Automerger Merge Worker
Browse files

Merge "Floss: enable A2DP profile before enabling AVRCP" am: 9df170b5

parents a3ca68af 9df170b5
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
    }