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

Commit 733ee01c authored by WhaleChang's avatar WhaleChang
Browse files

Floss: Remove unnecessary check in HFP Hangup callback

The should_insert_call_when_sco_start check was introduced to prevent
accidentally remove calls created by CRAS during SCO start. This was
necessary before aosp/3058085, when HFP hangup callback could change the
call state in the headset.

Since aosp/3058085, HFP callback no longer modify the call state.
Therefore, the should_insert_call_when_sco_start check is now redundant
and can be removed.

Bug: 331875859
Test: Conduct the following manual tests
  pair Bluetooth Headset
  Google Meet: headset is able hang-up the call
Test: Conduct the following manual tests
  pair Bluetooth Headset
  login Ring Central and place an incoming-call
  answer the call by headset
  hangup the call by headset
Test: Conduct the following manual tests
  pair Bluetooth Headset
  login Ring Central and place an incoming-call
  answer the call on Ring Central
  hangup the call from headset
Test: atest bluetooth_test_gd
Tag: #floss
Flag: EXEMPT, no behavior change on Android; Floss-only changes
Change-Id: I077c6f275274d2c0a378bf5f9812ffeeb31bc17e
parent ea17fc41
Loading
Loading
Loading
Loading
+0 −9
Original line number Original line Diff line number Diff line
@@ -1024,15 +1024,6 @@ impl BluetoothMedia {
                    warn!("Unexpected hangup call. phone_ops_enabled and mps_qualification_enabled does not enabled.");
                    warn!("Unexpected hangup call. phone_ops_enabled and mps_qualification_enabled does not enabled.");
                    return;
                    return;
                }
                }
                if self.should_insert_call_when_sco_start(addr) {
                    // The devices requiring a +CIEV event are not managed through the telephony commands.
                    // This allows to prevent to stop the SCO link as there is no command to set it up again.
                    debug!(
                        "[{}]: AT+CHUP skipped due to interop workaround",
                        DisplayAddress(&addr)
                    );
                    return;
                }
                if self.mps_qualification_enabled {
                if self.mps_qualification_enabled {
                    // In qualification mode we expect no application to interact with.
                    // In qualification mode we expect no application to interact with.
                    // So we just jump right in to the telephony ops implementation.
                    // So we just jump right in to the telephony ops implementation.