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

The methods in ExoPlayerImpl and MediaControllerImplBase that determine the new PlayerInfo/PlaybackInfo currently have a hard-to-reason-about setup where the method generating the new info accesses other methods that rely on the existing class field instead of working with the passed in PlayerInfo/PlaybackInfo. This prevents reuse of the util methods (e.g. for replaceMediaItems) because they access potentially stale state. This change untangles these methods a bit by making the util methods either static or at least ensure that they don't rely on existing class fields of PlayerInfo/PlaybackInfo. Overall, the change is a complete no-op. #minor-release PiperOrigin-RevId: 534036633 (cherry picked from commit 1fa790348e7e90c987d3385a79a2c7c150cd6824)