Skip to content
Commit 18341301 authored by Sungsoo Lim's avatar Sungsoo Lim
Browse files

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
parent e439d721
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment