audiopolicy: add update uid state after the change of phone mode
The capture data will be silenced during voice call, but it can't
be resumed instantly if setting mode back to normal is later than
restarting input and updating uid state when hanging up voice call
until next time uid state changing.
Add uid state update when phone state is changing.
Bug: 184920496
Test: make
Change-Id: I54276af1ab89821b681250c8c68ef2d21fb45a6f
diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
index 639fa58..551013f 100644
--- a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
+++ b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
@@ -197,6 +197,7 @@
mAudioPolicyManager->setPhoneState(state);
mPhoneState = state;
mPhoneStateOwnerUid = uid;
+ updateUidStates_l();
return Status::ok();
}