IPv6 addresses parceled for DNS servers, private DNS servers, PCSCF
servers were parceled without the scope. This causes issues with
link-local DNS servers.
Test: atest FrameworksNetTests
Bug: 145181158
Change-Id: I0ed24e51d4d0656f4a1f932b5e9f646b35b4b971
* changes:
Revert "[NS A24] Add an object to represent changes in assignment"
Revert "[NS A25] Send all listen callbacks after all rematches"
Revert "[NS A26] Move available callbacks out of the rematch computation"
Revert "[NS A27] Remove useless logs and a useless var"
This reverts commit c375dccad3.
Reason for revert: Toggling wifi on/off causes networking to
stop working with these four patches applied.
Bug: 146230156
Change-Id: Ie0217796c89abf0dc86e6a4f8324811155dc57cd
This reverts commit b56e56916f.
Reason for revert: Toggling wifi on/off causes networking to
stop working with these four patches applied.
Bug: 146230156
Change-Id: Icd368df5ef76991dd2b4c1fa530cbc5fae2f61fa
This reverts commit be083a195f.
Reason for revert: Toggling wifi on/off causes networking to
stop working with these four patches applied.
Bug: 146230156
Change-Id: I9af7f8b9af1a6279f2b9f1249824da705164c6b5
This reverts commit dbb4dff52e.
Reason for revert: Toggling wifi on/off causes networking to
stop working with these four patches applied.
Bug: 146230156
Change-Id: I6c75ac179bcc08cc5979194eea69525b333e2ba7
* changes:
[NS A27] Remove useless logs and a useless var
[NS A26] Move available callbacks out of the rematch computation
[NS A25] Send all listen callbacks after all rematches
[NS A24] Add an object to represent changes in assignment
These logs haven't found a bug in a long time and we now have
some structural guarantees that the conditions they check for
can't happen (like the checks that everything is happening on
the same thread).
Maybe we'll reinstate similar checks later, but for now they
are in the way and removing them is a small sacrifice for the
intended benefit.
The local was simply not used any more.
Test: FrameworksNetTests
Change-Id: I4b793e86039c204a038c1b0fecbf8a4927eef48d
The builder lets clients set it, and this may be useful for
unit tests of apps. It should be public.
The need arises from uses of this in WiFi and Telephony
network factories.
Test: build
Bug: 135998869
Change-Id: I57279cac139c28e8654d2066ba0c60edd1e6cd98
As the calls to this apparently need to be synchronized, let's
do it all in the same place instead of in all callers
Test: FrameworksNetTests
Change-Id: I0c097e7756fc155ba0243834b84626e86c68340e
The point of this is to be able to move parts of processListenRequests
independently.
Test: FrameworksNetTests
Change-Id: I6c889b15696123c1120221977b0f36fa3d91de56
A lot of this code can't be triggered at all.
• newNetwork.created in l.6488 is implied by newNetwork.everConnected
in l.6357
• !newNetwork.isVPN() in l.6488 is implied by the fact that VPNs are
always foreground, so oldPermission can't != newPermission in l.6488
• updateUids in l.6502 is useless because uids can't change during a
rematch (because there is no code doing that). Metered state and
roaming state similarly can't change during a rematch, so
meteredChanged and roamingChanged are always false
• updateAllVpnCapabilities in l.6537 is useless because VPN do not
inherit the foreground state of their underlying networks, which
would be the only reason to call that in l.6537
• Object.equals() in l.6480 is necessary false because at this line
it is known that the foreground state has changed, which must have
caused the NET_CAPABILITY_FOREGROUND to be different, so the objects
can't be equal
Test: FrameworksNetTests NetworkStackTest
Change-Id: I2a52f7f4a085f3eea22a1dd170af8f04671250ff
This annotation is mis-adding by aosp/929879, and now it also
makes compilation failure for Telephony Mainline.
Bug: 145755373
Test: atest FrameworksNetTests
Change-Id: Ic22ce6bf17c4300b8cd52217976bfb215a123f68
Tethering will be build as unblundled APP. It can't use @hide
API anymore. Expose netId for tethering because it need to set
proxy dns server with netId.
Bug: 144758139
Test: build
Change-Id: Ifefa791940874617bb479f5c23488d14be87f45e
A number of connectivity checks that protect system-only methods
check for CONNECTIVITY_INTERNAL, but CONNECTIVITY_INTERNAL is a
signature|privileged permission. We should audit the permission
checks, and convert checks that protect code that should not be
called outside the system to a signature permission. So replace
all CONNECTIVITY_INTERNAL to other proper permissions.
Bug: 32963470
Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Change-Id: I8f2dd1cd0609056494eaf612d39820e273ae093f
Merged-In: I8f2dd1cd0609056494eaf612d39820e273ae093f
The exposed methods are used by telephony, wifi
and tethering. For mainline support, making the
methods @SystemApi.
Bug: 139268426
Bug: 135998869
Bug: 138306002
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksTelephonyTests
./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
atest android.net.cts
atest android.net.wifi.cts
atest android.telephony.cts
Change-Id: Ib16a838cf9f748e1c5b045d6c2f17678f16af28c
This is ugly, but it's a necessary step to improve the code.
Followups will clean this up. Importantly this kind of inlining
will let us break the very confusing apparent loop between
updateCapabilities and rematch.
Test: FrameworksNetTests
Change-Id: Ie756b9aa8066984264717f0b1e1f31606432f1a4
This is a long standing bug that happens to now be trivial
to fix, and also be beneficial for refactoring
Test: FrameworksNetTests NetworkStackTests
Change-Id: I38110f3a4a75936ea755788e7f9fee67863e14be
* changes:
[NS A14] Move code notifying battery stats in its right place
[NS A13] Move legacy broadcast handling after rematch.
[NS A12] Move some legacy type tracker handling to a function
Add tests for ConnectivityService → BatteryStats messages
Move LegacyTypeTracker work into a function for readability.
Test: FrameworksNetTests NetworkStackTests
Change-Id: I9539b8cc4422b3a0cc1d3d9b3a44d59dc1905b44
This should be done once every time an interface comes online.
Doing this in updateLinkProperties guarantees this happens every
time a new interface comes online, but it doesn't do it more
often than needed.
Test: FrameworksNetTests NetworkStackTests
Change-Id: I0613c23f44192944266d76107308da8d1c541d1c
* changes:
[Tether10]Remove UserManagerInternal usage in Tethering
[Tether07] Migrate Tethering into module
[Tether07] Clean up build rule for libtetheroffloadjni
Apps that do their own DNS queries need to know the NAT64 prefix
to resolve v4 addresses on v6-only networks.
Test: FrameworksNetTests NetworkStackTests
Bug: 144877069
Change-Id: I5a255b7afc2038646b93a0ab893f8ad62d0fb34f
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.
Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
-atest TetheringTests
-atest FrameworksNetTests
Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
As opposed to other patches in this series, there is a logic change
here. This will send all necessary legacy broadcasts after all
matches have been done.
This should be fine because the callbacks and the broadcasts are
unordered anyway, and the broadcasts are still sent in the same
order as before ; there should not be an observable change from
apps besides some jitter.
Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: Ibeab8d0a9106c5198228888ac33084238c0a4a1a