Don't remove allocated player IDs when an app has a browse service
Currently, calling removeMediaPlayer will remove the wrapped media controller and the player ID associated with that controller. However, it doesn't remove the wrapped browsed client (because its still usable). This leads to null pointer exceptions when someone browses that player because the package name doesn't point to an ID any more. This change is a tactical change to make it so we don't recycle the player IDs of players that we can browse to. Given that the player ID is an integer and we probably wont ever have more browsed players on a phone than we can allocated IDs for, this should be fine for now. Bug: b/150462872 Test: build, flash, interop tests with AVRCP Controller devices, atest Change-Id: I429b831621e188cb8312cc574d1928f0cb3bf3fd Merged-In: I429b831621e188cb8312cc574d1928f0cb3bf3fd
Loading
Please register or sign in to comment