mirror of
https://github.com/androidx/media.git
synced 2025-04-29 22:36:54 +08:00

Pass the temporary CookieHandler as a parameter instead of setting it as a temporary process-default. This avoids a rare race condition, where the player is sending a request with preserveCookies option and runs the `CookieHandler.getDefault()` before a different thread sets a default cookie handler. Over 5 or so lines of code the new default might be reverted to null - this is now fixed. PiperOrigin-RevId: 738052152 (cherry picked from commit d0d76f214a3417ec39f86b1003dd0850a88638d9)