NetworkNotificationManager will only get the first transport
type from the NetworkCapabilities of network, and if the device
connects to a VPN and its underlying network is wifi, then the
first finding transport type will be TRANSPORT_WIFI. So, if the
private DNS is broken when device connected to VPN,
NetworkNotificationManager will try to get the SSID for the
title of notification but failed. For this kind of case, the
title of PRIVATE_DNS_BROKEN notification will show
"null has no internet access".
Bug: 143340533
Test: 1. Build pass.
2. Connect to VPN and let private DNS to be broken, check
title of PRIVATE_DNS_BROKEN notification.
3. atest FrameworksNetTests
Change-Id: I1ed018cc8774d4fce4b94854f8e8703a28818463
With Telephony moving to Mainline these constants are not accessible
any more, and should not be made public. As they are only used by
a deprecated method that can only be called by apps with a target
SDK < M and only for one of the features it used to handle, copying
the constants until this method is completely removed is the simplest
way to go.
Test: FrameworksNetTests
Bug: 144454341
Change-Id: Iea18c8d2f2c8a40f04db9383d3f74b917267ba25
Moving IpConfiguration methods to system API
for mainline support.
Public copy constructors of ProxyInfo and add
buildPacProxy(Uri, int) to create a new proxy
properties.
Bug: 139268426
Bug: 135998869
Test: atest android.net.cts
atest android.net.wifi.cts
atest FrameworksNetTests
./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I07bcd2a34a222ea2b3cf0d8b497f051011c41c2c
Reap networks after all networks have been rematched.
Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I195d894e702f1c738ea25596704ea73a3ae55031
This is a regression in performance but it is necessary for
the sake of refactoring ; when the refactoring is over, the
performance will be improved back.
Test: ConnectivityServiceTest
Change-Id: I7069c11193dccb7dce6af65cfb731c0f4ad93629
This is a no-op. Reviewers : please scrutinize this for behavior
changes.
Test: ConnectivityServiceTest
Change-Id: Icc621f0a64a72dae0192843e6b6587ec4e31ea4d
This moves the side effects done by the decision loop when a
network stops satisfying a request to outside the decision loop.
Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I7b7594250d5c04362c699e065d30a1181effed09
This is a preliminary change to move the code that chooses what
network gets assigned to what request out of ConnectivityService.
By storing the list of changes first, it becomes possible to move
the changes with side-effects to a later part of the code, after
the decisions have been made. This move is implemented in a later
change.
Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I60fe318a8eabf13d1c07b144367ca92cf07e734e
The goal of doing this is to remove the locks. Locking imposes
an ordering that is parallel to the program sequence ; often
it is what is needed, but the refactoring in progress needs to
change the traversal order of the requests without having
observable side-effects (or at least, very controlled ones).
The order is difficult enough to maintain when there is
only one. In this case, it is easy to remove the locks, and it
will simplify vastly the complexity of the refactoring by
removing the parallel ordering that would have to be maintained.
Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: Ie4ae6a97053559e6cbac8230f2db3d35000b35a9
This is a preliminary step to removing mNetworkForRequestId, whose
role could be better managed by storing the network inside the NRI.
This serves two purposes :
1. It is a sanity check. Those functions should never be called out
of the handler thread, and if they are it's a bug.
2. It will serve to prove the followup changes are correct.
Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: If29066839ad640121d33f231abdd4f37d0ad3fd5
Let PermissionMonitor#startMonitoring() running in the beginning
of the ConnectivityService#systemReady() before
MultipathPolicyTracker.start(). Since mApps in PermissionMonitor
needs to be populated first to ensure that listening network
request which is sent by MultipathPolicyTracker won't be added
NET_CAPABILITY_FOREGROUND capability.
Bug: 135897744
Test: atest FrameworksNetTests
Change-Id: Ibef8e7b0017a77384630d34c9edc6c40875f773e
a) Ensure the Builder.build() does not crash if setDnsServers() is not
invoked.
b) Add a checkNotNull on setDnsServers() since it is marked @NonNull.
Bug: 144487020
Test: Compiles
Change-Id: I2b9f990efa0583c0f067c25e23d8c944ffbdf6a5
(cherry-picked from d0348339c50eeae0fe137c62476f6a01542f4163)
go/cleanup-greylist-txt
These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.
Bug: 137350495
Test: m
Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
See go/UnsupportedAppUsage for more details.
These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.
Bug: 137350495
Test: m
Change-Id: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
Merged-In: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
It's the first patch for refounding network selection. The new
network selection will try to compare the networks by more
factors, and will try to choose the best network after doing
the evaluation of trade-off.
Create the object that will serve to represent network quality
for more comprehensive ranking.
Bug: 143676287
Test: 1. Build pass.
2. atest FrameworksNetTests
Change-Id: I4b6071d14365aa84d06be9802516fedf527e70f7
As the TestNetworkStack target is updated not to use the complete
NetworkStackManifest to avoid including priv-app permissions and actual
service names, the missing permissions must be added to the
FrameworksNetIntegrationTests manifest.
Add the permissions and attributes that are necessary for the test, and
used to be merged from the TestNetworkStack library manifest.
Test: atest FrameworksNetIntegrationTests
Change-Id: I8b434e67f3a6c9141da71c6dfab1be77aa0f8411
Naming rule for aidl module is changed to make using unstable AIDL module more explicit
So, to use unstable version AIDL module, use "-unstable" suffix version
And also, module name without any suffix means latest frozen version.
But wrt modules for C++ and NDK, module name with latest frozen version
is not available for now.
In b/139280289, more background is explained
Test: m
Bug: 139280289
Change-Id: Ib38e2cb114cc373ef50652f421ddaff9b4fbe5b9
Merged-In: Ib38e2cb114cc373ef50652f421ddaff9b4fbe5b9
TetheringConfiguration is a utility class to encapsulate the various
configuration elements.
Bug: 136040414
Test: -build, flash, boot
-atest TetheringTests
Change-Id: I9434ab213bc5e0fca59f14a6c8cea554abefc3a4
Provide a specifc notification to let users know that device
has no internet is because it really doesn't have internet access
or it's caused by private DNS resolution failed.
Bug: 113242081
Test: atest FrameworksNetTests
Change-Id: I710c88a4742f5fd56c39fc797d7fa3ad36dba553