add transactional call state verifier
A bugreport came in that demonstrated if a self-managed call does not
call Connection#setOnHold in Connection#hold, a new sim call can drop.
Telecom does not verify call state changes for ConnectionService calls
and it's assumed that self-managed implementations are correct.
However, since the consequence of a bad implmentation results in a
dropped sim call there is now a need to verify call state changes.
This change adds the capability for Telecom to verify callback call
state changes. This specific change verifies that when Telecom requests
a hold, the app hosting the call has 2 seconds to call setOnHold or the
call will be disconnected.
Test: 2 unit tests + 2 manual tests:
Test fail case:
(1) comment out setOnHold() in SelfManagedConnection#onHold()
(2) start a SM call in the Self-Managed Sample APP
(3) set the call active
(4) open the Test InCall UI activity
(5) click the hold button
expect: The call to be disconnected b/c setOnHold is not called
Test pass case:
(1) start a SM call in the Self-Managed Sample APP
(2) set the call active
(3) open the Test InCall UI activity
(4) click the hold button
expect: The call to be held and not disconnected. Also
The underlying transaction to be successful and listener
to be removed.
Fixes: b/267234374
Change-Id: I30908fdce852112bd4ccbe6162bbd541d546e8a6
Loading
Please register or sign in to comment