Commit Graph

42357 Commits

Author SHA1 Message Date
Paul Hu
cee2b58834 [automerger skipped] Merge "Use appId instead of uid" into sc-dev am: eefacbcb5c -s ours
am skip reason: Merged-In Ib8ea2185d8056bddb2ca5a8006f83afb3cffc9f4 with SHA-1 1e5d742596 is already in history

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

Change-Id: Ie9e95f2b7d166033b0ee2189ad63a380604c2d59
2021-06-30 09:50:42 +00:00
Paul Hu
eefacbcb5c Merge "Use appId instead of uid" into sc-dev 2021-06-30 09:38:26 +00:00
Paul Duffin
1ee498841d [automerger skipped] Merge "Enable tethering to perform its own hidden API processing" am: d8a8041ffc am: dd5ece3d19 -s ours
am skip reason: Merged-In I4d9621325c7fcea5043cbca4c577ba2ac6125c0c with SHA-1 b28cb44e4b is already in history

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

Change-Id: Ibca4e880a1455257517525d26277247b2c493acb
2021-06-30 08:45:25 +00:00
Paul Duffin
dd5ece3d19 Merge "Enable tethering to perform its own hidden API processing" am: d8a8041ffc
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1748800

Change-Id: I7885f619b84bc9a998697f2b68e8059c59476494
2021-06-30 08:36:42 +00:00
Paul Duffin
d8a8041ffc Merge "Enable tethering to perform its own hidden API processing" 2021-06-30 08:19:02 +00:00
Remi NGUYEN VAN
aec0e35349 Merge "Re-skip connectivity unit tests before S" am: a9230c1bf7 am: 1f3d8dc5e8
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749684

Change-Id: I5ce3c5b7dc333c802890831daf8289985c61301d
2021-06-30 08:18:57 +00:00
Remi NGUYEN VAN
1f3d8dc5e8 Merge "Re-skip connectivity unit tests before S" am: a9230c1bf7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749684

Change-Id: I4e3f42424fd76fdfae2c87af91bc4eaaf5c296d8
2021-06-30 08:02:50 +00:00
Remi NGUYEN VAN
a9230c1bf7 Merge "Re-skip connectivity unit tests before S" 2021-06-30 07:43:08 +00:00
Remi NGUYEN VAN
1032563615 [automerger skipped] Merge "Add option to make sign-in notification ongoing" am: ea395bf6a0 am: 4154629272 -s ours
am skip reason: Merged-In I3c2563d4ae4e3715d0c6270344ba8f7ef067872f with SHA-1 2afd0986d3 is already in history

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

Change-Id: I8d70b9c29b518e60e7d9753393f66a7eac6eb91c
2021-06-30 05:42:22 +00:00
Remi NGUYEN VAN
4154629272 Merge "Add option to make sign-in notification ongoing" am: ea395bf6a0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1751960

Change-Id: I61e852037ee8f38ebe89eab21e82df9a7b7c5810
2021-06-30 05:27:40 +00:00
Remi NGUYEN VAN
ea395bf6a0 Merge "Add option to make sign-in notification ongoing" 2021-06-30 05:12:09 +00:00
Remi NGUYEN VAN
154cf1da20 Re-skip connectivity unit tests before S
The tests are packaged together with other tests in a common coverage
suite, so need to be individually annotated so that they are skipped
before S.

They do not need to pass on platforms older than S, because such
platforms will not updated with the code that is tested.

This applies a previous change, this time using DevSdkIgnoreRunner,
as SdkSuppress does not work as expected in branches that have a
codename 2 versions above the SDK version, as is the case in AOSP.

Bug: 187935317
Test: atest ConnectivityCoverageTests on R
      atest FrameworksNetTests on S
Change-Id: I5808d34459a4c19238baf8873afa7cf942828460
2021-06-30 12:00:28 +09:00
Remi NGUYEN VAN
57c0380135 Add option to make sign-in notification ongoing
Add an overlay boolean that allows setting the SIGN_IN notification as
an ongoing notification.

This can be useful to make sure users can always easily find the
notification to sign in to a captive portal, as studies have found that
some users have a tendency to dismiss notifications before reading them.
At the same time the notification shade is generally too crowded, which
is what causes such behaviors in the first place, so this option is not
enabled by default and should generally not be enabled without proper
user studies or metrics.

Bug: 173171709
Test: atest NetworkNotificationManagerTest
Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f
Change-Id: Ic187d2a2b7e49ad152ea2aa35bb784864b97473c
2021-06-30 11:59:11 +09:00
Paul Duffin
f9a0c868c4 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.

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.
(cherry picked from b28cb44e4b)

Merged-In: I4d9621325c7fcea5043cbca4c577ba2ac6125c0c
Change-Id: I4d9621325c7fcea5043cbca4c577ba2ac6125c0c
2021-06-30 00:00:41 +01:00
Hungming Chen
a2a34a90d7 Dump the unused IPv4 BPF rule age correctly am: e7dff2f955 am: e9deba21ad
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1751022

