Commit Graph

4185 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
5f72ccdb4e Merge "Add documentation for CaptivePortal APP_RETURN_*" am: 31e3f2e734 am: 72841b4287
am: 73a4b8e463

Change-Id: I2fce43bf23ac9689f69bc2c432b3032cc9abb7d9
2019-03-19 23:13:15 -07:00
Remi NGUYEN VAN
31e3f2e734 Merge "Add documentation for CaptivePortal APP_RETURN_*" 2019-03-20 05:40:41 +00:00
Remi NGUYEN VAN
c3f661ffdb Merge "Add Parcelable implementation for ApfCapabilities" am: cea27f4327 am: 39e5f3feaf
am: 61ac53a0fc

Change-Id: I4d878b8dc0928aca47f944050becaa4d5206e336
2019-03-19 18:09:23 -07:00
Remi NGUYEN VAN
cea27f4327 Merge "Add Parcelable implementation for ApfCapabilities" 2019-03-20 00:34:53 +00:00
Varun Anand
166e9e4b57 Merge "Add unit tests related to data accounting for VPNs with one underlying network." am: 289759e0d2 am: 7baa232824
am: 4587994398

Change-Id: I80e3ebb556ac0b6bff5d232b881f7d869cb74f00
2019-03-19 09:47:04 -07:00
Treehugger Robot
289759e0d2 Merge "Add unit tests related to data accounting for VPNs with one underlying network." 2019-03-19 16:18:28 +00:00
Lorenzo Colitti
27e59c575c Move TcpKeepalivePacketData out of the framework.
This class is not used in framework.jar, only in services.jar.
Move it out of the framework so framework.jar can stop depending
on the NetworkStack stable AIDL interfaces.

This should really under com.android.server as well, but that's
a cross-project change to be done in another CL.

Test: m
Bug: 128804404
Change-Id: Ib2805f7fcc516a5f6989c252365d1c95b8042703
2019-03-20 00:49:33 +09:00
Lorenzo Colitti
cc7f1db970 Stop using netd parcelables in the framework.
The only actual users of these classes are in services.jar, not
in frameworks.jar. The only reason the framework depends on them
is that the code that converts to and from stable parcelables is
currently in the framework. Move that code to services and cut
the dependency.

These classes aren't used in the networkstack app so they don't
need to be in shared. They also can't be in shared because the
classes are not in the SDK. So put the conversion functions
directly inside their only user (NetworkManagementService).

Also remove the jarjar rules that rename the classes for use by
the NetworkStack app.

This does not actually remove the dependency from the build file,
that will be done in a future CL.

Bug: 128804404
Test: builds, boots
Test: atest FrameworksNetTests android.net.cts.ConnectivityManagerTest HostsideVpnTests
Change-Id: I027d50ba56091f5558f45e6e08f32e5912b2a82a
2019-03-20 00:49:32 +09:00
Xiao Ma
2ce206c82d Merge "Move the IpMemoryStore to the network stack." am: 93bf5ef495 am: 5db1518bfa
am: 3176d57308

Change-Id: I243056012d2f099d96a33657c0eb63a5b66a2cfe
2019-03-19 06:54:43 -07:00
Xiao Ma
93bf5ef495 Merge "Move the IpMemoryStore to the network stack." 2019-03-19 13:21:12 +00:00
Remi NGUYEN VAN
e501d2ab23 Add documentation for CaptivePortal APP_RETURN_*
This fixes API review requests.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 126883311
Change-Id: I0632a98675e65c5e722e81a2c1e0cf1403b54395
2019-03-19 18:57:44 +09:00
Remi NGUYEN VAN
2eddac418e Merge "Fix API for SocketUtils" am: 4a66729cfe am: 55d7bc0106
am: e35cba5262

