Patch incoming LinkProperties before it's visible to the outside

Otherwise we risk a race condition when we are fixing the LinkProperties
routes, other parts of ConnectivityService is reading the field at the
same time.

Test: runtest frameworks-net -c com.android.server.ConnectivityServiceTest
Test: runtest frameworks-core -c android.net.LinkPropertiesTest
Bug: 65529483
Bug: 35995111

(cherry picked from commit 68269d233175223f5ac50181987ae9c749f1ea90)

Change-Id: I539578703570a901e0a5dff0155422ca78c52401
1 file changed
tree: 0302561fa589f0593eed49feb8fd339f031034f3
  1. core/
  2. services/
  3. tests/