Commit graph

7,533 commits

Message SHA1
Change tetheroffloadjni to tetheringutilsjni
Rename tetheroffloadjni to tetheringutilsjni and move setupRaSocket
jni method from NetUtils into tetheringutilsjni.

Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests
      -Off/On hotspot with ipv6 upstream

Change-Id: Ib68eb6999bbe2d3ca97e68712f22b105311ef800

markchien   authored and   Mark Chien   commited 2020-01-07 07:42:13 +00:00
d53edf736f
Merge "Expose NetworkCapabilities methods to system/public APIs"
Aaron Huang   authored and   Gerrit Code Review   commited 2019-12-27 08:32:50 +00:00
9290dc1179
Expose NetworkCapabilities methods to system/public APIs
Add methods to system/public APIs for mainline support.

Bug: 139268426
Bug: 135998869
Bug: 138306002
Test: atest FrameworksNetTests
      atest NetworkStackTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
      atest FrameworksTelephonyTests
      atest android.net.cts
      atest android.net.wifi.cts
      atest android.telephony.cts

Change-Id: I6ec333309172edaf5aa976f83cfbe63512043594

Aaron Huang   commited 2019-12-27 08:31:06 +00:00
e435d2aeb1
Merge "Remove tlsFingerprints init value"
Wayne Ma   authored and   Gerrit Code Review   commited 2019-12-26 07:13:05 +00:00
2a479ab133
[Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e

markchien   commited 2019-12-19 20:53:06 +08:00
5776f96096
Merge "Add LinkProperties methods to system APIs"
Aaron Huang   authored and   Gerrit Code Review   commited 2019-12-19 08:01:58 +00:00
5966c91e94
Remove tlsFingerprints init value
Initializing the value is no longer necessary because ResolverParamsParcel has
 a default value now

Bug:146100043
Test: FrameworksNetTests pass
Change-Id: Ieb151c0cbb330d25f887cbd2eba9db392699d36e

waynema   commited 2019-12-19 11:39:44 +08:00
c4e888bf64
Merge "Fix parceling of LinkProperties Inet6Addr"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-12-19 03:07:43 +00:00
98460b6863
Fix parceling of LinkProperties Inet6Addr
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

Remi NGUYEN VAN   commited 2019-12-18 19:52:30 +09:00
3a59a925e0
Merge changes from topic "dec13_netrevert"
* 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"

Andrew Chant   authored and   Gerrit Code Review   commited 2019-12-14 07:10:08 +00:00
9ea156af87
Revert "[NS A24] Add an object to represent changes in assignment"
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

Andrew Chant   commited 2019-12-14 03:35:07 +00:00
6b569b2d62
Revert "[NS A25] Send all listen callbacks after all rematches"
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

Andrew Chant   commited 2019-12-14 03:33:51 +00:00
9e299b5f30
Revert "[NS A26] Move available callbacks out of the rematch computation"
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

Andrew Chant   commited 2019-12-14 03:32:41 +00:00
6f9f854916
Revert "[NS A27] Remove useless logs and a useless var"
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

Andrew Chant   commited 2019-12-14 03:31:20 +00:00
06a8edd342
Merge changes I4b793e86,I6f86add0,I2db9535b,I703db6d3
* 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

Chalard Jean   authored and   Gerrit Code Review   commited 2019-12-13 06:50:36 +00:00
ff54f522a6
Merge "Fix a doc"
Chalard Jean   authored and   Gerrit Code Review   commited 2019-12-12 14:15:28 +00:00
dc98e9be4c
Fix a doc
Test: FrameworksNetTests
Change-Id: I5c9aeb627d9f22aa84bc134b6c7d3c15f237a775

Chalard Jean   commited 2019-12-12 13:56:13 +09:00
2e3154435f
[NS A27] Remove useless logs and a useless var
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

Chalard Jean   commited 2019-12-12 13:55:32 +09:00
dbb4dff52e
[NS A26] Move available callbacks out of the rematch computation
Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I6f86add0ccde221c22436ac1995ef6064b3ca69e

Chalard Jean   commited 2019-12-12 13:55:32 +09:00
be083a195f
[NS A25] Send all listen callbacks after all rematches
Bug: 113554781
Test: ConnectivityServiceTests NetworkStackTests
Change-Id: I2db9535b1d72edd46b968b1bae66b148aa815235

Chalard Jean   commited 2019-12-12 13:55:31 +09:00
b56e56916f
[NS A24] Add an object to represent changes in assignment
Test: ConnectivityServiceTest
Change-Id: I703db6d3f039bd67a90fad0eadffc6cfed9a50ee

Chalard Jean   commited 2019-12-12 13:21:43 +09:00
c375dccad3
Make getNetworkSpecifier() public API.
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

Chalard Jean   commited 2019-12-12 13:10:55 +09:00
294ebbbad8
[NS A23.1] Minor cleanup
The argument is always true.

Test: ConnectivityServiceTest
Change-Id: Ibebdae14e63e6baf74db054038ee575ec462f6d5

Chalard Jean   commited 2019-12-10 14:15:15 +09:00
05cbe97f28
[NS A23] Move a synchronized block in a central place
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

Chalard Jean   commited 2019-12-10 14:15:14 +09:00
05edd05f53
[NS A22] Small refactoring
The point of this is to be able to move parts of processListenRequests
independently.

Test: FrameworksNetTests
Change-Id: I6c889b15696123c1120221977b0f36fa3d91de56

Chalard Jean   commited 2019-12-10 14:15:14 +09:00
cd397a2042
[NS A21] More cleanup
Test: FrameworksNetTests NetworkStackTests
Change-Id: I4771f2e9151ff16a7045d9c3025ac686f244b22d

Chalard Jean   commited 2019-12-10 14:15:14 +09:00
1123f5d067
[NS A20] Cleanup
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

Chalard Jean   commited 2019-12-10 14:14:57 +09:00
5c4bddb8cd
Merge "Remove incorrect annotation - @TransportType"
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-12-06 04:50:27 +00:00
ac81b72e22
Remove incorrect annotation - @TransportType
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

lucaslin   commited 2019-12-06 11:17:25 +08:00
387ce1a837
Merge "Expose netId to SystemApi"
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-12-05 02:29:41 +00:00
ed2644bf65
Expose netId to SystemApi
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

markchien   commited 2019-12-04 14:33:51 +08:00
d2751e09d2
Merge "Replace the permission of internal connectivity checks"
Paul Hu   authored and   Gerrit Code Review   commited 2019-12-04 05:59:59 +00:00
032c3c3e30
Replace the permission of internal connectivity checks
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

paulhu   commited 2019-12-04 11:44:45 +08:00
8e96a75543
Merge changes Ie756b9aa,I38110f3a
* changes:
  [NS A19] Inline updateCapabilities in rematch.
  [NS A18] Reverse listens and request-availables

Treehugger Robot   authored and   Gerrit Code Review   commited 2019-12-04 02:07:45 +00:00
e38a525a05
Merge "Merge Android10 QPR1 into AOSP master"
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-12-03 23:15:02 +00:00
20a8c06313
Disable a flaky test
Bug: 145513323
Test: FrameworkNetTests
Change-Id: I66e02fdaab2969b77db4a0f0e6fb8b1a981d9350

Chalard Jean   commited 2019-12-03 16:13:22 +09:00
54ef9299c7
Merge Android10 QPR1 into AOSP master
Bug: 145570283
Change-Id: I557701733b49b0f231c89165239ba07c0fa288d2

Xin Li   commited 2019-12-02 21:25:07 -08:00
4b20d94557
Add LinkProperties methods to system APIs
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

Aaron Huang   commited 2019-12-02 19:29:18 +08:00
8d6ae5d59f
Merge changes I720a1feb,I9539b8cc,Ib79b777b
am: adb58138bd

Change-Id: Ieaa1371f6e52074b76e3353ea9a2653c783ff04e

Chalard Jean   authored and   android-build-merger   commited 2019-12-02 01:51:07 -08:00
f3402da572
[NS A19] Inline updateCapabilities in rematch.
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

Chalard Jean   commited 2019-12-02 18:44:11 +09:00
959c7cd889
[NS A18] Reverse listens and request-availables
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

Chalard Jean   commited 2019-12-02 18:44:10 +09:00
9127f03a5c
Merge changes I720a1feb,I9539b8cc,Ib79b777b
* changes:
  [NS A17] Update linger state after rematching.
  [NS A16] Cleanup
  [NS A15] Move legacy default broadcasts out of the loop

Chalard Jean   authored and   Gerrit Code Review   commited 2019-12-02 09:40:44 +00:00
adb58138bd
Merge changes I0613c23f,Ibeab8d0a,I8bd668ad,I7d3a16be
am: a1a975e149

Change-Id: Ibe34e78e53a15e987042703fdd27d6393e4e7d59

Chalard Jean   authored and   android-build-merger   commited 2019-12-01 21:26:44 -08:00
0d6211b065
Merge changes I0613c23f,Ibeab8d0a,I8bd668ad,I7d3a16be
* 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

Chalard Jean   authored and   Gerrit Code Review   commited 2019-12-02 05:17:39 +00:00
a1a975e149
[NS A17] Update linger state after rematching.
Test: FrameworksNetTests NetworkStackTests
Change-Id: I720a1feb89088aa123201ef5867de444234343e8

Chalard Jean   commited 2019-12-02 13:02:41 +09:00
7807fa2b7f
[NS A16] Cleanup
Move LegacyTypeTracker work into a function for readability.

Test: FrameworksNetTests NetworkStackTests
Change-Id: I9539b8cc4422b3a0cc1d3d9b3a44d59dc1905b44

Chalard Jean   commited 2019-12-02 13:02:41 +09:00
f034453cce
[NS A15] Move legacy default broadcasts out of the loop
Test: FrameworksNetTests NetworkStackTests
Change-Id: Ib79b777b5efda3a4c85c30055f1a6d03d5d04c25

Chalard Jean   commited 2019-12-02 13:02:41 +09:00
b9d9405225
[NS A14] Move code notifying battery stats in its right place
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

Chalard Jean   commited 2019-12-02 13:02:38 +09:00
9589e72241
Merge "Give apps access to the NAT64 prefix."
am: 3391fbb6a2

Change-Id: I673a44f3f75a2395ae3d9d436c83708f20f414e6

Chalard Jean   authored and   android-build-merger   commited 2019-12-01 18:20:00 -08:00
6a96b757df
Merge "Give apps access to the NAT64 prefix."
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-12-02 02:05:16 +00:00
3391fbb6a2