Change-Id: I91b741adfade7a8d3271ffa8792e290ad07a2f00
2019-03-19 01:39:37 -07:00
Remi NGUYEN VAN
4a66729cfe Merge "Fix API for SocketUtils" 2019-03-19 08:08:50 +00:00
Luke Huang
65090523ce Merge "Replace Handler with Executor for async DNS API" am: 2656b3d4cc am: 7d249575a1
am: e640b70ee8

Change-Id: Ia2305094fe66017fbdfdc18b2c7284452ac90036
2019-03-18 23:40:49 -07:00
Luke Huang
f004c56618 Merge "Refactor answer callback for async DNS query JAVA API" am: f1d0fd2642 am: 9a4c839725
am: 6e2648a7bc

Change-Id: Id4d0ae87b1ac8618c28da666619c5c5b5bd2d722
2019-03-18 23:24:06 -07:00
Luke Huang
2656b3d4cc Merge "Replace Handler with Executor for async DNS API" 2019-03-19 05:35:39 +00:00
Luke Huang
f1d0fd2642 Merge "Refactor answer callback for async DNS query JAVA API" 2019-03-19 05:35:18 +00:00
Mark Chien
58f6df7123 Merge "Remove deprecated entitlement API" am: 36459170a7 am: 6f86953a39
am: d9fbd454de

Change-Id: I6bb5611de8d45e9a5c17128ea38ba1bdd8f86ac2
2019-03-18 20:38:36 -07:00
Lorenzo Colitti
03f50c1aa5 Merge "Address API review comments for VPN changes." am: bbfee2b427 am: 071c17e277
am: ea7b1b7bb9

Change-Id: I0cc600177432f11c7d7dab39478336ed9b7409d7
2019-03-18 20:23:30 -07:00
Mark Chien
36459170a7 Merge "Remove deprecated entitlement API" 2019-03-19 02:44:37 +00:00
Pavel Grafov
50d17cfa07 Address API review comments for VPN changes.
Whitelist is now a Set rather than a list + javadoc improvement.

Bug: 124882903
Bug: 125346147
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpn
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpnAcrossReboot
Change-Id: Ieecaad083f2ab55de33587e6ce767f5f961683c9
2019-03-18 17:05:55 +00:00
Remi NGUYEN VAN
5156902853 Fix API for SocketUtils
Addresses API review comments:
 - @NonNull on return values
 - short -> int for makePacketSocketAddress
 - Set class final while we're at it

Bug: 126700257
Test: m
Change-Id: I3b1775feee22b1e337b3e4e7a2ad16b28e305b67
2019-03-18 12:41:49 +09:00
Chalard Jean
952135122d Move the IpMemoryStore to the network stack.
Test: atest FrameworksNetTests
Change-Id: Ic5bd6ff54b09a6fa92b6863f240a5b053011acb6
2019-03-18 11:33:17 +09:00
Remi NGUYEN VAN
a47b222a5f Merge "Remove NetworkParcelable" am: 205886d28f am: 7201f61c57
am: 13be9e9fcd

Change-Id: Ifec0dd683bf9c9b73c4af12835b76d284559daf8
2019-03-17 19:12:02 -07:00
Remi NGUYEN VAN
462e944ff9 Merge "Remove aidl wrappers for framework parcelables" am: 1a1396070e am: 7cf43a2f53
am: 5fd40295cb

Change-Id: I019fbbfd5dde5268cbb38bdaee1bc50a434372bc
2019-03-17 18:59:43 -07:00
Remi NGUYEN VAN
205886d28f Merge "Remove NetworkParcelable" 2019-03-18 01:30:25 +00:00
Remi NGUYEN VAN
1a1396070e Merge "Remove aidl wrappers for framework parcelables" 2019-03-18 01:30:01 +00:00
Luke Huang
e4c7913f62 Replace Handler with Executor for async DNS API
Bug: 124882626
Test: built, flashed, booted
      atest DnsResolverTest DnsPacketTest

Change-Id: Ie1dc27643d4767f2a8a39da755edf388a00962d5
2019-03-16 18:53:07 +08:00
Luke Huang
304491dba8 Refactor answer callback for async DNS query JAVA API
1. refactor AnswerCallback with a generic type
2. support onError in AnswerCallback
3. Fix minor problem reported from API Review

Bug: 124882626
Test: built, flashed, booted
      atest DnsResolverTest DnsPacketTest

Change-Id: I685c9989f8401acb63d2e83f552b2d5b20c41af0
2019-03-16 18:53:05 +08:00
Varun Anand
472b9262c1 Add unit tests related to data accounting for VPNs with one underlying
network.

This is to establish a baseline for the existing behavior, and to ensure
that following changes are not causing a regression in existing
behavior.

This CL is also adding missing cleanup for NetworkStatsCollectionTest
which was forcing all network types in NetworkTemplate that was causing
NetworkStatsService related tests to fail.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Change-Id: I285f186cfb16bc9fa704c797996b1e4f8a73dee4
2019-03-15 17:23:28 -07:00
Remi NGUYEN VAN
904a38be5e Remove NetworkParcelable
With the @JavaOnlyStableParcelable annotation, Network can now be used
as-is as a framework parcelable.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 126477266
Change-Id: I5d9695a31b3ac48d10edcf08ccd0c34375353b79
2019-03-16 03:51:09 +09:00
Remi NGUYEN VAN
e80be85790 Remove aidl wrappers for framework parcelables
The new @JavaOnlyStableParcelable annotation allows using the framework
parcelables directly, which removes a lot of boilerplate.

Includes new copy constructors for IpPrefix and LinkAddress so they can
be copied easily as-is into parcelables.

Test: atest FrameworksNetTests
Test: booted, WiFi works
Bug: 126477266

Change-Id: Icac8afe498d0b5ebf9a0d0b9eceb14d64a29b381
2019-03-16 03:50:58 +09:00
Benedict Wong
b86c3255fd Merge "Integrate testNetworkService and Manager with Connectivity stack" 2019-03-15 17:41:02 +00:00
markchien
846e49943d Remove deprecated entitlement API
The deprecated entitlement APIs[1] is introduced in the Q
development cycle. It should be replaced by new APIs[2][3].

[1] https://android-review.googlesource.com/c/platform/frameworks/base/+/874220
[2] https://android-review.googlesource.com/c/platform/frameworks/base/+/920354
[3] https://android-review.googlesource.com/c/platform/frameworks/base/+/927513

Test: -build, flash, boot
bug: 126701557
bug: 126392011
Change-Id: I96487e9038c07363680a76db840994719d7ff768
2019-03-15 09:03:50 +00:00
Junyu Lai
235f8d3b05 Merge "[KA02.5] Use binder thread and executor to invoke callback" am: f9ae70a41c am: 1ed9d716fc
am: d3b8a5c332

Change-Id: I881c1ab09187ab23facc03bb71cc38a7978e442c
2019-03-15 01:19:55 -07:00
Junyu Lai
f9ae70a41c Merge "[KA02.5] Use binder thread and executor to invoke callback" 2019-03-15 07:35:27 +00:00
Remi NGUYEN VAN
3ac239292c Add Parcelable implementation for ApfCapabilities
This is necessary to allow usage of ApfCapabilities as-is in AIDL,
instead of relying on ApfCapabilitiesParcelable, assuming that stable
AIDL starts allowing usage of @SystemApi classes. The Parcelable
implementation would be convenient for clients in any case.

Bug: 126477266
Test: atest FrameworksNetTests
Change-Id: Id2ef3cad261832a2918ccb6bb6bc154d99d75746
2019-03-15 13:41:59 +09:00
junyulai
7c469179ce [KA02.5] Use binder thread and executor to invoke callback
Currently, client side of keepalive event handling rely on a
newly created thread, looper, messenger and handler per object.

However, by creating oneway AIDL interface with the executor,
the callbacks can be invoked on the binder thread with user
specified context, which not only greatly simplify the design
but also reduce the cost of current thread modeling.

