Add synchronized lock when set call state ANSWERED
Root cause:
When user answer an incoming call, call state will be changed from
RINGING to ANSWERED, then changed from ANSWERED to ACTIVE.
CallsManager set call state ANSWERED and ACTIVE in different threads.
If CallsManager set the call state ANSWERED and ACTIVE quickly,
sometimes start to set state ACTIVE when setting ANSWERED is running,
This can lead to confusion in the state of the call,
state ACTIVE maybe not set successfully.
solution:
Add synchronized lock when set call state ANSWERED, this ensures that
setting ANSWERED succeeds first, and then start to set ACTIVE.
Bug: 136984649
Test: ran the CTS telecom test 100 times and it passed 100 times.
Change-Id: I953f269086e0f9370bf834284f7504d78323a1d6
1 file changed