Signal "Connecting" state when receiving audio focus
Problem: The main AAOS Media Center app relies on CarMediaService, who does not listen to the media framework media key event session changed callback to understand which application on the system the media framework would forward key events to. Instead, they have their own set of criteria for determining which application is the currently playing application that should be shown in their UI and have key events routed to it. Key to their method is the presence of an "active" playback state, which can sometimes take a long time for our service to reflect due to the remote device needing to establish playback first. As well, sometimes devices don't establish playback at all due to bugs on their side! This causes Bluetooth not to show up at the playing app in Media Center, which also keeps the user from being able to use controller side media controls to fix the error state. Solution: Briefly indicate we're in the "connecting" state when we gain audio focus. This state is considered "active" by the Media Center's set of conditions and causes us to be shown immediately, placing Media Center's UI in sync with the media framework's view of the world. Flag: 350510879 Bug: 346831665 Bug: 310001181 Test: atest BluetoothMediaBrowserServiceTest Change-Id: If113db4bb3fa780d3c35c9fbe8499d0076d0a143
Loading
Please register or sign in to comment