Commit Graph

44262 Commits

Author SHA1 Message Date
Chiachang Wang
e0dfa2face Merge "Trigger the network score update after setting test allow bad wifi" am: 4bb141787b am: 91693952de am: 4143a2f97b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1751588

Change-Id: I4de90ec6772859a5c7fca7eac687d997955970f7
2021-06-30 14:45:46 +00:00
Chiachang Wang
4143a2f97b Merge "Trigger the network score update after setting test allow bad wifi" am: 4bb141787b am: 91693952de
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1751588

Change-Id: I3e544434c4ffeda7eab183f64f9c212ae162588f
2021-06-30 14:33:06 +00:00
Chiachang Wang
91693952de Merge "Trigger the network score update after setting test allow bad wifi" am: 4bb141787b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1751588

Change-Id: Ic9949766b84c1003f7f542aa9ca78d5535d01577
2021-06-30 14:24:32 +00:00
Chiachang Wang
4bb141787b Merge "Trigger the network score update after setting test allow bad wifi" 2021-06-30 14:14:03 +00:00
Paul Hu
4da8f09412 [automerger skipped] Merge "Use appId instead of uid" into sc-dev am: eefacbcb5c -s ours am: cee2b58834 -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: Icc45839b6042219d24facd441f5f4b5ea9016d64
2021-06-30 10:03:35 +00:00
Paul Hu
0905202af7 [automerger skipped] Merge "Use appId instead of uid" into sc-dev am: eefacbcb5c am: e15012586e -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: If328de573e9453f1dcfedbfce2aca5fbb9ba4dcc
2021-06-30 10:03:27 +00:00
Paul Hu
e15012586e Merge "Use appId instead of uid" into sc-dev am: eefacbcb5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15123902

Change-Id: I5ffb87c6a9bfc30899f0c7c4607758f28aa00443
2021-06-30 09:51:46 +00:00
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
a51823513e [automerger skipped] Merge "Enable tethering to perform its own hidden API processing" am: d8a8041ffc am: dd5ece3d19 -s ours am: 1ee498841d -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: I3a448cf5998b7e802b1c52794ac9fcc5032426fc
2021-06-30 09:00:34 +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
Chiachang Wang
f1e09ef031 Trigger the network score update after setting test allow bad wifi
Avoid bad wifi design has to apply in both wifi and cellular
networks. Cellular network should contain POLICY_YIELD_TO_BAD_WIFI
policy, then system default network could stay in the wifi after
wifi becomes unvalidated.

The testing API only update the value but not trigger the avoid
bad wifi callback to update the score in the existing cellular
network. Thus, if the cellular network is connected before
setting the overridden value, the yield to bad wifi policy will
not updated to cellular network. The system default network will
still switch from unvalidated wifi network to cellular network
even wifi network is connected with the avoid bad wifi policy.

Update to trigger a reevaluation to update the score in each
NetworkAgent in the ConnectivityService.

Bug: 192149168
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest\
      #testSetAvoidUnvalidated --rerun-until-failure 100
Change-Id: Ie0f777d0030b66dd306332496192c74f6c183284
2021-06-30 16:41:59 +08:00
Remi NGUYEN VAN
f920878bc1 Merge "Re-skip connectivity unit tests before S" am: a9230c1bf7 am: 1f3d8dc5e8 am: aec0e35349
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749684

Change-Id: I485a07ba29fd9297ed47275e6c540a50937e34f9
2021-06-30 08:36:58 +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
e18bdeb24a [automerger skipped] Merge "Add option to make sign-in notification ongoing" am: ea395bf6a0 am: 4154629272 -s ours am: 1032563615 -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: Ibc07b68c6b7cbc2f035d6aecfdc779cbeb8da892
2021-06-30 05:58:39 +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
81e193089f Dump the unused IPv4 BPF rule age correctly am: e7dff2f955 am: e9deba21ad am: a2a34a90d7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1751022

Change-Id: Ia533d227c66e228f93f5852b2ddeae3440a794c7
2021-06-29 16:36:40 +00: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
8a7b56c6a8 [automerger skipped] Merge "Fix null PendingIntent in network listens" into sc-dev am: 4fd9dfef2d -s ours am: 1c4e80dfa3 -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: I799216a77c448240c34a3827afbfea516f469f74
2021-06-29 14:02:11 +00:00
TreeHugger Robot
7349f5876d [automerger skipped] Merge "Fix null PendingIntent in network listens" into sc-dev am: 4fd9dfef2d am: f156d482f6 -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: I7fda2e9d6a0dea3af43f1780a38b81513843e837
2021-06-29 14:01:53 +00:00
TreeHugger Robot
f156d482f6 Merge "Fix null PendingIntent in network listens" into sc-dev am: 4fd9dfef2d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15136918

Change-Id: Ie000ca0d22891120f5dda8a8088596ef84f02005
2021-06-29 13:49:15 +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
2a86b04c86 Merge "Revert "Skip connectivity unit tests before S"" am: b0c9e64d33 am: af5ae307f2 am: 6da2b28e57
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1749498

Change-Id: Iebada4df31329177149ba73bd820869312ba413d
2021-06-29 08:58:03 +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
Victor Chang
28973c8dd2 [automerger skipped] Merge "Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests" into sc-dev am: e4132c8ca0 -s ours am: f898bfefee -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: Ia73304d2bb63ad0f2edcd09b4396c262a8e61e48
2021-06-29 08:57:53 +00:00
Victor Chang
9e360d16b5 [automerger skipped] Merge "Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests" into sc-dev am: e4132c8ca0 am: 25b288225b -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: I10f2769796cc170c3c3159a91d7a70cf253adac3
2021-06-29 08:57:35 +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
25b288225b Merge "Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests" into sc-dev am: e4132c8ca0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15108481

Change-Id: If24c0e920f55f5046fd2a93bfd16004c28f389df
2021-06-29 08:42:12 +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
d8e431c45d [automerger skipped] Merge "Fix flakes in tests running after testIsPrivateDnsBroken" into sc-dev am: 64168015f1 -s ours am: eceaeb3ea3 -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: I22a16d320ec500eda41e153c7ba15e4b5abc1356
2021-06-29 07:10:58 +00:00
Paul Duffin
76c8b61132 Merge "Enable tethering to perform its own hidden API processing" into sc-dev am: 4c94d16ced am: 65c5f4205b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15106963

Change-Id: I2ba42d5b6490053922f82928f0738f5785fdd469
2021-06-29 07:10:52 +00:00
Remi NGUYEN VAN
1f3e986044 [automerger skipped] Merge "Fix flakes in tests running after testIsPrivateDnsBroken" into sc-dev am: 64168015f1 am: f0a8dff500 -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: I52c6976f473aaa730e3df0b32ce1dddeefde2532
2021-06-29 07:10:38 +00:00
Paul Duffin
9a72823e9f Merge "Enable tethering to perform its own hidden API processing" into sc-dev am: 4c94d16ced am: 48edc6d921
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15106963

Change-Id: I70aaf23fd597c081c7f5f16cd0d075490bca65c8
2021-06-29 07:10:29 +00: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
f0a8dff500 Merge "Fix flakes in tests running after testIsPrivateDnsBroken" into sc-dev am: 64168015f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15135741

Change-Id: Ia82e72dce1742c122e711b4796db98feb6a53f24
2021-06-29 06:58:06 +00:00