Skip to content
Commit fc384f5a authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

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
parent 133c2347
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment