Commit Graph

51023 Commits

Author SHA1 Message Date
Andriy Naborskyy
1b35da1ccb data saver test exception for wear
WearOs should not be treated  as supporting Data Saver mode. Users
can not enable or disable the mode.

Data Saver is used on WearOs for battery improvements with LTE enabled
devices but should not block WiFi or Bluetooth PROXY networks.

Bug: 222086830
Test: run cts CtsHostsideNetworkTests
Change-Id: I8e76f7f9574c1ef2c1bd04ff0be652a74cd241f9
(cherry picked from commit cf709bbae312ad7cd0ffdf64af0a8ce23d8b1610)
2022-03-28 19:15:00 +00:00
Chiachang Wang
59e6e2b730 Merge "Add tests for VPN validation in NetworkMonitor" 2022-03-28 13:51:34 +00:00
Bill Yi
7ff8ccd448 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I8b155f84bfc9616b6b3943b7785eb143884f9790
2022-03-27 02:24:22 +00:00
Remi NGUYEN VAN
0395b70000 Use Sources.bp for building
Reference Sources.bp from Android.bp, so that they are used as build
files.

Sources.bp is separate from Android.bp as it was migrated from the
Android.bp files in the old code location. They can be merged into the
main Android.bp file (or removed by removing the filegroups) after the
migration is done.

Also remove references to the AIDL filegroups, as files are now merged
into the common framework/aidl-export directory which is used as include
directory for aidl source generation already, so they do not need to be
referenced separately. framework/aidl-export can contain AIDLs for S-
API classes that became updatable API in T (the contents of
framework-t), as they are the same as any other API class for the
purposes of AIDL code generation: it's OK for any S+ code to reference
S+ API classes.

Finally, fix reference to mByteStream in IpConfigStoreTest. It was
already wrong but did not break the build because the test was not being
built in the old location.

Bug: 222234190
Test: TH
Merged-In: I81893df9f327abb84f1561b2b33027a2d23a4d65
Merged-In: I67c703e3f7aa9d5787f032a79ed62e45412baf4f
Change-Id: I9093f9ae2f9d76e597f20de48680e459891755b4
2022-03-25 14:58:43 +00:00
Remi NGUYEN VAN
700ffc994f Merge history of ConnectivityT
Renamed files/directories:
ConnectivityT/service/Android.bp --> service-t/Sources.bp
ConnectivityT/framework-t/Android.bp --> framework-t/Sources.bp
ConnectivityT/framework-t/aidl-export --> framework/aidl-export
ConnectivityT/service --> service-t
ConnectivityT/framework-t --> framework-t
ConnectivityT/tests --> tests
ConnectivityT/OWNERS --> (removed)

BUG: 222234190
TEST: TH
Ignore-AOSP-First: Move with history done per-branch
Merged-In: I81893df9f327abb84f1561b2b33027a2d23a4d65
Merged-In: I67c703e3f7aa9d5787f032a79ed62e45412baf4f
Change-Id: I27a91f1a94f9d807f92762436f533c4b0d0114d5
2022-03-25 11:02:45 +00:00
Lorenzo Colitti
697c18376b Merge "Move the DscpPolicy status constants and IntDef to NetworkAgent." 2022-03-25 08:03:38 +00:00
Lorenzo Colitti
fbe1576139 Move the DscpPolicy status constants and IntDef to NetworkAgent.
As requested by API council.

Also fix lint errors in the test.

Fix: 217366078
Test: existing tests modified in this CL
Change-Id: I8f7cd0e78bf29aeb52ec6a08a5d635d25fa2205d
2022-03-25 01:06:46 +09:00
Lorenzo Colitti
544226f701 Merge "Rename destroyAndAwaitReplacement to unregisterAfterReplacement." 2022-03-24 14:45:09 +00:00
Xiao Ma
23fa999824 Merge "Add cts for EthernetManager#getInterfaceList api." 2022-03-24 11:36:16 +00:00
Patrick Rohr
e38626a4a2 Merge "Add getInterfaceList module-lib API in EthernetManager." 2022-03-24 06:15:43 +00:00
Patrick Rohr
f7c4dcaaf4 Merge "Update the module-lib API txt with getInterfaceList api." 2022-03-24 06:15:43 +00:00
Patrick Rohr
95738f7c18 Merge "Fix ethernet enable / disable API" 2022-03-24 06:09:28 +00:00
Patrick Rohr
04f9843d32 Merge "Fix ethernet enable / disable API" 2022-03-24 06:09:28 +00:00
Treehugger Robot
b3edbd35b6 Merge "Update the module-lib API txt with setEthernetEnable API" 2022-03-23 19:40:19 +00:00
Lorenzo Colitti
a63e2341d6 Rename destroyAndAwaitReplacement to unregisterAfterReplacement.
Rename requested by API council.

Fix: 224764301
Test: existing CTS tests updated
Change-Id: Ibab9c9cd64bf0dde1e22705e81cff11d356fc719
2022-03-24 01:12:26 +09:00
Xiao Ma
715c8dba6e Add cts for EthernetManager#getInterfaceList api.
Bug: 171872016
Test: atest android.net.cts.EthernetManagerTest --iterations
Merged-In: I95a21777689fd100ccf94982d3398418036b674f
Change-Id: I46a2b26ca1a5846523aed94bc9744e11daa39859
2022-03-23 15:18:54 +00:00
Xiao Ma
bdfed34bbc Update the module-lib API txt with getInterfaceList api.
Bug: 171872016
Test: m
Merged-In: I16c69aa0d236036a600bdae9fb8326ff70fd4fda
Change-Id: I1ee2ad76b4950906516fae7328785b8c583f7adb
2022-03-23 15:18:24 +00:00
Chalard Jean
2f23fa51d8 Add tests for VPN validation in NetworkMonitor
Test: New tests in this patch
      also FrameworksNetTests
Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk
Change-Id: I68aa5201ad94531e5a40999816844faef5531525
2022-03-23 11:19:44 +00:00
Remi NGUYEN VAN
cc49988549 Merge "Use separate catch for getTcpKeepalivePacket" 2022-03-23 09:24:32 +00:00
markchien
e1cde2694f Update the module-lib API txt with setEthernetEnable API
Bug: 171872016
Test: atest EthernetServiceTests
Change-Id: I61c5209f50ab62327b75813804bde1aa1a014054
Merged-In: I61c5209f50ab62327b75813804bde1aa1a014054
2022-03-23 17:02:14 +08:00
Remi NGUYEN VAN
2c1a10c4b2 Use separate catch for getTcpKeepalivePacket
Having a combined catch block causes the code to be "optimized" by R8 to
just throw a NullPointerException, with smali code:

  const/4 p0, 0x0
  throw p0

Workaround the issue by having separate catch blocks instead.

Bug: 217391956
Bug: 226127213
Test: atest ConnectivityManagerTest
Change-Id: Ib51fc66c44e1c2baa1f7ba4d1b0c2d1c94c3591d
2022-03-22 15:36:47 +00:00
Xiao Ma
1edd4554e5 Add getInterfaceList module-lib API in EthernetManager.
Bug: 171872016
Test: m
Merged-In: Ib0e6c8f67c6ded7d17bb9e0ff49e7ff495c8819d
Change-Id: I94fd147d0f8cf09cb7445fd2b5bc8e4528e8390e
2022-03-22 13:59:40 +00:00
markchien
5912ab6906 Add setEthernetEnabled and its listener API
Bug: 171872016
Test: atest EthernetServiceTests

Merged-In: Iefd24d955572589c5bd3ca9a8139ea6e44979e8a
Change-Id: Iefd24d955572589c5bd3ca9a8139ea6e44979e8a
2022-03-22 13:58:14 +00:00
Aaron Huang
a036ac4569 Merge "Fix proto invalid write type" 2022-03-22 12:18:39 +00:00
Aaron Huang
286f4e2c88 Merge "Fix proto invalid write type" 2022-03-22 12:18:39 +00:00
Patrick Rohr
3879cf1a78 Fix ethernet enable / disable API
The ethernet APIs connectNetwork() / disconnectNetwork() are
inaccurately named. Physical link state cannot be changed by calling an
API. This change renames these functions to enableInterface and
disableInterface, respectively, to better reflect their intention and
behavior.

Test: atest EthernetManagerPermissionTest
Merged-In: I3361ad0e01e761ffd77faf6c55924fa4612ede90
Change-Id: I3361ad0e01e761ffd77faf6c55924fa4612ede90
2022-03-22 12:12:48 +00:00
Patrick Rohr
a873f582a1 Fix ethernet enable / disable API
The ethernet APIs connectNetwork() / disconnectNetwork() are
inaccurately named. Physical link state cannot be changed by calling an
API. This change renames these functions to enableInterface and
disableInterface, respectively, to better reflect their intention and
behavior.

Test: atest EthernetManagerPermissionTest
Merged-In: I0f2866d09b745e7bdb261a1258f94cfd51223a8f
Change-Id: I0f2866d09b745e7bdb261a1258f94cfd51223a8f
2022-03-22 10:00:50 +00:00
Patrick Rohr
a68fba1659 Merge "Revert^2 "Change Ethernet API to use OutcomeReceiver"" 2022-03-22 10:00:08 +00:00
Patrick Rohr
4e6570c359 Merge "Revert^2 "Change Ethernet API to use OutcomeReceiver"" 2022-03-22 10:00:08 +00:00
Nucca Chen
a59eec920c Merge "ClatCoordinator: wrap clatd information" 2022-03-22 08:40:15 +00:00
Remi NGUYEN VAN
8d0fa1c2ad Merge "Add Executors to NSD callbacks" 2022-03-22 08:33:48 +00:00
Remi NGUYEN VAN
b58df4bf13 Merge "Add executors to NsdManager" 2022-03-22 08:33:48 +00:00
Hungming Chen
328d15271b ClatCoordinator: wrap clatd information
This is a preparation for accessing BPF program and map from existing
Java class. The new class ClatdTracker stores the clatd information
for forking clatd, accessing BPF maps and attaching BPF programs.
Using an object is easier to pass all required parameters and reuse
known resource.

Also refactor existing function and rename existing variables for this
commit.

Bug: 221213090
Test: atest FrameworksNetTests
Change-Id: I02ea889de89329c52710726fbcf1d2eac61707d7
2022-03-22 15:20:17 +08:00
Aaron Huang
dac7e4b84a Fix proto invalid write type
While dumpProtoLocked is called, InvalidProtocolBufferException
occurred because types are mismatched between platform side and
module side.

netstats.proto was moved into connectivity module, both the
platform(incident.proto) and the module uses protoc-gen-javastream
to generate the Java classes from it. It should be fine since
platform includes the source of the proto, and jarjar the generated
classess in the module to avoid conflict with platform.

Bug: 218566849
Test: adb shell incident 3001
      adb shell dumpsys netstats --proto
      atest CtsIncidentHostTestCases:IncidentdTest#testIncidentReportDumpAuto
Change-Id: I09cae385050e569b1da98ad7de0e226b13ee6895
Merged-In: I09cae385050e569b1da98ad7de0e226b13ee6895
2022-03-22 15:07:15 +08:00
Chiachang Wang
f7c071b1c4 Merge "Extend timeout to deflake test" 2022-03-22 00:43:36 +00:00
Treehugger Robot
dc1832cd83 Merge "Fix OWNERS issues" 2022-03-21 10:51:57 +00:00
Chiachang Wang
81c2d99a77 Extend timeout to deflake test
CaptivePortalLoginActivity may load the page slowly in lower
performance devices. Test expects the login page to be loaded
within 10s. The flaky happened sometimes since loading page
took 10+ seconds and failed the test.

Extend the timeout from 10s to 20s to deflake the test.

