Commit Graph

109 Commits

Author SHA1 Message Date
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
Xiao Ma
6b4de8faf7 Replace TcpSocketInfo with TcpKeepalivePacketDataParcelable in ApfTest.
Test: atest NetworkStackTests
Change-Id: I95fde70c07b398a2a2f734f35165870284a3959c
2019-02-15 19:22:36 +09:00
Remi NGUYEN VAN
ab96bc758e Sign networkstack with its own certificate
The NetworkStack module is comprised of 2 updatable APKs
(NetworkStack.apk and CaptivePortalLogin.apk), and a stub APK to define
the signature permissions for the APKs (NetworkStackPermissionStub.apk).

Test: flashed, WiFi works, captive portal login works
Bug: 124033493
Change-Id: I772d1d63363a3eb6f817c21906498bd2385ab02b
2019-02-15 17:53:00 +09:00
Remi NGUYEN VAN
1b57e8e9db Fix framework and NetworkStack classes conflicts
Classes that are used in framework.jar cannot be linked in NetworkStack,
as the framework takes precedence in the classpath. This prevents the
networkstack from using these classes due to the hidden API usage
detection.

Do the following:
 - jarjar any shared source file between framework and NetworkStack, so
   the version in the NetworkStack uses a different package.
 - Move any shared class not used in the NetworkStack to services.net

The CL  uses jarjar on the app copy and not the framework classes, as
the framework cannot be updated without an OTA, and non-network stack
specific classes should not be renamed because of the network stack.

Test: atest FrameworksNetTests NetworkStackTests
Test: flashed svelte build, WiFi works
Bug: 124033493
Change-Id: I85d888b756adc28c36638913632bfdfdbf0e0486
2019-02-15 17:30:07 +09:00
Remi NGUYEN VAN
d989ed753d Merge "Add NetworkStackTests to device-tests suite" 2019-02-15 08:16:03 +00:00
Remi NGUYEN VAN
bfe928d593 Merge "Remove NetworkMonitor dependency on ICaptivePortal" 2019-02-15 08:09:29 +00:00
Xiao Ma
60e7162e05 Merge "Fix testApfFilterKeepaliveAck." 2019-02-15 04:04:32 +00:00