Commit Graph

14920 Commits

Author SHA1 Message Date
Treehugger Robot
5c752b5aca Merge "Reference unreachable netId from INetd" am: 7c26f06ea1 am: 99054d066c am: 52dcdaf9ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708326

Change-Id: Ia8db25ba86450341d4b9278eba350014fa3b880c
2021-05-14 10:06:00 +00:00
TreeHugger Robot
4aa5b97ccb Merge "Address comments on ag/14486203" into sc-dev 2021-05-14 09:59:43 +00:00
Treehugger Robot
52dcdaf9ea Merge "Reference unreachable netId from INetd" am: 7c26f06ea1 am: 99054d066c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708326

Change-Id: I2f14897dda29c6ea4469952e56a0fa0e1c8a9a8f
2021-05-14 09:36:35 +00:00
Chiachang Wang
cc142fec4c Merge "Replace clearAll with withoutDefaultCapabilities" into sc-dev 2021-05-14 09:32:42 +00:00
Treehugger Robot
99054d066c Merge "Reference unreachable netId from INetd" am: 7c26f06ea1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708326

Change-Id: Iedbf9e9b150c95aa0da6a7b20af0dd1412703e2b
2021-05-14 08:39:18 +00:00
Chalard Jean
8e27d76e43 Address comments on ag/14486203
Bug: 186458024
Test: comment-only change
Change-Id: I7b086abbb57354086e8fb1a41c63140f2227173f
2021-05-14 17:31:30 +09:00
Chalard Jean
bdcc8678a1 Merge "Make yield-to-bad-wifi behavior backward compatible with R" into sc-dev 2021-05-14 08:21:27 +00:00
Treehugger Robot
7c26f06ea1 Merge "Reference unreachable netId from INetd" 2021-05-14 08:08:08 +00:00
Remi NGUYEN VAN
b31719df76 [automerger skipped] Merge "Move NetIdManager, ProfileNetworkPreferences" am: e0316b6018 am: b6084988b7 am: e2c64094eb -s ours
am skip reason: Merged-In I454e8a0a8d0e0f9e6d21a8e8faf5a9e299962ad4 with SHA-1 a146cf1de6 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705549

Change-Id: I15d4f795062ca5f44b9291e14c96e7fa6890e98a
2021-05-14 07:26:47 +00:00
Treehugger Robot
5575ee1b0e [automerger skipped] Merge "Move connectivity sources to packages/Connectivity" am: b249b941ee am: 0d6abb4b42 am: 1564e81540 -s ours
am skip reason: Merged-In I26d1a274058fa38763ad4f605549d880865b4d76 with SHA-1 c0b5ead56d is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1706845

Change-Id: Idf91bcf36f6e79ab7f5c91d9939a3b7f742d73dd
2021-05-14 07:26:24 +00:00
Remi NGUYEN VAN
e2c64094eb Merge "Move NetIdManager, ProfileNetworkPreferences" am: e0316b6018 am: b6084988b7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705549

Change-Id: I486b0d2759200a5a1bb9679577f5d97ea43c252b
2021-05-14 07:08:58 +00:00
Treehugger Robot
1564e81540 Merge "Move connectivity sources to packages/Connectivity" am: b249b941ee am: 0d6abb4b42
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1706845

Change-Id: Ia2b0715ed1f144216c1f64069757bf717a3f083f
2021-05-14 07:08:44 +00:00
Chiachang Wang
c5c3bfb20e Replace clearAll with withoutDefaultCapabilities
As the feedback from API review, the clearAll method in Builder
does not match the actual usage. Thus, remove it and replace
with withoutDefaultCapabilities to provide clearer usage.

Bug: 184735772
Test: make update-api ; m
Change-Id: Ida8d25d57504864f046e3403f593cc606fbfe982
CTS-Coverage-Bug: 186061922
2021-05-14 14:53:47 +08:00
Remi NGUYEN VAN
b6084988b7 Merge "Move NetIdManager, ProfileNetworkPreferences" am: e0316b6018
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705549

Change-Id: Ib8967ac75b038202430a74276a632b37973ed92b
2021-05-14 06:47:49 +00:00
Treehugger Robot
0d6abb4b42 Merge "Move connectivity sources to packages/Connectivity" am: b249b941ee
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1706845

Change-Id: Id619f74f84699c8f63edad37beb63537b7c06b3d
2021-05-14 06:41:07 +00:00
Ken Chen
69ed8430fa Reference unreachable netId from INetd
Bug: 181579204
Test: m; atest FrameworksNetTests
Change-Id: Id0d30363abe583459a8022e7400aab1dd4f72939
2021-05-14 14:30:43 +08:00
Chalard Jean
372a4f3eec Make yield-to-bad-wifi behavior backward compatible with R
Yielding cell wins to exiting wifi (whether good or bad).
It loses to bad wifi that's not exiting.

In R, yielding to bad wifi only affects wifis that are
unvalidated, but a wifi that is exiting should still be
dropped in favor of a cell that yields to bad wifi.

I had misunderstood the policy and implemented it wrong.
Now it's implemented right, and has careful tests.

Test: new tests for this
Bug: 186458024
Change-Id: Ib8637100d491e72a2edb837584ce55b7dda58524
2021-05-14 15:27:12 +09:00
Ken Chen
f590efa713 [automerger skipped] Merge "[DO NOT MERGE] Revert "Reference unreachable netId from INetd"" am: 3feeafcb4a am: b7130a2c65 am: d348117f40 -s ours
am skip reason: subject contains skip directive

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705391

Change-Id: I981f62347bf962ce71eeec2e2bdb7b2c25480a30
2021-05-13 19:11:57 +00:00
Ken Chen
15b83033f3 [automerger skipped] [DO NOT MERGE] Revert "Reference unreachable netId from INetd" am: d901acbdfb am: b9c8676b67 am: 67f453b86e -s ours
am skip reason: subject contains skip directive

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705391

Change-Id: I2d1439da5a0f0b527c424982c442e05354a35814
2021-05-13 19:11:46 +00:00
Ken Chen
d348117f40 Merge "[DO NOT MERGE] Revert "Reference unreachable netId from INetd"" am: 3feeafcb4a am: b7130a2c65
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705391

Change-Id: I1aeb8e966cc95ea4734a57855507c1b5534b1e1f
2021-05-13 19:01:39 +00:00
Ken Chen
67f453b86e [DO NOT MERGE] Revert "Reference unreachable netId from INetd" am: d901acbdfb am: b9c8676b67
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705391

Change-Id: I95422a1f422a6cff29f92eeb2506e9d9ac90c98f
2021-05-13 19:01:36 +00:00
Ken Chen
b7130a2c65 Merge "[DO NOT MERGE] Revert "Reference unreachable netId from INetd"" am: 3feeafcb4a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705391

Change-Id: I1662004b925d40bd84851ddef1d63654307e7862
2021-05-13 18:43:27 +00:00
Ken Chen
b9c8676b67 [DO NOT MERGE] Revert "Reference unreachable netId from INetd" am: d901acbdfb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705391

Change-Id: I9735b2c50de8899ca7c856ee02ade2fa3ec1a357
2021-05-13 18:41:12 +00:00
Remi NGUYEN VAN
15195d1a97 Move NetIdManager, ProfileNetworkPreferences
Move NetIdManager and ProfileNetworkPreferences from services/core to
packages/Connectivity/service.

This is a partial cherry-pick of a downstream change.

Bug: 186628461
Test: m
Merged-In: I454e8a0a8d0e0f9e6d21a8e8faf5a9e299962ad4
Change-Id: I6734c181dac39518b8d69be1e49d7f5f0a0a18da
2021-05-13 18:18:42 +00:00
Remi NGUYEN VAN
c72038a4c9 Move connectivity sources to packages/Connectivity
The service-connectivity sources should be in
packages/modules/Connectivity. Move them to
frameworks/base/packages/Connectivity, so that the whole directory can
be moved to the dedicated packages/modules/Connectivity git project.

Bug: 186628461
Test: m
Merged-In: I26d1a274058fa38763ad4f605549d880865b4d76
Change-Id: Ie0562db92ebee269b901926d763ae907bde61b98
2021-05-13 18:18:42 +00:00
Ken Chen
0fc7305a6f [automerger skipped] Merge "Reference unreachable netId from INetd" am: 64c2bc7165 am: 47e424ca26 am: 3a6663a2ff -s ours
am skip reason: skipped by user cken

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705386

Change-Id: I0e16151c72075f90790ffea71c02cbf0bc5c4690
2021-05-13 18:03:36 +00:00
Ken Chen
3feeafcb4a Merge "[DO NOT MERGE] Revert "Reference unreachable netId from INetd"" 2021-05-13 17:59:00 +00:00
Ken Chen
d901acbdfb [DO NOT MERGE] Revert "Reference unreachable netId from INetd"
This reverts commit 8a3400d134.

Reason for revert: Automerge conflict on sc-dev. The target file has been moved to other folder in sc-dev (ag/14516148). Revert this change and check-in again from AOSP bases on aosp/1706845.

Change-Id: I93a8bf4a3f59d789d88adceb3760c586b9951750
2021-05-13 17:40:51 +00:00
Remi NGUYEN VAN
8ad336f4b1 [automerger skipped] Merge "[NS04] Introduce Network Offers and their callbacks" am: d603e40fa5 am: 06e72bc268 am: b90fb723bd -s ours
am skip reason: Merged-In Idec1fe8eb4ac6f562bf098e3dd470f11024d04f2 with SHA-1 1ef1d90ee0 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556102

Change-Id: Idf45cf2f62c4ba2182f00ae2f05c150e0fdb6d21
2021-05-13 17:02:34 +00:00
Lorenzo Colitti
f130c6ddf0 [automerger skipped] Merge changes Ia5bc896c,I0c9406f4,I3108ee94 am: dff00cd42b am: e85055d0a8 am: 8ff101f540 -s ours
am skip reason: skipped by user lorenzo

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705389

Change-Id: Icc5d80d32409711650384577150e9d309788b001
2021-05-13 17:01:54 +00:00
Ken Chen
3a6663a2ff Merge "Reference unreachable netId from INetd" am: 64c2bc7165 am: 47e424ca26
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705386

Change-Id: Ia69ccfce2eec9bc5c71c10cf30b925cdecee1aac
2021-05-13 16:52:29 +00:00
Ken Chen
47e424ca26 Merge "Reference unreachable netId from INetd" am: 64c2bc7165
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705386

Change-Id: I522103bab137e3c1c8941d3611ccd968fdfdd781
2021-05-13 16:30:10 +00:00
Ken Chen
64c2bc7165 Merge "Reference unreachable netId from INetd" 2021-05-13 16:10:49 +00:00
Remi NGUYEN VAN
b90fb723bd Merge "[NS04] Introduce Network Offers and their callbacks" am: d603e40fa5 am: 06e72bc268
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556102

Change-Id: Ifc7c32e77a4aa7c183b0d074a8d04fe95a54d288
2021-05-13 15:52:52 +00:00
Lorenzo Colitti
8ff101f540 Merge changes Ia5bc896c,I0c9406f4,I3108ee94 am: dff00cd42b am: e85055d0a8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705389

Change-Id: Ie2c28214c2158f49b6282d398ac41038014972bf
2021-05-13 15:51:59 +00:00
Remi NGUYEN VAN
06e72bc268 Merge "[NS04] Introduce Network Offers and their callbacks" am: d603e40fa5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556102

Change-Id: Ifcdc55f7b202b9fe1ea10c9546c07d4563e9988c
2021-05-13 15:35:10 +00:00
Lorenzo Colitti
e85055d0a8 Merge changes Ia5bc896c,I0c9406f4,I3108ee94 am: dff00cd42b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705389

Change-Id: I30c22bae1e2df6497483fd863396f2abb6def278
2021-05-13 15:30:59 +00:00
Remi NGUYEN VAN
499925d594 Merge "Move connectivity sources to packages/Connectivity" into sc-dev 2021-05-13 15:22:20 +00:00
Remi NGUYEN VAN
d603e40fa5 Merge "[NS04] Introduce Network Offers and their callbacks" 2021-05-13 15:11:45 +00:00
Lorenzo Colitti
dff00cd42b Merge changes Ia5bc896c,I0c9406f4,I3108ee94
* changes:
  Make VcnTransportInfoTest pass on AOSP.
  Immediately redact VcnTransportInfo.
  Do not automatically redact TransportInfo objects.
2021-05-13 15:11:01 +00:00
Paul Hu
d3f33f364a Merge "Update mobile data preference getter/setter" am: d0b2ba479b am: 6d5c51149c am: 7e6d9da39e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702486

Change-Id: Ib55aaba8c8afc8a3152d83932bf345277bda35f9
2021-05-13 14:53:21 +00:00
Paul Hu
7e6d9da39e Merge "Update mobile data preference getter/setter" am: d0b2ba479b am: 6d5c51149c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702486

Change-Id: I950d4f95759fe17e2164014ab016d39d46ad5539
2021-05-13 14:29:43 +00:00
Paul Hu
6d5c51149c Merge "Update mobile data preference getter/setter" am: d0b2ba479b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702486

