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

Currently acquireSession() fails with an NPE from checkNotNull(exoMediaDrm). A follow-up change will result in exoMediaDrm sometimes being non-null while prepareCount==0 (and in this case we still want acquireSession() to fail). preacquireSession() doesn't currently fail in a way the caller can observe - the same NPE is thrown, but asynchronously and it doesn't propagate out of the background thread. Throwing directly seems preferable since it's a clear bug to be trying to preacquire sessions from an unprepared/released manager. PiperOrigin-RevId: 375906450