Bug: 114151147
Bug: 123969871
Test: 1. atest FrameworksNetTests --generate-new-metric 10
      2. atest-deflake.sh

Change-Id: I27504074cd28d5b5eb94a7ec0e97ebaaaaa1ae3d
2019-03-14 19:24:12 +08:00
Benedict Wong
c328b263c8 Merge "Integrate testNetworkService and Manager with Connectivity stack" 2019-03-13 16:48:07 +00:00
Neil Fuller
abff3f4f21 Merge "Improve documentation around HostnameVerifier" 2019-03-13 13:26:02 +00:00
Jeremy Klein
0869d3ec9b Merge "Rename entitlement callback to adhere to API guidelines." am: 0102e3d548 am: 33a9d34e8a
am: 9eeac7326d

Change-Id: Iba73611c9330463f4517ac1555b6ee000d740c71
2019-03-12 23:57:05 -07:00
Treehugger Robot
0102e3d548 Merge "Rename entitlement callback to adhere to API guidelines." 2019-03-13 04:48:24 +00:00
Benedict Wong
a341fbcdc3 Integrate testNetworkService and Manager with Connectivity stack
This change adds TestAPIs for tests to retrive an instance of
ConnectivityManager, allowing it to build test TUN interfaces, as well
as test networks.

This also integrates the TestNetwork types with ConnectivityManager,
creating virtual networks if the network agent is a test agent.

Bug: 72950854
Test: Compiles, CTS tests using this passing correctly
Change-Id: Ic1a04aa66014d1c66a74e65dbace3218437403ae
Merged-In: I741ef9cdf4bd4125d9129af3a030edf32f438e4f
2019-03-13 02:26:30 +00:00
Benedict Wong
99a4841954 Integrate testNetworkService and Manager with Connectivity stack
This change adds TestAPIs for tests to retrive an instance of
ConnectivityManager, allowing it to build test TUN interfaces, as well
as test networks.

This also integrates the TestNetwork types with ConnectivityManager,
creating virtual networks if the network agent is a test agent.

Bug: 72950854
Test: Compiles, CTS tests using this passing correctly
Change-Id: I741ef9cdf4bd4125d9129af3a030edf32f438e4f
2019-03-12 19:21:28 -07:00
Jeremy Klein
9f2e0f035a Rename entitlement callback to adhere to API guidelines.
The method for OnTetheringEntitlementResultListener needs to be
onTetheringEntitlementResult in order to meet our API guidelines:

"Use Listener when there is a single callback method and there will
never be any others. It should be an interface whose name is the same
as the callback method plus Listener."

Bug: 126392011
Change-Id: I9a883765541ae853c4eb3bd52c9d93a7af16e661
Test: Manual build
2019-03-12 13:36:21 -07:00
Neil Fuller
4f1bce2238 Improve documentation around HostnameVerifier
Explain usage of HostnameVerifier / HttpsURLConnection.

Bug: 126851476
Test: make docs / visual inspection
Merged-In: I6bc86f8e7efc47521316d41e07ef546ea995061c
Change-Id: I6bc86f8e7efc47521316d41e07ef546ea995061c
(cherry picked from commit 9f5e6f22bd)
2019-03-12 15:10:12 +00:00
TreeHugger Robot
bb1e77f261 Merge "Improve documentation around HostnameVerifier" 2019-03-12 14:53:48 +00:00
Chalard Jean
05ab6811d0 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
2019-03-12 21:47:21 +09:00
Chalard Jean
eb3e7b3f64 Merge "[CS] Support "instant failure" from factories" 2019-03-12 12:04:46 +00:00
Lucas Lin
fc0fbbb3af Merge "Check if network has partial connectivity" am: 174ae05817 am: 6cf91d1558
am: c0448b383f

Change-Id: Ib6c5ecc8238e1ac237eddcc00802fa5e7c0e24b9
2019-03-12 01:47:25 -07:00