Update extra info before registering

The extra info is taken into NetworkMonitor from while creating
it. The NetworkMonitor is created when a new agent is registered
but the extra info is not available at that time. Make sure the
field is set in the NetworkInfo when registering.

Bug: 156173829
Test: adb shell dumpsys network and check the apn in the extra
      info shown correctly
Test: atest FrameworkNetTests
Merged-In: Ieaad8cbf1a28af3b97c7f98f74358e417fcad661
Change-Id: Ieaad8cbf1a28af3b97c7f98f74358e417fcad661
This commit is contained in:
Chiachang Wang
2020-06-05 00:41:42 +00:00
parent edb74fd839
commit d33028c205
3 changed files with 41 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ class NetworkAgentConfigTest {
setPartialConnectivityAcceptable(false)
setUnvalidatedConnectivityAcceptable(true)
}.build()
assertParcelSane(config, 9)
assertParcelSane(config, 10)
}
@Test @IgnoreUpTo(Build.VERSION_CODES.Q)