Media: Remove @MainThread from MediaRouter2
Now it uses mLock to synchronize mCallbackRecords, mControlCategories,
and mClient instead of enforcing main thread.
Also, check concurrency of MediaRouter2 and MediaRouter2Manager.
This CL also removes control category parameter from addCallback(registerCallback)
not to permit two callbacks in an application to have different control categories.
Function names are changed from add/remove callbacks to register/unregister callbacks
to follow the API guideline.
Test: atest mediaroutertest
Change-Id: I40f2bc45f7d108416182b68b4ae23127f8bb2eb4
3 files changed