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

A previous change added these getters to CacheDataSource, but it can also be useful to retrieve these components directly from the factory. This is useful for tasks where we're going to need to build multiple CacheDataSource instances (e.g., to make requests in parallel), and also need to operate directly on the same components. It's a bit more natural to retrieve them from the factory than from an arbitrary CacheDataSource in this case, since it can avoid unnatural code where you create a CacheDataSource instance earlier than you would otherwise just to use its getters, and/or create one just to use its getters and then throw it away. PiperOrigin-RevId: 308606020