Commit Graph

7585 Commits

Author SHA1 Message Date
Lorenzo Colitti
baf25cde90 Merge "Expose ConnectivityManager#TYPE_NONE as SystemApi" 2020-01-14 05:30:14 +00:00
paulhu
74357e70a8 Expose ConnectivityManager#TYPE_NONE as SystemApi
Support wifi mainline module usage.

Bug: 135998869
Test: Build and make system-api-stubs-docs-update-current-api
      atest FrameworksNetTests
Change-Id: Ia496aaeaf74fa44764640fd2b97c417509e040aa
2020-01-14 10:02:30 +08:00
Chiachang Wang
254c3d830e Merge "Support reevaluation request from captive portal app" 2020-01-14 01:42:22 +00:00
Junyu Lai
429d86ae3c Merge changes from topic "sp04"
* changes:
  [SP05] add unit test for onStatsProviderLimitReached in NPMS
  [SP04] add unit test for NetworkStatsProvider
  [SP03] support registerNetworkStatsProvider API
  [SP03.1] Replace com.android.internal.util.Preconditions.checkNotNull
2020-01-13 14:09:52 +00:00
junyulai
276921b6e1 [SP04] add unit test for NetworkStatsProvider
Test: atest NetworkStatsServiceTest
Bug: 130855321
Change-Id: I0c19d8bedcb9398da3f464efe01e775fde9f8a78
2020-01-13 14:43:06 +08:00
Chiachang Wang
938bfba0c3 Support reevaluation request from captive portal app
CaptivePortalLogin use similar way to validate the network as
NetworkMonitor. Provide API to reuse NetworkMonitor facilities
for consistent captive portal detection.

Bug: 134892996
Test: atest FrameworksNetTests NetworkStackTests NetworkStackNextTests
Test: manually test with captive portal Wi-Fi
Test: make system-api-stubs-docs-update-current-api \
      test-api-stubs-docs-update-current-api
Change-Id: I6f039eae7ceb18eb6c3cf15587cdc27a7fe35b00
2020-01-13 14:28:02 +08:00
Lorenzo Colitti
a86fae785a Stop using NetworkFactory in connectivity code.
Bug: 138306002
Test: builds, boots
Test: atest FrameworksNetTests
Change-Id: I6b9979f343108c0c077abd86ae1c21e5ece0cccc
2020-01-12 17:40:02 +09:00
Treehugger Robot
0e82d1c50d Merge "Add NetworkCapabilities#deduceRestrictedCapability" 2020-01-10 09:27:31 +00:00
Aaron Huang
617e9bd709 Merge "Expose DhcpInfo parcelable interface implementation methods" 2020-01-10 08:05:24 +00:00
Aaron Huang
434bc5adf4 Merge "Add keepalive related methods and fields to system APIs" 2020-01-10 06:16:04 +00:00
Lorenzo Colitti
3bd0d010bb Merge "Add a NetworkProvider class to the SDK." 2020-01-09 15:09:58 +00:00
Aaron Huang
cf22d1a29f Expose DhcpInfo parcelable interface implementation methods
Parcelable class requires a CREATOR field be exposed.

Bug: 139268426
Bug: 135998869
Test: atest FrameworksNetTests
      atest android.net.cts

Change-Id: I41c68406d09014dda99f337add8c0db0298b0582
2020-01-09 21:33:22 +08:00
Lorenzo Colitti
6702d4b5b2 Add a NetworkProvider class to the SDK.
Bug: 138306002
Test: builds, boots, wifi and telephony work
Test: tested by upcoming change that uses this in NetworkFactory
Change-Id: I2f61bf323215b7c6feff8acc92e7434346751773
2020-01-09 19:50:26 +09:00
paulhu
9c7a0fa46a Add NetworkCapabilities#deduceRestrictedCapability
Support telephony mainline module usage.

Bug: 138306002
Test: atest FrameworksNetTests
      atest CtsNetTestCases --instant

