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

Skip to content
Commit 8a86dc70 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[Media TTT] Remove `displayedState` and always use the map instead.

Two bugs around `displayedState`:
1) We weren't correctly re-setting it on timeout.
2) We weren't taking IDs into account when seeing if we could ignore a
   FAR_FROM_RECEIVER.

This CL just removes `displayedState` entirely and uses `stateMap` as
the one source of truth.

Note: All the test cases added actually pass without any changes to
`MediaTttSenderCoordinator` because we had safeguards in other parts of
the code. When I wrote the tests and included assertions about
`displayedState`, then they failed. But, now that `displayedState` is
gone, we can't have those sorts of assertions anymore.

Fixes: 266218672
Test: TRIGGERED -> SUCCEEDED -> {wait for timeout} -> FAR ==> nothing in
the logs about "removal was ignored because transferStatus=SUCCEEDED"
Test: ALMOST for id=1 -> ALMOST for id=2 -> FAR for id=1 ==> chip stays,
state map just has id=2
Test: atest MediaTttSenderCoordinatorTest

Change-Id: I58955fd8c4a60842476102a6c504ca987d93739d
parent 18c1b47f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment