Commit Graph

635 Commits

Author SHA1 Message Date
Aaron Huang
9dc99ca54b Merge "Rename *Iface* APIs to *Interface*" am: 7bb6abb413 am: c0ad457264
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1693585

Change-Id: I9aa62677f52ac78916c518d1378a05bda143f676
2021-05-14 09:44:33 +00:00
Aaron Huang
c0ad457264 Merge "Rename *Iface* APIs to *Interface*" am: 7bb6abb413
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1693585

Change-Id: I62fa0403c8b2d78e7e7a90be8ac804576ec27456
2021-05-14 09:36:36 +00:00
Treehugger Robot
3bf71e4e85 Merge "Reference unreachable netId from INetd" am: 01be14fd53 am: 68413f8a69
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708326

Change-Id: I2f14897dda29c6ea4469952e56a0fa0e1c8a9a8f
2021-05-14 09:36:35 +00:00
Aaron Huang
7bb6abb413 Merge "Rename *Iface* APIs to *Interface*" 2021-05-14 09:11:29 +00:00
Treehugger Robot
68413f8a69 Merge "Reference unreachable netId from INetd" am: 01be14fd53
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708326

Change-Id: Iedbf9e9b150c95aa0da6a7b20af0dd1412703e2b
2021-05-14 08:39:18 +00:00
Treehugger Robot
01be14fd53 Merge "Reference unreachable netId from INetd" 2021-05-14 08:08:08 +00:00
Remi NGUYEN VAN
d116ced363 Merge "Move NetIdManager, ProfileNetworkPreferences" am: e0316b6018 am: 611cf21fd2
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
786cd4a19a Merge "Move connectivity sources to packages/Connectivity" am: b249b941ee am: a69e3de8bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1706845

Change-Id: Ia2b0715ed1f144216c1f64069757bf717a3f083f
2021-05-14 07:08:44 +00:00
Remi NGUYEN VAN
611cf21fd2 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
a69e3de8bb 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
4f612fae1f Reference unreachable netId from INetd
Bug: 181579204
Test: m; atest FrameworksNetTests
Change-Id: Id0d30363abe583459a8022e7400aab1dd4f72939
2021-05-14 14:30:43 +08:00
Aaron Huang
9ff12842da Rename *Iface* APIs to *Interface*
Address API review feedback, other APIs have been refering to
these as "interface" instead of "iface" so migrate the APIs named
*Iface* to *Interface*.

