Add check for null token when updating state
MediaController requires a non-null token as input, which updateState did not check before calling. The token is required to be non-null already for active media, but it can be null for resume players, so it's possible for users to hit a race condition between the notification removal (token set to null) and a final PlaybackState update (attempting to use the token). Also added an annotation to the MediaControllerFactory method so that Kotlin code is aware of this requirement. Fixes: 231733532 Test: atest MediaDataManagerTest Change-Id: Id5e4a52cba74fafa04331a663cd4ce870fe920a2
Loading
Please register or sign in to comment