Register proxy router after ProxyMediaRouter2Impl has been created

Previously, the registration was done in the constructor, which could
result in a race condition between the assignment of mImpl and a binder
call from system server, causing an NPE in some cases.

Found via ag/25274839 presubmit crash detector.

Bug: 309451111
Test: atest CtsMediaBetterTogetherTestCases
Change-Id: Ifef8e7202cbfe3f961ac802c8f39d757b0b9c645
1 file changed