[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
Loading
Please register or sign in to comment