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

Skip to content
Commit 745e28cb authored by Jaewan Kim's avatar Jaewan Kim
Browse files

Don't ignore remote media sessions when sending media key events

According to our new media button handling logic, we don't prioritize
media session for the remote playback. (i.e. Casting) It's because users
will expect change in headset/earphone where the media buttons are
attached.

However, when a Bluetooth device is connected, media sessions in an app
built with the support library older than 25.4 is considered as remote
playback by MediaRouter.setMediaSessionCompat(MediaSessionCompat). So we
shouldn't exclude remote media sessions when sending media key.

This change will still keep our policy because app with the actual
remote playback wouldn't report AudioPlaybackConfiguration, and it will
be ignored anyway.

Bug: 38191402
Test: Run CTS (MediaSessionTest, and MediaSessionManagerTest) and
    manual tests as follows
    1. Confirmed that apps built with older support library can receive
       receive the media key events when a Bluetooth headset/earphone
       is connected).
    2. Confirmed that apps with remote playback (i.e. cast) doesn't
       receive media key events neither by Bluetooth nor wired headset.

Change-Id: I8e2e0babc43460aa497b5edc5e4fb98f986783cf
parent cc416b6c
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