Use MediaBrowserCompat.rootHints as connections hints
In Media3 there is the useful concept of connection hints that a client can set when building the session and that are sent to the service and passed to the `Callback.onConnect()` method when the browser connects. These connection hints are then included in the `ControllerInfo` object that later will be passed to every callback method and the implementor can then take decisions specific to these connection hints. These connection hints are not available in media1. However, when an app creates a `MediaBrowserCompat` object, the constructor takes a rootHint object that is sent to `MediaBrowserServiceCompat.onGetRoot()`. This change uses the browser rootHints as the connection hints when creating the `ControllerInfo` for legacy browsers and makes them available to the `MediaLibrarySession.Callback` domain methods in the same way as connection hints of a Media3 browser. PiperOrigin-RevId: 484220748 (cherry picked from commit 21022c77)
Showing
with
86 additions
and
56 deletions
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment