Commit Graph

115 Commits

Author SHA1 Message Date
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
Jack Yu
1746d2582a Renamed the variable
Changed nrs (stands for NetworkRegistrationState) to
nri (stands for NetworkRegistrationInfo).

Test: Build
Bug: 127657991
Change-Id: I4deb1271818019465c55b59cd4a4a8029b514697
2019-03-18 11:01:42 -07:00
Jack Yu
e27d3fde88 Renamed NetworkRegistrationState to NetworkRegistrationInfo
API review changes. The class covers more information other than
registration state.

Test: Build
Bug: 127657991
Change-Id: I8af36b388182ab08257b64c37078f156d4821709
2019-03-18 00:17:54 -07: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
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
Jack Yu
6f7b30499c Moved transport to IntDef
Moved out from the sub class per API review feedback.

Test: Build
Bug: 128607082
Merged-In: I1b513bcaaa0ebf47c14593d962579ed48a7c6db0
Change-Id: I1b513bcaaa0ebf47c14593d962579ed48a7c6db0
2019-03-14 20:32:16 -07:00
Jack Yu
ef25faf013 Moved transport to IntDef
Moved out from the sub class per API review feedback.

Test: Build
Bug: 128607082
Change-Id: I1b513bcaaa0ebf47c14593d962579ed48a7c6db0
2019-03-14 19:24:49 -07:00
Chiachang Wang
0630d6fffa Merge "Support partial connectivity probe result option" am: da0ebedb47 am: cca7cdc8d9
am: 07b34ba935

Change-Id: I8781b8df0ec631cf4675335c30f7954254b0c617
2019-03-13 00:18:17 -07:00
Chiachang Wang
8737d25ed2 Support partial connectivity probe result option
Bug: 124629963
Test: atest NetworkStackTests
Change-Id: I1c22bad6ba94d23892e8907d6e7b28d074922339
2019-03-12 18:28:24 +08: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
lucaslin
e252a740ca Check if network has partial connectivity
In some networks, network validation may only get success
result for http probe but fail result for https probe.
For this kind of network, it may still work at some websites
or apps, but user didn't know about that. In order to fix this
issue, we will check if network has partial connectivity and
notify user to make a choice if they want to use this partial
connectivity or not.

Bug: 113450764
Test: 1. Build pass.
      2. Fake partial connectivity case for testing.
      3. atest FrameworksNetTests
      4. atest NetworkStackTests

Change-Id: I69ed00ac4850904ff708c9fef22e148879a10e92
2019-03-12 07:37:33 +00:00
Remi NGUYEN VAN
03fdf35208 Merge "Use an in-process APK for in-process NetworkStack" am: b8f2ab9362 am: 13f2f93cd3
am: ad9be46d09

Change-Id: Ic440d09c0198c8b2161c74b52cbacf884c1d3df5
2019-03-11 19:19:47 -07:00
Remi NGUYEN VAN
b8f2ab9362 Merge "Use an in-process APK for in-process NetworkStack" 2019-03-12 01:37:26 +00:00
Remi NGUYEN VAN
177caed0d1 Merge changes I9dbbf904,Iebc174ed am: 06d8067975 am: 91b2b0cc60
am: 45a41cf19d

Change-Id: I2e154179065afb9df7731cfbdb641f0d9c7dcdcf
2019-03-10 19:39:29 -07:00
Remi NGUYEN VAN
06d8067975 Merge changes I9dbbf904,Iebc174ed
* changes:
  Move NetworkStackTests to presubmit
  Remove NetworkStack test dependency on testutils
2019-03-11 02:06:27 +00:00
Chiachang Wang
cad56fe628 Merge "Send data stall data to statsd" 2019-03-09 14:28:48 +00:00
Treehugger Robot
a6f3476476 Merge "Give Telephony the permissions to access the network stack." 2019-03-08 15:55:53 +00:00
Bernie Innocenti
e5e3ac639b Merge "Add junyulai@ as owner of the core networking dirs" 2019-03-08 15:21:01 +00:00
Bernie Innocenti
ea89cf2c6e Add junyulai@ as owner of the core networking dirs
Also removed emeritus accounts ek@ and silberst@ from various places.
A cleanup using 'include' would probably be in order...

Test: N/A
Change-Id: I575e60dd5e600e42d9571ce8e8d7661d30e99bfe
2019-03-08 13:04:05 +00:00
Chalard Jean
12aaf7e2ef Give Telephony the permissions to access the network stack.
Test: manual
Change-Id: I28308f421aa955fe110b50452b115a0178b24745
2019-03-08 20:43:10 +09:00
Remi NGUYEN VAN
8acc99a974 Use an in-process APK for in-process NetworkStack
Instead of having a library in the classpath where the NetworkStack is
created by reflection on devices using the network stack in-process,
just bind to a version of the network stack service that runs in the
system process.

If the in-process version is installed it will be used, otherwise the
module is used with its own process.

Bug: 127908503
Test: blueline boots and has functional WiFi
Test: atest FrameworksNetTests NetworkStackTests
Test: svelte build boots and has functional WiFi
Change-Id: I7722b173e5686e0dbb9cfddcfb34344b0f4135d9
2019-03-08 19:18:40 +09:00
Remi NGUYEN VAN
d9c313d450 Move NetworkStackTests to presubmit
The tests have been green in postsubmit for a while and run very
quickly.

Test: atest NetworkStackTests
Change-Id: I9dbbf9046dc0878c355a5ae791e31166038df796
2019-03-08 18:08:48 +09:00
Remi NGUYEN VAN
22cd685c0a Remove NetworkStack test dependency on testutils
frameworks-base-testutils is close to unused in the tests, and has the
side-effect of adding some unrelated tests to be run in
NetworkStackTests like TestLooperTest. TestLooperTest is also failing in
some cases.

Bug: 127908503
Test: atest NetworkStackTests
Change-Id: Iebc174ed1362e8c341d765129a7fc51f8ed1999d
2019-03-08 18:05:41 +09:00
Chiachang Wang
c1908f16fa Send data stall data to statsd
Short term fix to send the metrics via legacy API. This allows
data stall metrics available in internal branch.

Bug: 120452078
Test: atest NetworkStackTests and test against statsd
Change-Id: I4dd08086f4aee12bbb9478551d8039e9bb6a381e
2019-03-08 14:41:11 +08:00
Chiachang Wang
e43f162371 Not to use any() to verify DataStallDetectionStats
Build a empty DataStallDetectionStats object instead of use
any() to do the verification to prevent NPE while trying to
write the metrics.

Bug: 120452078
Test: atest NetworkStackTests
Change-Id: Ib9f3e56195a539a5ca4826b4aad0e38945a9a3a7
2019-03-08 14:34:19 +08:00
Remi NGUYEN VAN
3da7809ae4 Merge "Fix SocketUtils API" 2019-03-07 03:54:22 +00:00
Remi NGUYEN VAN
b7bda39d90 Fix SocketUtils API
- connect, sendTo, bind were added as public API, so do not need to be
   maintained as SystemApi in SocketUtils. These APIs were added in Q
   timeframe.
 - Add @Nullable/@NonNull annotations.

Bug: 126699304
Bug: 126477266
Test: booted, WiFi works
Change-Id: I3f086ac8952cfd6a4d8f861d2e1c7aa1ca8be999
2019-03-06 18:02:34 +09:00
Chiachang Wang
f397b39442 Merge "Update description based on API feedback" 2019-03-06 00:49:20 +00:00
Chiachang Wang
4349dc08c9 Update description based on API feedback
Bug: 126883311
Test: Build pass
      atest NetworkStackTests
Change-Id: If3d21829bbe98d125215abe96247ca7d5a66d1f3
2019-03-05 20:31:57 +08:00
Remi NGUYEN VAN
5026c9ea28 Set module min_sdk_version to 28
The modules are not actually compatible with 28, but this is necessary
as tooling does not support "Q" as a version in the APK.

This will need to be changed to the new version number as soon as it is
available.

Test: m
Change-Id: I1d88f80c293b4667244d219a6989dd11be90f12a
2019-03-05 11:12:14 +09:00
Brett Chabot
8091d9e6d9 Migrate frameworks/base/tests/testables and its users to androidx.test
See go/jetpack-test-android-migration

Test: atest TestablesTests NetworkStackTests FrameworksServicesTests SystemUITests FrameworksUiServicesTests ExtServicesUnitTests
Exempt-From-Owner-Approval: already reviewed
Change-Id: I083fcdaa71b503535aa2b3c257740f3ecf055373
Merged-In: Ib04d80954bd8536914d88c66b28e6632e60a6245
2019-03-01 17:23:42 +00:00
Remi NGUYEN VAN
3e15c9f9ba Merge "Set NetworkStack targetSdk to 28" 2019-03-01 06:43:21 +00:00
Remi NGUYEN VAN
f4249c3885 Set NetworkStack targetSdk to 28
Test: flashed, booted, WiFi works
Change-Id: I7bbd7eb563432a290358d16652c0ae69e9772002
2019-03-01 11:42:50 +09:00
Baligh Uddin
222d1d04bf Merge "Set networking module APKs version to 10" 2019-02-28 15:54:28 +00:00
Remi NGUYEN VAN
4af3cdae16 Set networking module APKs version to 10
Up to now the version in output APKs was 28 (platform version by
default). This should make it easier to track and bump up the version.

Test: booted, WiFi works
Test: aapt dump badging shows version 10
Change-Id: I199eb55fd82e16ae748c8b011ce93cf48b505395
2019-02-28 11:28:50 +09:00
Chiachang Wang
95489ca49e Add more test case and some clean up
Bug: 120452078
Test: atest NetworkStackTests
Change-Id: Ifb981ccdaa7818bf2bebec98e91979007222910b
2019-02-26 11:32:18 +08:00
Chiachang Wang
2fd3ca6fa0 Merge "Injecting data stall event to statsd" 2019-02-22 05:12:42 +00:00
Chiachang Wang
f09e3e3043 Injecting data stall event to statsd
Bug: 121185319
Bug: 120452078
Test: - Build and test against data stall code
      - atest NetworkStackTests
Change-Id: I2ee16085e7861d38bcd203c98ffd682f86fdc867
2019-02-22 03:14:45 +00:00
Treehugger Robot
1d18e60e76 Merge "Consider 200 response with "Content-length <= 4" to not be a captive portal." 2019-02-20 11:14:24 +00:00
Xiao Ma
e7e5a35b38 Merge "Replace TcpSocketInfo with TcpKeepalivePacketDataParcelable in ApfTest." 2019-02-18 07:12:04 +00:00
Remi NGUYEN VAN
e4a40c77e1 Merge "Rename NetworkStack package" 2019-02-18 01:07:51 +00:00
Remi NGUYEN VAN
fd2d7dc685 Merge "Sign networkstack with its own certificate" 2019-02-16 01:48:49 +00:00
Remi NGUYEN VAN
3f23efdd13 Merge "Fix framework and NetworkStack classes conflicts" 2019-02-16 00:22:29 +00:00