AudioService: Focus: cleanup FocusOwner upon requestAudioFocus failure
When the focus is owned by an external audio policy, and when
a client's request fails, the FocusRequester dedicated Map is not
cleared.
As the client app may not call AudioManager#abandonAudioFocus (since
the requestAudioFocus failed), it leads to not only dumpsys side effects but
also it triggers upon client's focus binder died event, the call
of notifyExtFocusPolicyFocusAbandon_syncAf.
This CL fixes this issue by removing the FocusRequester when the request
fails, the same way it is already done on permanent loss of focus.
Test: build & boot
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: I4d1b216b606c8f73c9b68353723284d9e178297d
Loading
Please register or sign in to comment