Change-Id: Idbd9c547eff7227085c753461b901c7cdbe396fb
2020-01-09 17:59:46 +08:00
Junyu Lai
c494e23773 Merge "[SP01] Add NetworkStats to system API" 2020-01-09 08:33:24 +00:00
Mark Chien
8124da436a Merge "Replace ConnectivityManager constants to TetheringManager" 2020-01-09 06:32:04 +00:00
junyulai
9b292c2c1f [SP01] Add NetworkStats to system API
In order to let external module report their network stats,
expose necessary APIs to construct NetworkStats object.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Id3ec8aaff3df67948c25eac2319a74cf33a27979
2020-01-09 03:11:22 +00:00
Chiachang Wang
c2441ee239 Expose clearCapabilities for mainline module
Support telephony mainline module usage.

Bug: 138306002
Test: Build and make api-stubs-docs-update-current-api
Change-Id: I6260695b01ec06244d2822f9438a7fae83539ff2
Merged-In: I0a462da4e87cae2c7d4a9b9a92de061a086c5752
2020-01-09 10:25:03 +08:00
Lorenzo Colitti
fd21b50332 Merge "Refactor NetworkFactoryInfo to hide implementation details." 2020-01-09 00:10:47 +00:00
Cody Kesting
33bb594563 Merge "Add API surface for ConnectivityDiagnostics API." 2020-01-08 21:53:14 +00:00
Xin Li
d48bb1d764 Merge "DO NOT MERGE - Merge January 2020 Security Release into master" 2020-01-08 17:39:17 +00:00
markchien
a0f8fd92fd Replace ConnectivityManager constants to TetheringManager
Replace some ConnectivityManager constants as TetheringManager inside
tethering module. No API change, will have follow up CL to delete
@hide tethering constants in ConnectivityManager and replace caller
to using TetheringManager.

Bug: 144753389
Test: build
Change-Id: Ia1b963669722c32d147375763205ed2f3af52fed
2020-01-08 15:06:09 +00:00
Lorenzo Colitti
78185eae90 Refactor NetworkFactoryInfo to hide implementation details.
This is in preparation for introducing NetworkProvider, which
will initially share ConnectivityService code with NetworkFactory.

Bug: 138306002
Test: atest FrameworksNetTests
Change-Id: Ic6f888621f473342ee3fe8fedf9411552111342b
2020-01-08 23:40:42 +09:00
Artur Satayev
9c2add6fcc Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
Merged-In: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
2020-01-08 14:04:40 +00:00
Remi NGUYEN VAN
f4767ccfc0 Merge "Add FrameworksNetIntegrationTests to postsubmit"
am: 9a00f5be3b

Change-Id: I3384970a0a961dfaaf10229ed9e5d39c4f552256
2020-01-07 05:05:45 -08:00
Remi NGUYEN VAN
9a00f5be3b Merge "Add FrameworksNetIntegrationTests to postsubmit" 2020-01-07 12:16:34 +00:00
markchien
d248c13bda Merge "Change tetheroffloadjni to tetheringutilsjni"
am: 0af9d37eca

Change-Id: I48207d95cf6f512ec038fb5dc9ba4009c01d676d
2020-01-07 01:12:30 -08:00
Treehugger Robot
0af9d37eca Merge "Change tetheroffloadjni to tetheringutilsjni" 2020-01-07 09:05:43 +00:00
markchien
d53edf736f 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
2020-01-07 07:42:13 +00:00
Lorenzo Colitti
21dd220d3e Merge changes If28f0be6,If0f80067
am: 96529ad7fc

Change-Id: I108d3c36ce11af544ccfed9291dc38c690724915
2020-01-06 23:03:04 -08:00
Lorenzo Colitti
279a1d6620 Make LinkPropertiesTest pass, and fix an NPE.
aosp/973686 added the DHCP server address to LinkProperties, but
it did not have any tests, and would throw NPE when parceling a
LinkProperties that did not have a DHCP server.

Add tests and fix the bug.

Bug: 134098566
Test: unit test now passes
Change-Id: If28f0be650963e8d9af7eb53f6940824582a2db3
2020-01-07 13:02:32 +09:00
ruibin zhang
ca75bc897d Add the DHCP server address to LinkProperties.
Bug: 134098566
Test: see subsequent CL in topic
Change-Id: If0f80067934189137c87cd379e7ae47b187562fd
2020-01-07 01:21:07 +09:00
Remi NGUYEN VAN
0b197df422 Add FrameworksNetIntegrationTests to postsubmit
After checking flake metrics for this test, it can be added in
presubmit.

