Remove callback upon MediaSession#release

This change prevents all callbacks from MediaSession after
the app calls MediaSession#release. Concretely, this change
fixes flakiness in MediaControllerTest, where the callback
implementation tries to access the media session after its
corresponding field has been set to null.

Bug: 294178159
Bug: 283873741
Test: atest CtsMediaBetterTogetherTestCases
Change-Id: I112fa5df6aafdb2774ed65c2d08ab1eb680e6b47
(cherry picked from commit 9452bb9fe40d4c4b4354aaae0202cf85f7fe45f1)
Merged-In: I112fa5df6aafdb2774ed65c2d08ab1eb680e6b47
1 file changed