Bug: 225800341
Test: atest CaptivePortalTest
Change-Id: I98ab3dbc78cb95eeee95d1c86ab286600c98390b
2022-03-21 15:50:39 +08:00
Benedict Wong
0e75662808 Merge "Allow sending of Administrator UIDs for *NETWORK_STACK" 2022-03-19 01:33:27 +00:00
Sewook Seo
7a4fcf4ed1 Merge changes from topic "QosCallbackException"
* changes:
  CTS test for QosCallbackException
  Expose constructor of Exceptions.
2022-03-19 00:35:28 +00:00
Benedict Wong
a5604ea50f Allow sending of Administrator UIDs for *NETWORK_STACK
This change allows callers with the NETWORK_STACK or
PERMISSION_NETWORK_STACK to receive administrator UIDs. This will be
used by the VCN to ensure that administrator UIDs are accurately
populated, ensuring that the ConnectivityDiagnostics are triggered for
the VCN.

Bug: 193204385
Test: atest ConnectivityServiceTest
Change-Id: I3ecfbef6847dcc78adac05d0229719c97e3a220c
2022-03-18 21:52:57 +00:00
Martijn Coenen
b643f2a356 Merge "Setup permissions for SDK sandbox UIDs." 2022-03-18 13:35:51 +00:00
Alan Stokes
eae2ff9831 Fix OWNERS issues
Switch to a bug template that assigns the correct group.

Consolidate into one file to make it easier for humans as well as
machines to figure out the ownership.

Remove me from per-file ownership; no longer relevant, causes
confusion.

Bug: 224454753
Test: Presubmit
Change-Id: I84bf472fe56fe3f5927a626bde06cdd8cee8353a
2022-03-18 10:52:02 +00:00
sewookseo
27447c526a CTS test for QosCallbackException
Adding CTS test coverage for Exceptions realted to QosCallback

Bug: 224059548
Test: atest CtsNetTestCases
Change-Id: Iccd1d3259961a6e4a841395175e215724895786e
2022-03-18 10:44:31 +00:00
Remi NGUYEN VAN
c7aa9e3c62 Add Executors to NSD callbacks
Add Executor variants to all methods with callbacks.

Bug: 218752665
Test: atest NsdManagerTest
Change-Id: I4c31e2d7ae601ea808b1fd64df32d116c6fff97f
2022-03-18 09:26:11 +00:00
Patrick Rohr
2cef8f1314 Revert^2 "Change Ethernet API to use OutcomeReceiver"
41000c6106

Merged-In: I4c204a8489c0be006c00581d833f2bb46ae0e71d
Change-Id: I42f5ca159db523f85903c411c4a4838eb324c5ad
2022-03-18 12:11:51 +08:00
Patrick Rohr
d6156a930e Revert^2 "Change Ethernet API to use OutcomeReceiver"
369c79bca4

Merged-In: I7c46545a47034be409071c2ec007d9e1480c6ed0
Change-Id: If9b055e0862755f1d33b5ba6e026fd827bc1d0ea
2022-03-18 12:06:27 +08:00
Lorenzo Colitti
004cbbcdad Merge "Support ignoring validation failures after roam." 2022-03-18 03:15:49 +00:00
Lorenzo Colitti
14c851ccc3 Merge changes from topic "ethernetmanagertest"
* changes:
  Add a CTS test for EthernetManager.InterfaceStateListener.
  Add a method to create a TAP interface without bringing it up.
2022-03-18 02:26:25 +00:00
he_won.hwang
881307a834 Support ignoring validation failures after roam.
In some scenarios, Wi-Fi connectivity is disrupted after roam. If an application reacts to network errors by calling reportNetworkConnectivity(false), validation will immediately fail and the device will switch to cell data.

Add a way to ignore these validation failures for up to 10 seconds after Wi-Fi roams.

Bug: 216567577
Test: new unit tests

Change-Id: I58de486533bcc7c6e32b23536ae15bccb779e394
2022-03-18 10:30:28 +09:00
sewookseo
e7c481452e Expose constructor of Exceptions.
Exposing constructor of Exceptions for test purpose.

CTS-Coverage-Bug: 224059548
BUG: 215240597
BUG: 216368595
Test: build
Change-Id: I20af104a891e94873715ab46ecabc3e775638c8c
2022-03-17 18:05:56 +00:00