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
1 file changed