Change-Id: Ieb72b4f0284d5439f62037b9d68da054f276120d
2021-05-13 14:07:56 +00:00
Paul Hu
d0b2ba479b Merge "Update mobile data preference getter/setter" 2021-05-13 13:42:05 +00:00
Chalard Jean
97063fe5a1 [NS04] Introduce Network Offers and their callbacks
This patch introduces the concept of a network offer that
providers send to Connectivity to register for relevant
requests. This lets them see only requests that they can
hope to satisfy considering their capabilities and score
filters.

This is meant to replace the filtering mechanism currently
implemented by NetworkFactory. The reason for replacing
this mechanism is that the old mechanism does caps and
score filtering on the factory side, which requires these
two filters to be contextless and available system-wide,
including in separate processes from the system server.
These constraints severely limit and complexify in
particular what the score comparisons may look like. In
the past the score comparison was only integer-based,
making the code duplication not much of a problem, but as
this scheme is becoming unsustainable by spreading the
complexity of the selection across the entire stack, a
centralized mechanism is now necessary.

This patch only introduces the new objects and has CS
keep track of them, but does not actually use them yet.
Followup patches will implement the logic of calling
the offer callbacks.

Test: FrameworksNetTests NetworkStackTests FrameworksWifiTests
Bug: 167544279
Merged-In: Idec1fe8eb4ac6f562bf098e3dd470f11024d04f2
(clean cherry-pick)

Change-Id: Idec1fe8eb4ac6f562bf098e3dd470f11024d04f2
2021-05-13 13:20:43 +00:00
Remi NGUYEN VAN
c0b5ead56d Move connectivity sources to packages/Connectivity
The service-connectivity sources should be in
packages/modules/Connectivity. Move them to
frameworks/base/packages/Connectivity, so that the whole directory can
be moved to the dedicated packages/modules/Connectivity git project.

Bug: 186628461
Test: m
Change-Id: I26d1a274058fa38763ad4f605549d880865b4d76
2021-05-13 12:44:09 +00:00
Remi NGUYEN VAN
69cb94c88e [automerger skipped] Merge "Move net unit tests to packages/Connectivity" am: 5b48156498 am: 8c3d83c0cc am: 4f15e675cd -s ours
am skip reason: Merged-In I254ffd1c08ec058d594b4ea55cbae5505f8497cc with SHA-1 65b8995a15 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1706685

Change-Id: I8d08b8919e4b0dc129363e3e715374b22c4a3c0d
2021-05-13 12:08:41 +00:00
Remi NGUYEN VAN
4f15e675cd Merge "Move net unit tests to packages/Connectivity" am: 5b48156498 am: 8c3d83c0cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1706685

Change-Id: Ibe1d2241c37d2945d3e9278948d4fa614f05ae08
2021-05-13 11:51:45 +00:00
Remi NGUYEN VAN
8c3d83c0cc Merge "Move net unit tests to packages/Connectivity" am: 5b48156498
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1706685

Change-Id: I86852c79cf06a3bc7b7ccaa18d83f70a2043b258
2021-05-13 11:32:36 +00:00
Lorenzo Colitti
e61ffc1a50 Do not automatically redact TransportInfo objects.
Currently, NetworkCapabilities always redacts the TransportInfo
objects it contains whenever a defensive copy is made. This makes
it impossible to make a defensive copy on a TransportInfo
parcelled from another process without redacting it.

Stop redacting by default; instead rely on ConnectivityService
explicitly calling NetworkCapabilities' redacting constructor
when it returns a NetworkCapabilities object to an app via a
callback or synchronous call. This is currently done by
- createWithLocationInfoSanitizedIfNecessaryWhenParceled, which
  is called from callCallbackForRequest, getNetworkCapabilities,
  and getDefaultNetworkCapabilitiesForUser.
- getNetworkCapabilitiesWithoutUids, which is used when sending
  ConnectivityDiagnosticsManager callbacks. In this method,
  unconditionally redact all information, which is what the code
  did previously due to the default redaction setting for empty
  NetworkCapabilities objects being REDACT_ALL.

Bug: 183938194
Test: atest NetworkCapabilitiesTest
Test: atest FrameworksNetTests CtsNetTestCases HostsideVpnTests
Change-Id: I3108ee94cb0930958e071ba678c3554525b0db82
2021-05-13 20:24:19 +09:00