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

Skip to content
Commit 17018dd7 authored by Yiyi Shen's avatar Yiyi Shen
Browse files

Avoid AudioManager#getMode in isFilterMatched

AudioManager#getMode is a slow binder call which should not be called on
UI thread. isFilterMatched will be frequently triggered on UI thread when updating the
Connected devices page.

Cache and update the audio mode when receive onModeChanged callback in
this change. For long term, we should better separate the UI/background
thread tasks in those classes. Also send request to Audio team to
improve the API latency.

Flag: EXEMPT small fix
Bug: 380993178
Test: atest
Change-Id: I054f3fa62f0fdf03b9a436a532ac1fb4738aaf58
parent 0ca6d534
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment