Commit Graph

42329 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
eceaeb3ea3 [automerger skipped] Merge "Fix flakes in tests running after testIsPrivateDnsBroken" into sc-dev am: 64168015f1 -s ours
am skip reason: Merged-In Id9beba94e0fed85bd26c0509ad61369be794f3c3 with SHA-1 582770ce68 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15135741

Change-Id: Ic7c46d121b83eb531a8870a93f071bb1d0d1fcfb
2021-06-29 06:57:10 +00:00
Paul Duffin
65c5f4205b Merge "Enable tethering to perform its own hidden API processing" into sc-dev am: 4c94d16ced
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15106963

Change-Id: Ia64cc9a69cea5a79861a5245447908f302ab4d24
2021-06-29 06:57:03 +00:00
Remi NGUYEN VAN
64168015f1 Merge "Fix flakes in tests running after testIsPrivateDnsBroken" into sc-dev 2021-06-29 06:51:25 +00:00
Paul Duffin
4c94d16ced Merge "Enable tethering to perform its own hidden API processing" into sc-dev 2021-06-29 06:43:40 +00:00
Treehugger Robot
897ed3fc3d Merge "Fix OffloadControllerTest on R" am: 767b2180e9 am: 634ad9792d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1748154

Change-Id: I2cd282bf6d7a4638cbb65f20f2ccd886ec113713
2021-06-29 05:24:11 +00:00
Treehugger Robot
634ad9792d Merge "Fix OffloadControllerTest on R" am: 767b2180e9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1748154

Change-Id: I5c78e3e4cb44fa88ad698bdf4cbc88f47b954e3c
2021-06-29 05:14:27 +00:00
Treehugger Robot
767b2180e9 Merge "Fix OffloadControllerTest on R" 2021-06-29 05:02:47 +00:00
Treehugger Robot
b91d44a64a Fix flakes in tests running after testIsPrivateDnsBroken
The test would not reconnect wifi after restoring the private DNS setting,
so validation would not be triggered, and it would remain identified as
having broken private DNS.

Reconnect wifi after the test to avoid affecting subsequent tests.

Original-Change: https://android-review.googlesource.com/1749560
Merged-In: Id9beba94e0fed85bd26c0509ad61369be794f3c3
Change-Id: Id9beba94e0fed85bd26c0509ad61369be794f3c3
Test: atest android.net.cts.ConnectivityManagerTest
Bug: 182296835
2021-06-29 04:04:07 +00:00
Paul Duffin
b28cb44e4b Enable tethering to perform its own hidden API processing
Previously, the hidden API encoding of the tethering boot dex jars,
i.e. those dex jars that tethering contributes to the bootclasspath
were done as part of the monolithic hidden API processing. This change
causes the encoding to be done by the tethering's
bootclasspath_fragment.

This change involves the following:
* Addition of the fragments property to the tethering's
  bootclasspath_fragment module to list all the other
  bootclasspath_fragment modules on which this depends.
* Addition of the additional_stubs property to add stubs for APIs that
  are not provided by another bootclasspath_fragment.
* Moving hidden API flag file entries related to tethering from the
  flag files in frameworks/base/boot/hiddenapi directory into the
  tethering directory with an appropriate OWNERS file to allow them to
  be managed by the Soong and compat team.
* Addition of a PREUPLOAD.cfg hook script to ensure that the flag files
  are sorted.

The build automatically checks that the hidden API flags which are
computed by tethering and encoded into its boot dex jars match those
that are generated by the monolithic processing so this is guaranteed
to be safe.

Bug: 179354495
Test: m com.android.tethering
      - ensure that the generated APEX is byte-for-byte identical
        before and after these changes.
      m out/soong/hiddenapi/hiddenapi-flags.csv
      - make sure that they are not changed by this.
Change-Id: I4d9621325c7fcea5043cbca4c577ba2ac6125c0c
Ignore-AOSP-First: merge conflicts
2021-06-28 23:41:38 +01:00
Victor Chang
2f89168f6d [automerger skipped] Merge "Remove usage of internal APIs from InetAddress and ServerSocket" into sc-dev am: 99c7bdb1a4 -s ours
am skip reason: Merged-In I77a419c459ee53b36d24f324ecab2b5dae5744de with SHA-1 ef88fadc2e is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15015192

Change-Id: I100bfcaa03d6cb5715b0632ba546cc3608fced6c
2021-06-28 14:27:05 +00:00
Victor Chang
99c7bdb1a4 Merge "Remove usage of internal APIs from InetAddress and ServerSocket" into sc-dev 2021-06-28 14:17:12 +00:00
Treehugger Robot
917b071f80 Merge "Move ConnectivityCoverageTests to general-tests" am: 9330953258 am: e206deb76e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749025

Change-Id: I758a275ce750b0e1929dc97a059ddd5b91758c0f
2021-06-28 13:48:18 +00:00
Treehugger Robot
e206deb76e Merge "Move ConnectivityCoverageTests to general-tests" am: 9330953258
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749025

Change-Id: I831cf7b037ea93f09e416382bb9b27848fdd8034
2021-06-28 13:37:16 +00:00
Treehugger Robot
9330953258 Merge "Move ConnectivityCoverageTests to general-tests" 2021-06-28 13:17:25 +00:00
Victor Chang
6fae863801 Remove usage of internal APIs from InetAddress and ServerSocket
It affects the test only.

Bug: 154796679
Test: atest CtsNetTestCases
Merged-In: I77a419c459ee53b36d24f324ecab2b5dae5744de
Change-Id: I77a419c459ee53b36d24f324ecab2b5dae5744de
(cherry picked from commit ef88fadc2e)
2021-06-28 12:11:52 +01:00
Treehugger Robot
cb97471321 Merge "Fix flakes in tests running after testIsPrivateDnsBroken" am: de7eb04d71 am: d2b7990122
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749560

Change-Id: Id6d77c1eb1f862605ce741c894f895ad16ca4cc9
2021-06-28 10:46:56 +00:00
Treehugger Robot
d2b7990122 Merge "Fix flakes in tests running after testIsPrivateDnsBroken" am: de7eb04d71
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749560

Change-Id: Ib7b4f8ea428c0becff28b541db84529024cddd36
2021-06-28 10:37:05 +00:00
Treehugger Robot
de7eb04d71 Merge "Fix flakes in tests running after testIsPrivateDnsBroken" 2021-06-28 10:26:24 +00:00
Treehugger Robot
aad77e7ce4 Merge "Make "dumpsys tethering" print the number of registered callbacks." am: 1e50b3ea24 am: 2d4eb7e18d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749480

Change-Id: Ia2351cde37d919b7dba7b609b556c08533a978ff
2021-06-28 10:15:26 +00:00
Treehugger Robot
2d4eb7e18d Merge "Make "dumpsys tethering" print the number of registered callbacks." am: 1e50b3ea24
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749480

Change-Id: Ib348a653fe8e66634aba2fab38949b8595624474
2021-06-28 10:07:02 +00:00
Treehugger Robot
1e50b3ea24 Merge "Make "dumpsys tethering" print the number of registered callbacks." 2021-06-28 09:50:04 +00:00
Remi NGUYEN VAN
507d094373 Move ConnectivityCoverageTests to general-tests
The test suite is not signed with any particular key so
can be in general-tests. This is also required for TEST_MAPPING.

Bug: 187935317
Change-Id: I9dbf98eaa28172a172e707091ea75ffdddd4971b
Test: TH for test mapping
2021-06-28 09:29:51 +00:00
Treehugger Robot
bb8f070cb3 Merge "Remove wigig support from S tethering" am: 0b44491744 am: 8027e83cf1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1744652

Change-Id: I80b9877ef5d0bc21a2bdb31d506214d5823d5dc6
2021-06-28 08:16:56 +00:00
Treehugger Robot
8027e83cf1 Merge "Remove wigig support from S tethering" am: 0b44491744
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1744652

Change-Id: I22b34d200a016186848b59af1c7b53a47e59016e
2021-06-28 08:03:57 +00:00
Treehugger Robot
0b44491744 Merge "Remove wigig support from S tethering" 2021-06-28 07:51:07 +00:00
Remi NGUYEN VAN
9f4a31af59 Merge "Fix ConnectivityManagerTest initialization on Q" am: 72f59b3019 am: 82a32e3f4a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1740779

Change-Id: I40abcac7db563480fe3c13fb5e0178d7a3629652
2021-06-28 07:40:27 +00:00
Remi NGUYEN VAN
8c89161b52 Merge "Fix null PendingIntent in network listens" am: 27a942cb32 am: 78aa9a4bdc
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1748153

Change-Id: I93002b6e1f6a40af501f8af6721865dbdc329984
2021-06-28 07:40:20 +00:00
Remi NGUYEN VAN
82a32e3f4a Merge "Fix ConnectivityManagerTest initialization on Q" am: 72f59b3019
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1740779

Change-Id: Iea8a7bbe63a16efc10733dd94cccc77560a7a058
2021-06-28 07:28:05 +00:00
Remi NGUYEN VAN
78aa9a4bdc Merge "Fix null PendingIntent in network listens" am: 27a942cb32
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1748153

Change-Id: I85ac14015149779efd3a2d009fffbad31881ab97
2021-06-28 07:27:47 +00:00
Remi NGUYEN VAN
72f59b3019 Merge "Fix ConnectivityManagerTest initialization on Q" 2021-06-28 07:24:49 +00:00
Remi NGUYEN VAN
27a942cb32 Merge "Fix null PendingIntent in network listens" 2021-06-28 07:11:31 +00:00
Remi NGUYEN VAN
582770ce68 Fix flakes in tests running after testIsPrivateDnsBroken
The test would not reconnect wifi after restoring the private DNS setting,
so validation would not be triggered, and it would remain identified as
having broken private DNS.

Reconnect wifi after the test to avoid affecting subsequent tests.

Change-Id: Id9beba94e0fed85bd26c0509ad61369be794f3c3
Test: atest android.net.cts.ConnectivityManagerTest
Bug: 182296835
2021-06-28 06:58:51 +00:00
Treehugger Robot
2b373de5a4 Merge "Move test_mainline_modules to AndroidTest.xml" am: abbee98e86 am: 6709c9b056
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1748157

Change-Id: Idf16454383a65e6ccc1c4672c7d83e8742512ea7
2021-06-28 06:57:47 +00:00
Treehugger Robot
6709c9b056 Merge "Move test_mainline_modules to AndroidTest.xml" am: abbee98e86
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1748157

Change-Id: I4078001620ed09d485d98c58dd8e178520773db0
2021-06-28 06:43:01 +00:00
Treehugger Robot
abbee98e86 Merge "Move test_mainline_modules to AndroidTest.xml" 2021-06-28 06:27:42 +00:00
Junyu Lai
0304c86c09 [automerger skipped] Check null NetworkSpecifier before redacting am: 4ad09c4a74 -s ours
am skip reason: Merged-In I5df3547995111fe6340facb94a577296d2228694 with SHA-1 144b6c742a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15121422

Change-Id: I7bcdf81fc5457fc697db496c4a04f70dc0801750
2021-06-28 06:17:54 +00:00
Mark Chien
4114bb1a2a Merge "Fix and test usb function configuration change" am: 840e2efd7f am: 717c8ff590
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1740778

Change-Id: Iac2ab9a589c878bee92179956df7802ea51c7a3e
2021-06-28 04:39:21 +00:00
Mark Chien
717c8ff590 Merge "Fix and test usb function configuration change" am: 840e2efd7f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1740778

Change-Id: I1254083dc5df639fd155f91565ccb46c488b04a8
2021-06-28 04:27:17 +00:00
Mark Chien
840e2efd7f Merge "Fix and test usb function configuration change" 2021-06-28 04:16:14 +00:00
Paul Hu
e6e75faf1d Merge "Use appId instead of uid" am: 683c386403 am: 9658c8ea69
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1733212

Change-Id: Ic23e289c26e4b61864d1343eb0e6494f8cd43587
2021-06-28 04:07:10 +00:00
Paul Hu
9658c8ea69 Merge "Use appId instead of uid" am: 683c386403
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1733212

Change-Id: I791bb9153f33f7fb188ac06a80a99c0ee9c8dc80
2021-06-28 03:51:33 +00:00
Lorenzo Colitti
ced68f5993 Make "dumpsys tethering" print the number of registered callbacks.
Test: manual
Bug: 177265744
Change-Id: I07f56459125d5629dcafe5683eecb42d0ef9e2bd
2021-06-28 12:46:37 +09:00
Paul Hu
683c386403 Merge "Use appId instead of uid" 2021-06-28 03:35:45 +00:00
markchien
34f7857b07 Fix and test usb function configuration change
Allow stop TETHERING_NCM no matter ncm is used for TETHERING_USB or
TETHERING_NCM.

Add a test:
1. NCM is started for TETHERING_NCM
2. The config changes to use NCM for TETHERING_USB.
3. Then the config changes to use RNDIS for TETHERING_USB.

Also let some logs not only print in dumpsys, but also in logcat to
easiler debug unit test.

Bug: 185649441
Test: atest TetheringTests
Change-Id: Ia8d76a29646f36941cbb16cd68ae6887100ec8ec
2021-06-28 02:59:33 +00:00
Remi NGUYEN VAN
0d54d7992d Fix ConnectivityManagerTest initialization on Q
The test can't have TetheringManager as an argument to methods or a
field, otherwise the test runner will crash when scanning the class for
tests because TetheringManager did not exist in Q. Although
testFactoryReset is already skipped on Q, the test runner would fail
at initialization time, before starting the run.

Use CtsTetheringUtils instead. This ensures that TetheringManager does
not have method signatures or members that reference classes that do not
exist on Q, so the test runner can scan the class successfully before
starting the run.

Bug: 188851796
Test: atest ConnectivityManagerTest on Q
Change-Id: I87488d0f23628a1ef2d7af0242513fcc5401d598
2021-06-28 11:24:27 +09:00
Remi NGUYEN VAN
8b2a47c867 Move test_mainline_modules to AndroidTest.xml
When an AndroidTest.xml is used, configuration needs to be in the
AndroidTest.xml file, not in the Android.bp.

This currently causes tests not to be run in TEST_MAPPING as they should
be.

Test: TH needs to test
Bug: 187935317
Change-Id: Ie0aca0c64646825175769cd375bcecf65de4b4c8
2021-06-28 10:55:15 +09:00
Junyu Lai
4ad09c4a74 Check null NetworkSpecifier before redacting
Do null check before redacting, since NetworkSpecifier will not
always be attached. For example, NetworkSpecifier of wifi
network is only attached when a wifi network is created
in response to a network request with specifier attached.

Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest#testGetAllNetworkStateSnapshots \
      --rerun-until-failure 100
      (tested on cuttlefish mobile and wifi)
Bug: 191944987
Original-Change: https://android-review.googlesource.com/1747893
Merged-In: I5df3547995111fe6340facb94a577296d2228694
Change-Id: I5df3547995111fe6340facb94a577296d2228694
2021-06-28 01:22:42 +00:00
Remi NGUYEN VAN
9207702d66 Fix OffloadControllerTest on R
Data warning is not supported on R, and the notifyWarningOrLimitReached
callback also only exists in S.

Bug: 182962001
Test: atest OffloadControllerTest
Change-Id: I4914240967bba341f16e505acd29b80b90ab8569
2021-06-28 10:15:57 +09:00
Remi NGUYEN VAN
1e238a87e9 Fix null PendingIntent in network listens
In S ConnectivityService was changed to use getActiveRequest() to fill
EXTRA_NETWORK_REQUEST, but there is no active request in the case of
listens.

When getActiveRequest() is missing, use the first mRequest instead. This
should match previous behavior.

Bug: 191713869
Test: atest android.net.cts.ConnectivityManagerTest
Change-Id: Id7343a4cc020aba16b7979b16334721c56b2839c
2021-06-28 09:14:30 +09:00
Remi NGUYEN VAN
59be04dcca Merge "Improve TestConnectivityManager readability" am: 883df67f3f am: 265ec28e25
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1733779

Change-Id: Ic81a3604724855233dffc4e989bcee69feb8d91c
2021-06-28 00:13:10 +00:00