(cherry-picked from ag/14326779)
Bug: 183972554
Test: atest android.net.UnderlyingNetworkInfoTest
Merged-In: I38b476e762fb57fa88c4a789092d0af6f5330d80
Change-Id: I38b476e762fb57fa88c4a789092d0af6f5330d80
2021-05-14 11:05:22 +08:00
Remi NGUYEN VAN
c71c789184 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
cdb45f8e37 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
Remi NGUYEN VAN
6ae56eaf3f Merge "[NS04] Introduce Network Offers and their callbacks" am: 393e7b3d6a am: 02e05de21f
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
ae93b39b60 Merge changes Ia5bc896c,I0c9406f4,I3108ee94 am: e562d167a5 am: 3a22116ce4
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
02e05de21f Merge "[NS04] Introduce Network Offers and their callbacks" am: 393e7b3d6a
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
3a22116ce4 Merge changes Ia5bc896c,I0c9406f4,I3108ee94 am: e562d167a5
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
393e7b3d6a Merge "[NS04] Introduce Network Offers and their callbacks" 2021-05-13 15:11:45 +00:00
Lorenzo Colitti
e562d167a5 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
b6527ca6aa Merge "Update mobile data preference getter/setter" am: a035d3a77c am: a7d1ee6f5e
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
a7d1ee6f5e Merge "Update mobile data preference getter/setter" am: a035d3a77c
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
a035d3a77c Merge "Update mobile data preference getter/setter" 2021-05-13 13:42:05 +00:00
Chalard Jean
823f81c36e [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
78aa012678 Merge "Move net unit tests to packages/Connectivity" am: 5b48156498 am: 47152e05a6
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
47152e05a6 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
a869887d4f 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
paulhu
344c11661f Update mobile data preference getter/setter
To satisfy OEM's requests, setting mobile data preference
should be by uid. Thus, update the getter/setter to
return/accept set of uids that need to apply mobile data
preference.

Bug: 171872461
Test: atest FrameworksNetTests
Change-Id: Id44efd2a6d820867f4405426c91e65b9ef155898
2021-05-13 10:35:29 +00:00
Remi NGUYEN VAN
31022d6cda Move net unit tests to packages/Connectivity
Move the tests together with packages/Connectivity code, so both can be
moved to packages/modules/Connectivity together.

Also reorganize unit tests in a unit/ directory, as other tests
(integration/, common/ etc.) have been added in tests/net since they
were created. This makes the directory structure consistent.

Test: atest FrameworksNetTests
Bug: 187814163
Merged-In: I254ffd1c08ec058d594b4ea55cbae5505f8497cc

Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc
2021-05-13 08:30:33 +00:00
Paul Hu
7c3e361c2d Merge "Add RESTRICTED_ALLOWED_APPS setting" am: e6d2b4663e am: 7023fe8242
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1689208

Change-Id: I9a30162499954c4ec3bcd97233256f973662f7ab
2021-05-13 06:19:25 +00:00
Paul Hu
7023fe8242 Merge "Add RESTRICTED_ALLOWED_APPS setting" am: e6d2b4663e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1689208

Change-Id: I93c004e7356559436c7dbd95716e52db8fc1ba0d
2021-05-13 05:54:31 +00:00
paulhu
69afcd51db Add RESTRICTED_ALLOWED_APPS setting
This setting is OEM upstream requirement for third party apps
using restricted networks.

Bug: 185149952
Test: atests FrameworksNetTests
Change-Id: I5e16b46cf2935f38ee1e516bb8b85fa487cf9f61
2021-05-13 10:09:31 +08:00
Lucas Lin
bd90eed310 Merge "Update PrivateDnsMode from StringDef to IntDef" am: a23e55da49 am: da89f66c81
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675562

Change-Id: I0b2ad20c59397395175b82688cfe657af43a1b19
2021-05-12 17:59:57 +00:00
Lucas Lin
da89f66c81 Merge "Update PrivateDnsMode from StringDef to IntDef" am: a23e55da49
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675562

Change-Id: I391d8dd2615f090d3112af69248aea70e334f62f
2021-05-12 17:23:45 +00:00
Lucas Lin
a23e55da49 Merge "Update PrivateDnsMode from StringDef to IntDef" 2021-05-12 17:09:50 +00:00
Chalard Jean
a6b91aafee Merge "Allow any transport with TEST if the network is restricted" am: 6e80f1c182 am: 5fdbf4d6de
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702489

Change-Id: I8b42aa698f279774b8d5781811dc848c7d7ff713
2021-05-12 14:33:13 +00:00
Chalard Jean
5fdbf4d6de Merge "Allow any transport with TEST if the network is restricted" am: 6e80f1c182
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702489

Change-Id: Ic688c9d328242962c57631632b33236a69852ed6
2021-05-12 14:29:56 +00:00
Remi NGUYEN VAN
b86c71b25a Merge "Use jniThrowErrnoException from JNIHelp" am: 25a08f056f am: e92d0602f1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703087

Change-Id: I52864a1dff894d827e97332ce9ddd506ae297270
2021-05-12 14:25:42 +00:00
Remi NGUYEN VAN
d76107e54f Merge "Move NetworkUtils JNI out of core/jni" am: 954385ffac am: 3c157047e2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703086

Change-Id: Icc10740c6f18755a86d4f3cc9fb59bcb6a933910
2021-05-12 14:25:23 +00:00
Remi NGUYEN VAN
b51eefe6de Merge "Build framework-connectivity using module_current" am: eb0961067e am: d1104c9620
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703085

Change-Id: I47046e76bab062d0f887f2f965c054054acba0c5
2021-05-12 14:25:00 +00:00
Remi NGUYEN VAN
e92d0602f1 Merge "Use jniThrowErrnoException from JNIHelp" am: 25a08f056f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703087

Change-Id: I6a1d75a1792883a7dc96c1beb108e83653c668a0
2021-05-12 14:17:28 +00:00
Remi NGUYEN VAN
3c157047e2 Merge "Move NetworkUtils JNI out of core/jni" am: 954385ffac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703086

Change-Id: Icd812cda9e75015093080126bd20210034af5839
2021-05-12 14:13:20 +00:00
Remi NGUYEN VAN
d1104c9620 Merge "Build framework-connectivity using module_current" am: eb0961067e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703085

Change-Id: I67461b530e5292f94e3e1426ff0ec93ea657cf21
2021-05-12 14:05:55 +00:00
Chalard Jean
6e80f1c182 Merge "Allow any transport with TEST if the network is restricted" 2021-05-12 13:57:31 +00:00
Remi NGUYEN VAN
25a08f056f Merge "Use jniThrowErrnoException from JNIHelp" 2021-05-12 13:12:32 +00:00
Remi NGUYEN VAN
954385ffac Merge "Move NetworkUtils JNI out of core/jni" 2021-05-12 13:12:09 +00:00
Remi NGUYEN VAN
eb0961067e Merge "Build framework-connectivity using module_current" 2021-05-12 13:11:22 +00:00
Lorenzo Colitti
3823e673eb Merge "Rename unwanted capabilities to forbidden capabilities." am: 0d942e81c7 am: 245e5cbe2b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1687485

Change-Id: I9b8a61b4c4a0059af294c2575e5339e7e3b9f3ed
2021-05-12 09:56:38 +00:00
Lorenzo Colitti
245e5cbe2b Merge "Rename unwanted capabilities to forbidden capabilities." am: 0d942e81c7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1687485

Change-Id: Iaf8da730305ed7294cc624d4d41b0a11f2872863
2021-05-12 09:15:30 +00:00
Lorenzo Colitti
0d942e81c7 Merge "Rename unwanted capabilities to forbidden capabilities." 2021-05-12 09:00:17 +00:00