Fix overactive media routing
For MediaRouterService, - Delay route restoration to BT for 0.5s in case the app plays more audio For AudioPlaybackMonitor, - Rename to AudioPlayerStateMonitor. - Combine two listeners into one. - Take a handler for the looper of the callback methods. - Move the registration of playback callback into audio service from the constructor to the caller. Bug: 65376604 Test: manual tests as follows 1. Checked that the lastly played app receives the media key events although the app's media session doesn't report its playback state. 2. Checked that the lastly played app receives the media key events although the app's media session is released. 3. Confirmed that this mitigates the issue. Change-Id: I52e3719cd962f5d92c2f0e547309ce1314cc0926
Loading
Please register or sign in to comment