Commit Graph

13027 Commits

Author SHA1 Message Date
Treehugger Robot
1587b248cd Merge "[VCN21] Do not add NOT_VCN_MANAGED capability if specifier is present" am: d5fbc078d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705390

Change-Id: I0d8dd61da97e675ba70fd7dd5f1e889d8a2e54f7
2021-05-18 09:36:15 +00:00
Treehugger Robot
d5fbc078d1 Merge "[VCN21] Do not add NOT_VCN_MANAGED capability if specifier is present" 2021-05-18 08:35:06 +00:00
Chiachang Wang
7eaaaf6f1c Merge "Dump only NORMAL priority information if no priority assigned" am: f93d99deae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708333

Change-Id: I7c3bd130b67c40bb8be23073dbfa4aaf85624016
2021-05-18 02:37:13 +00:00
Chiachang Wang
987b73fbe0 Dump only NORMAL priority information if no priority assigned
The legacy design of "dumpsys connectivity" will only dump
information with NORMAL priority. It was updated to provide
both NORMAL and HIGH priority information in order to support
dump in bugreport. However, it will also affect the result
using dumpsys connectivity.

Update design to dump NORMAL priority only to align with legacy
design.

Bug: 188387185
Test: adb shell dumpsys connectivity
Test: adb bugreport and check the result in bugreport
Change-Id: I6825c5038e48e3060c0c3ad1512bd584ef6d10a7
2021-05-17 17:31:07 +08:00
Paul Hu
993aaedf1e Merge "Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer" am: accfb247b2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1689573

Change-Id: If352718bf7de1c6446f291710c2b114ffd57abc6
2021-05-17 07:31:32 +00:00
junyulai
59177af317 [VCN21] Do not add NOT_VCN_MANAGED capability if specifier is present
Test: atest NetworkRequestTest#testBypassingVcn
Fix: 176939355
Change-Id: I98dd3f4652dc067eb5c4666e952db6c854bcbb10
2021-05-17 07:04:13 +00:00
Paul Hu
accfb247b2 Merge "Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer" 2021-05-17 06:45:52 +00:00
Paul Hu
6d8b78770a Merge "Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitor" am: dec7232c75
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1689572

Change-Id: I5515f041b783e36ca439e2b7b1d77e93ee329be0
2021-05-17 03:28:16 +00:00
Paul Hu
dec7232c75 Merge "Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitor" 2021-05-17 03:04:59 +00:00
Chiachang Wang
d19bda6e8c Merge "Replace clearAll with withoutDefaultCapabilities" am: 98546082cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708330

Change-Id: Ibb29c90f818ca6f447d91f0eda0abe0ef82363dd
2021-05-17 02:29:35 +00:00
Chiachang Wang
98546082cc Merge "Replace clearAll with withoutDefaultCapabilities" 2021-05-17 01:56:52 +00:00
paulhu
0d9553a5c1 Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer
PermissionMonitor register APPS_ALLOWED_ON_RESTRICTED_NETWORKS
setting observer to listen setting changed callback. Then update
or revoke permission for those apps.

Bug: 185149952
Test: atest FrameworksNetTests
Change-Id: I4b6a21bd3f47b7bcaac36fcabf1202a5a84a4520
2021-05-16 15:52:36 +00:00
paulhu
5d847b19cd Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitor
Let PermissionMonitor read APPS_ALLOWED_ON_RESTRICTED_NETWORKS
setting and grant netd system permission to uids whose package
name is listed in setting.

Bug: 185149952
Test: atest FrameworksNetTests
Change-Id: I856b545c0339a262abbe9d432cfda125bc82dc12
2021-05-16 23:48:55 +08:00
Junyu Lai
c3fde912c6 Merge changes I3ba50cbd,I970ee365 am: 260b398281
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620859

Change-Id: I2cf4ea0abb1ff7bc74302cce16cbe8041b08d321
2021-05-15 16:53:30 +00:00
Junyu Lai
260b398281 Merge changes I3ba50cbd,I970ee365
* changes:
  [FUI29] Migrate ConnectivityService to use getAllNetworkStateSnapshots
  [FUI27] Fix internal naming of notifyNetworkStatus
