Commit Graph

4200 Commits

Author SHA1 Message Date
Paul Hu
947bc9208f Merge "Fix Automated API Review issues." am: 814bb8f627 am: 69aa833953
am: a6c364d805

Change-Id: I1968eb36c2f4fafd33846ec0f91710c665d936e6
2019-03-21 07:49:37 -07:00
Remi NGUYEN VAN
619eaeb21b Merge "Define DhcpErrorEvent constants at compile time" am: 5803191975 am: a0b2076f75
am: e229cc2c95

Change-Id: I47dac7870289bce6763c1d778c2e8aeb77741666
2019-03-21 07:31:08 -07:00
Paul Hu
814bb8f627 Merge "Fix Automated API Review issues." 2019-03-21 14:11:36 +00:00
Remi NGUYEN VAN
5803191975 Merge "Define DhcpErrorEvent constants at compile time" 2019-03-21 13:57:18 +00:00
Mark Chien
6be24edf54 Merge "Replace TcpSocketInfo with similar structure" am: a34aa2acab am: 43411c851d
am: 840623e94e

Change-Id: I9b51e6905245ada2707ef7498cc1b8e4cb4c69a0
2019-03-21 05:35:15 -07:00
Mark Chien
a34aa2acab Merge "Replace TcpSocketInfo with similar structure" 2019-03-21 12:02:54 +00:00
paulhu
79b380cfe7 Fix Automated API Review issues.
These API's argument/return value must be marked either @NonNull
or @Nullable.

Bug: 126701148
Bug: 126699090
Bug: 126701058
Bug: 126700772
Bug: 126699941
Bug: 126701299
Bug: 126700007
Bug: 126700900
Test: atest FrameworksNetTests
Change-Id: Id030a9f1116178b96aa3d4614b10969a537b2fc4
2019-03-21 15:16:58 +08:00
Lucas Lin
725b513e5d Merge "Improve partial connectivity" am: f6cbc2d533 am: 270e77d930
am: 728a68eefc

Change-Id: I25f9d056c26bf947c2e09516da51b627c3da9685
2019-03-20 21:15:34 -07:00
Lucas Lin
f6cbc2d533 Merge "Improve partial connectivity" 2019-03-21 03:34:30 +00:00
markchien
d42fca678e Replace TcpSocketInfo with similar structure
Replace TcpSocketInfo with TcpKeepalivePacketDataParcelable
because their structures are very similar.

bug: 128882321
Test: -build, flash, boot
      -FrameworksNetTests

Change-Id: Iafb4031a64ba4775a495c156e2c997d890c6b261
2019-03-20 22:29:48 +08:00
lucaslin
4333899a41 Improve partial connectivity
Improve the design and fix some nits.

Bug: 113450764
Test: 1. Build pass
      2. atest FrameworksNetTests
      3. atest NetworkStackTests
      4. Change captive_portal_https_url to https://invalid.com
      to simulate partial connectivity.
Change-Id: Ia56645841d00d2ed8406cfeacb86a4a27fd58650
2019-03-20 18:21:59 +08:00
Lorenzo Colitti
74867d1661 Merge changes from topic "framework-no-networkstack-aidl"
* changes:
  Remove the framework dependency on netd_aidl_parcelables-java.
  Move TcpKeepalivePacketData out of the framework.
  Stop using netd parcelables in the framework.
2019-03-20 09:45:37 +00:00
Remi NGUYEN VAN
542c622baf Define DhcpErrorEvent constants at compile time
Addresses API review comments.

Bug: 126700007
Test: m
Change-Id: I8c32a0e8bcf2d63eaf33c9ac884afd4fdbe0fdd3
2019-03-20 16:35:05 +09:00
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
Lorenzo Colitti
a3f811a547 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
Merged-In: Ib2805f7fcc516a5f6989c252365d1c95b8042703
2019-03-20 08:56:31 +09:00
Lorenzo Colitti
b90ad24f99 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
Merged-In: I027d50ba56091f5558f45e6e08f32e5912b2a82a
2019-03-20 08:56:24 +09: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