mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

To reliably reject the System UI playback resumption notification on all API levels (specifically API 30), the backward compatibility layer needs to return `null` for the library root. This is not possible in the Media3 implementation. This change allows an app to return a `LibraryResult.ofError(RESULT_ERROR_NOT_SUPPORTED)` that then is translated to return null by the backwards compatibility layer. Issue: androidx/media#355 Issue: androidx/media#167 Issue: androidx/media#27 See https://developer.android.com/guide/topics/media/media-controls#mediabrowserservice_implementation PiperOrigin-RevId: 527276529 (cherry picked from commit 7938978b5165a9cbb63a6ee1fe5209934e996c6e)