OSDN Git Service

Tell the factory it is already serving a request.
authorChalard Jean <jchalard@google.com>
Wed, 2 May 2018 12:14:54 +0000 (21:14 +0900)
committerChalard Jean <jchalard@google.com>
Tue, 12 Mar 2019 12:47:21 +0000 (21:47 +0900)
commit05ab6811d067987958b95b6361ba6e080b5294f9
tree6836b9695cb5dbae13c8595d9739e4a8d6527209
parenteb3e7b3f64d2587fa22d2954ff6ab80d11f1de98
Tell the factory it is already serving a request.

This is a cherry-pick of ag/607226 that has been rebased on
top of four years of changes and with comments addressed.

Gives each factory a serial number and propagates it to every
NetworkAgent so when a score comes back indicating a request is
being handled the factory can account for it properly.

Without this, a new request that's already handled by a network
offered by a factory will not cause an increment of the factorys
ref count. Concretely this results in issues like the RAT icon
not being displayed in spite of the network actually being up
and usable.

This will be ported to AOSP as soon as possible, but immediately
some master-only WiFi tests need to be adjusted with this change
which would not let me submit to AOSP.

Bug: 18637384
Bug: 29030667
Test: manual
Test: atest frameworks/opt/telephony/tests/telephonytests
Test: atest frameworks-net
Test: atest CtsNetTestCases CtsHostsideNetworkTests
Change-Id: I597ac588f76dd507512ff02868fd1310b7e63f7e
Merged-In: I597ac588f76dd507512ff02868fd1310b7e63f7e
core/java/android/net/ConnectivityManager.java
core/java/android/net/IConnectivityManager.aidl
core/java/android/net/NetworkAgent.java
core/java/android/net/NetworkFactory.java
services/core/java/com/android/server/ConnectivityService.java
services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
services/core/java/com/android/server/connectivity/Vpn.java
tests/net/java/com/android/server/ConnectivityServiceTest.java
tests/net/java/com/android/server/connectivity/LingerMonitorTest.java