Change-Id: I3704db91381858a88f51972692af78f14e6d2e0c
2021-06-29 16:22:38 +00:00
Hungming Chen
e9deba21ad Dump the unused IPv4 BPF rule age correctly am: e7dff2f955
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1751022

Change-Id: I8370822cd5c96e28b51a54759bced40d556fde84
2021-06-29 16:09:55 +00:00
TreeHugger Robot
1c4e80dfa3 [automerger skipped] Merge "Fix null PendingIntent in network listens" into sc-dev am: 4fd9dfef2d -s ours
am skip reason: Merged-In Id7343a4cc020aba16b7979b16334721c56b2839c with SHA-1 1e238a87e9 is already in history

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

Change-Id: I8971f72c545af5e2417ec7b23411c38abcbeed47
2021-06-29 13:48:23 +00:00
TreeHugger Robot
4fd9dfef2d Merge "Fix null PendingIntent in network listens" into sc-dev 2021-06-29 13:36:15 +00:00
Treehugger Robot
6da2b28e57 Merge "Revert "Skip connectivity unit tests before S"" am: b0c9e64d33 am: af5ae307f2
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749498

Change-Id: Ibacbb3f4ca829931b723893a1dd84a2d21de914e
2021-06-29 08:57:56 +00:00
Treehugger Robot
af5ae307f2 Merge "Revert "Skip connectivity unit tests before S"" am: b0c9e64d33
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749498

Change-Id: I33d31263acb4447d9ed730a4ec6d67fce77472fc
2021-06-29 08:42:14 +00:00
Victor Chang
f898bfefee [automerger skipped] Merge "Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests" into sc-dev am: e4132c8ca0 -s ours
am skip reason: Merged-In I5366e1cc9cd6ddb41f24718246381cc2b1cc1383 with SHA-1 fe20e1317d is already in history

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

Change-Id: I166c928f4b71d14bdda3f7f7697883f3bcefb42c
2021-06-29 08:40:54 +00:00
Hungming Chen
e7dff2f955 Dump the unused IPv4 BPF rule age correctly
Print a dash for the unused "lastUsed" of the rule.

The age should not equal the bootime if the rule has never been
updated the "lastUsed" field.

Format:
[inDstMac] iif(iface) src -> nat -> dst [outDstMac] age
[00:00:00:00:00:00] 14(rmnet0) 140.112.8.116:443
-> 30(30) 10.170.56.233:43720
-> 192.168.45.236:43720 [be:34:40:28:33:5f] -

Test: dumpsys tethering
Change-Id: Ie771becd2f72518cf02a86e5ae228315785752a5
2021-06-29 16:21:49 +08:00
Treehugger Robot
b0c9e64d33 Merge "Revert "Skip connectivity unit tests before S"" 2021-06-29 08:14:26 +00:00
Victor Chang
e4132c8ca0 Merge "Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests" into sc-dev 2021-06-29 08:12:04 +00:00
Paul Hu
dca7230c1d Use appId instead of uid
Multiple user's ares of mApps are not initialized in startMonitoring(),
so mApps.get(uid) of multi-user's app returns null in onPackageAdded().
As the result, permission of system uid is updated to "Network" and
any system application cannot use dedicated apn like IMS.
Using appId avoids this problem.

Bug: 168932048
Test: atest FrameworksNetTests

Signed-off-by: Sangcheol Lee <goodsc.lee@samsung.com>
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1733212
Merged-In: Ib8ea2185d8056bddb2ca5a8006f83afb3cffc9f4

Change-Id: Ib8ea2185d8056bddb2ca5a8006f83afb3cffc9f4
2021-06-29 16:07:54 +08:00
Remi NGUYEN VAN
4cb6189802 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
Original-Change: https://android-review.googlesource.com/1748153
Merged-In: Id7343a4cc020aba16b7979b16334721c56b2839c
Change-Id: Id7343a4cc020aba16b7979b16334721c56b2839c
2021-06-29 07:07:28 +00:00
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
Remi NGUYEN VAN
284b3c028c Revert "Skip connectivity unit tests before S"
This reverts commit 05dd1ba540.

Reason for revert: Skips more tests than it should in AOSP
Bug: 192302892

Change-Id: I7c5638d8c1cc626354d240a06af758e1cdd92e94
2021-06-29 01:08:00 +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
Remi NGUYEN VAN
819045fc60 Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests
It's a partial cherry-pick of https://r.android.com/1731232

Bug: 154796679
eest: atest ConnectivityCoverageTests
Merged-In: I5366e1cc9cd6ddb41f24718246381cc2b1cc1383
Change-Id: I23565c4144e665130585a86ce66cee6c2da07b60
2021-06-28 16:53:15 +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