The MediaControllerImplBase listener invocations currently use the class member state that can change if one of the listener method implementations changes the state recursively. Updating the listener invocations to use a final local variable ensures all listeners get consistent updates. PiperOrigin-RevId: 487503373 (cherry picked from commit 33bea391)