2021-05-15 16:21:38 +00:00
Jayachandran Chinnakkannu
61736254b7 Merge "QOS filter matching support based on remote address and port number for connected sockets" am: fd92919d9d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1687813

Change-Id: Ibd70a86d82d4810425288694f2e3904d471a2d24
2021-05-14 20:28:38 +00:00
Jayachandran Chinnakkannu
fd92919d9d Merge "QOS filter matching support based on remote address and port number for connected sockets" 2021-05-14 20:02:30 +00:00
junyulai
565a3085ce [FUI29] Migrate ConnectivityService to use getAllNetworkStateSnapshots
Test: atest FrameworksNetTests
Bug: 174123988
Change-Id: I3ba50cbd8a7f60779c69ba85e10dc3cc8a52f8b1
2021-05-14 19:48:17 +08:00
junyulai
5eb5fbfce3 [FUI27] Fix internal naming of notifyNetworkStatus
Test: TH
Bug: 174123988
Change-Id: I970ee365ca221956ee85788005d331374b5fa71a
2021-05-14 19:48:17 +08:00
Junyu Lai
ee455cedce Merge "[FUI26] Address comments on aosp/1560408" am: 819b9a637e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1618845

Change-Id: Idde0e161d6241a5c45c0b751e1fca912ed10c7a8
2021-05-14 11:48:14 +00:00
Junyu Lai
819b9a637e Merge "[FUI26] Address comments on aosp/1560408" 2021-05-14 11:34:09 +00:00
Chiachang Wang
3267274176 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
Merged-In: Ida8d25d57504864f046e3403f593cc606fbfe982
2021-05-14 10:36:37 +00:00
Paul Hu
d0c08e3cd8 Merge "Address [set|get]RestrictedAllowedApps API review feedback" am: 38d6905614
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708327

Change-Id: I0c9966c379e956fbf8a01d81d5f1dd0e68662763
2021-05-14 10:25:37 +00:00
Paul Hu
38d6905614 Merge "Address [set|get]RestrictedAllowedApps API review feedback" 2021-05-14 10:00:39 +00:00
Aaron Huang
902c1df2d7 Merge "Rename *Iface* APIs to *Interface*" am: 666aa69090
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1693585

Change-Id: I62fa0403c8b2d78e7e7a90be8ac804576ec27456
2021-05-14 09:36:36 +00:00
Aaron Huang
666aa69090 Merge "Rename *Iface* APIs to *Interface*" 2021-05-14 09:11:29 +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
Treehugger Robot
7c26f06ea1 Merge "Reference unreachable netId from INetd" 2021-05-14 08:08:08 +00:00
junyulai
bad30368d4 [FUI26] Address comments on aosp/1560408
Test: TH
Bug: 174123988
Change-Id: I949eeb8903e903d8ede90521442b1f917d5cdfeb
2021-05-14 15:57:44 +08:00
paulhu
65de9957a1 Address [set|get]RestrictedAllowedApps API review feedback
- Rename [set|get]RestrictedAllowedApps to
  [set|get]AppsAllowedOnRestrictedNetworks
- Remove the regex of validate package name check

Bug: 188085693
Test: m update-api && m
Change-Id: I07966fb66093523a67e1e6a1ecfa05cc399e22f2
2021-05-14 15:27:36 +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
Aaron Huang
8dd94bdcef 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
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
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
Jayachandran C
eab334d00a QOS filter matching support based on remote address and port number for connected sockets
This CL adds APIs for telephony to perform filter matching based on
remote address if the socket is connected. Additional checks will be
performed on the state of socket to avoid the future callbacks in a
separate CL.

Bug: 181916576
Test: Manually verified in live T-Mobile network
      atest ConnectivityServiceTest
      atest com.android.internal.telephony.dataconnection.QosCallbackTrackerTest

Change-Id: I6fbd4e84c76bc4acbf4e59f06f8e86e0237bae29
2021-05-13 09:50:13 -07: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
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
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
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