mirror of
https://github.com/androidx/media.git
synced 2026-03-13 08:20:10 +08:00
This file is copied from https://github.com/android/snippets/blob/main/misc/src/main/java/com/example/snippets/PreloadManagerKotlinSnippets.kt I had to make the following changes to make it compile against the tip of the `main` branch (and these will need to be undone when cherrypicking this change to the `release` branch): 1. Rename `DefaultPreloadManager.PreloadStatus.TRACKS_SELECTED/SOURCE_PREPARED` to `PRELOAD_STATUS_TRACKS_SELECTED/_SOURCE_PREPARED`. 2. Change `getTargetPreloadStatus` to return a non-null `PreloadStatus` and `PRELOAD_STATUS_NOT_PRELOADED` instead of `null`. PiperOrigin-RevId: 797259358