Skip to content
Commit 484074ae authored by Kyunglyul Hyun's avatar Kyunglyul Hyun
Browse files

MediaRouter: make setControlCategories synchronous

MR2.getRoutes() right after MR2.setControlCategories() will return
routes filtered with new control categories.

In order to call backs properly, mHandledControlCategories is added,
which is changed only in handler.

getRoutes() is also changed such that routes are evaluated lazily
to avoid unnecessary evaluation.

CallbackRecords are implemented in a way that doesn't acquire explicit
lock.

Callbacks are modified so that newly register callbacks no longer
get notified existing routes.

Also, fixed test according to changes of MR2 and MRM.

Bug: 145488462
Test: atest mediaroutertest (5 times)
Change-Id: I9ba3d74bcf423d801249420d947f41eccb37d67a
parent a15562ee
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