Test: this change is to check results in postsubmit
Change-Id: I70cb149629a3e959e29cfd21048e7b148bd29fe9
2020-01-06 22:03:43 +09:00
Paul Hu
5263193189 Merge "Add permissions for FrameworksNetIntegrationTests"
am: eb1eac5931

Change-Id: I27ecd6182ff3794098b6486cb48736df7a849b0e
2020-01-05 21:07:51 -08:00
paulhu
6c3b3a494f Add permissions for FrameworksNetIntegrationTests
The protected permissions were changed in some connectivity APIs
since aosp/1099096. Add required permissions for
FrameworksNetIntegrationTests.

Bug: 147121740
Test: atest FrameworksNetIntegrationTests
Change-Id: I38ba5c8e93fd5bc94371b2a02a280f503f2e1367
2020-01-06 09:30:03 +08:00
Cody Kesting
457a1ad289 Add API surface for ConnectivityDiagnostics API.
ConnectivityDiagnostics API will be used to provide callbacks to
permissioned applications for notifications on network connectivity
events.

Bug: 143187964
Test: compiles
Change-Id: Ib3c0b93f534a9c540e577891aa8aa0a2ad6de71f
2020-01-02 10:51:17 -08:00
Aaron Huang
5d77a84faf Merge "Expose NetworkCapabilities methods to system/public APIs"
am: 9290dc1179

Change-Id: Icb3d0559475a14130dea64a5ca49a6259d5a2eb9
2019-12-27 00:38:46 -08:00
Aaron Huang
9290dc1179 Merge "Expose NetworkCapabilities methods to system/public APIs" 2019-12-27 08:32:50 +00:00
Aaron Huang
e435d2aeb1 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
2019-12-27 08:31:06 +00:00
Wayne Ma
28112be9d7 Merge "Remove tlsFingerprints init value"
am: 2a479ab133

Change-Id: Ib29fe2d356c6faab809d95233f0b9771a6053191
2019-12-25 23:15:59 -08:00
Wayne Ma
2a479ab133 Merge "Remove tlsFingerprints init value" 2019-12-26 07:13:05 +00:00
Mark Chien
fc8e151780 Merge "[Tether13] Move TetheringManager into framework"
am: 2410d67357

Change-Id: I05c79a1cf07e7679ea2a2c9221e541fb1c9a5a23
2019-12-20 05:47:01 -08:00
markchien
5776f96096 [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
2019-12-19 20:53:06 +08:00
Aaron Huang
2b7e2960e3 Merge "Add LinkProperties methods to system APIs"
am: 5966c91e94

Change-Id: Ib6cc8dff09ed97bdcf8504f8318461e742c34f7a
2019-12-19 00:06:31 -08:00
Aaron Huang
5966c91e94 Merge "Add LinkProperties methods to system APIs" 2019-12-19 08:01:58 +00:00
waynema
c4e888bf64 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
2019-12-19 11:39:44 +08:00
Remi NGUYEN VAN
d33931f634 Merge "Fix parceling of LinkProperties Inet6Addr"
am: 98460b6863

Change-Id: I7e4de0ecf06d34f050a881250755c8c0456269fc
2019-12-18 19:12:04 -08:00
Remi NGUYEN VAN
98460b6863 Merge "Fix parceling of LinkProperties Inet6Addr" 2019-12-19 03:07:43 +00:00
Remi NGUYEN VAN
3a59a925e0 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
2019-12-18 19:52:30 +09:00
Aaron Huang
441e499861 Add keepalive related methods and fields to system APIs
Add KeepalivePacketData to system API for mainline support.
Also, remove InvalidPacketException class from SocketKeepalive
and create a new InvalidPacketException class in android.net

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: I2d982e8abb5cb6b4c74a20483550b18cf814320d
Merged-In: I2d982e8abb5cb6b4c74a20483550b18cf814320d
2019-12-17 16:21:19 +00:00