Commit Graph

12255 Commits

Author SHA1 Message Date
Treehugger Robot
f147fdffb1 Merge "[FUI17] Migrate NetworkStatsService to use NetworkStateSnapshot" am: ed0127ce3d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556553

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2b19538843007e38e170163120f38477e4b76be8
2021-03-02 20:47:52 +00:00
Remi NGUYEN VAN
f8fd33cf04 Merge "Move OemNetworkPreferences aidl to connectivity" am: 3c943ca0f6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612038

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I11b9be22935b9fd7cf53b268103a1ce4635a6afd
2021-03-02 20:27:29 +00:00
Remi NGUYEN VAN
3ee3263696 Merge "Move UidRange to connectivity" am: 1c5e8b1def
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612295

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I672615b0804b9a9de4befa1ba5aea2efb9c962df
2021-03-02 20:24:20 +00:00
Treehugger Robot
bec11d94d5 Merge "Add modules-utils-os to service-connectivity" am: 512857e29a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612195

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I22df4afec8f8b5024d099966c0ca0f78b55ff08a
2021-03-02 20:19:24 +00:00
Treehugger Robot
89fbd41617 Merge "Replace checkNetworkStackPermission in TestNetworkService" am: 770e767210
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612194

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5dd6577a57be2234014527e3bd517b60c4fecb48
2021-03-02 20:16:39 +00:00
Remi NGUYEN VAN
0d78fe6fd8 Merge "Move Proxy, PacProxySelector out of Connectivity" am: ae0eb0a9a6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1598157

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id81273b33752ff353dfebdd2cd3faf43429f1a29
2021-03-02 19:52:58 +00:00
Remi NGUYEN VAN
8f88985427 Merge "Move SocketUtils out of the connectivity module" am: d856834f40
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1592273

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib2d4b5574ba710eb50c438144e2b87f6c8954336
2021-03-02 19:48:26 +00:00
Aaron Huang
72271fc971 Merge "Use the net-utils-device-common version of HexDump" am: aad33493a2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1607954

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1085391b5649df72b6664d5cdf1756c5110287dc
2021-03-02 19:42:02 +00:00
Lucas Lin
3292a54588 Merge changes I06ab0f2d,I8b146aa1 am: 125200718e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1596513

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0332bf0bf07a0a958c2e75b464d577021fd57746
2021-03-02 19:13:55 +00:00
Lucas Lin
9618198105 Merge changes I35ed84fc,Ie6cfd77b,I4e4f929f,I751526e8 am: 6a2bb12457
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1607733

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia438f937106645eb0d6cb91772d437676bf716fd
2021-03-02 19:08:57 +00:00
Treehugger Robot
ed0127ce3d Merge "[FUI17] Migrate NetworkStatsService to use NetworkStateSnapshot" 2021-03-02 13:21:32 +00:00
junyulai
de41fc2022 [FUI17] Migrate NetworkStatsService to use NetworkStateSnapshot
This change migrates NetworkStatsService and related code to use
NetworkStateSnapshot which is used for replacing the NetworkState.

This patch also changes some formating which is suggested by
the linter.

Test: FrameworksNetTests NetworkPolicyManagerServiceTest
Bug: 174123988
Change-Id: I547da8f411cb45bdadc376ac3cadf3f3c55bb282
2021-03-02 20:08:53 +08:00
Remi NGUYEN VAN
3c943ca0f6 Merge "Move OemNetworkPreferences aidl to connectivity" 2021-03-02 09:29:07 +00:00
Remi NGUYEN VAN
1c5e8b1def Merge "Move UidRange to connectivity" 2021-03-02 09:27:50 +00:00
Treehugger Robot
512857e29a Merge "Add modules-utils-os to service-connectivity" 2021-03-02 08:59:35 +00:00
Treehugger Robot
770e767210 Merge "Replace checkNetworkStackPermission in TestNetworkService" 2021-03-02 08:55:28 +00:00
Remi NGUYEN VAN
ae0eb0a9a6 Merge "Move Proxy, PacProxySelector out of Connectivity" 2021-03-02 07:49:00 +00:00
Remi NGUYEN VAN
d856834f40 Merge "Move SocketUtils out of the connectivity module" 2021-03-02 06:44:01 +00:00
Remi NGUYEN VAN
b2eabd4e7b Move UidRange to connectivity
UidRange is a data class that is an implementation detail of
Connectivity. Move it to the connectivity boundary.

Remaining usages of UidRange outside of Connectivity (in VPN) should be
migrated to other classes, like Range<Integer> or UidRangeParcel.

Bug: 181512874
Test: m
Change-Id: I6f2e3685ad1c07171dd90480d1e546329de8732d
2021-03-02 15:35:36 +09:00
Aaron Huang
aad33493a2 Merge "Use the net-utils-device-common version of HexDump" 2021-03-02 06:25:34 +00:00
Remi NGUYEN VAN
e419ef900a Move OemNetworkPreferences aidl to connectivity
Move the IOnSetOemNetworkPreferenceListener aidl definition to
framework-connectivity.
The interface is an internal implementation detail of
framework-connectivity, so it should be built inside the jar.

Bug: 181512874
Test: m
Change-Id: I898049b50fc620ee629587a9303f058e0a6d0272
2021-03-02 13:56:38 +09:00
Lucas Lin
125200718e Merge changes I06ab0f2d,I8b146aa1
* changes:
  Use UserHandle#getIdentifier to get the userid
  Add test for getStartUser(), getEndUser() and createForUser()
2021-03-02 04:13:32 +00:00
Lucas Lin
6a2bb12457 Merge changes I35ed84fc,Ie6cfd77b,I4e4f929f,I751526e8
* changes:
  Fix comments left on aosp/1547454 and aosp/1556106
  Remove INetworkManagementService from ConnectivityService
  Remove unused INetworkManagementService
  Remove BaseNetworkObserver from Nat464Xlat
2021-03-02 04:07:35 +00:00
Remi NGUYEN VAN
4c581d845a Add modules-utils-os to service-connectivity
service-connectivity needs the library so that module utilities are statically
linked, not picked up from the framework jar as hidden symbols.

Bug: 170598012
Change-Id: I1045b3784a4bdb902f44d848ccddb304986631c3
Test: m
2021-03-02 03:28:58 +00:00
Remi NGUYEN VAN
6efd0522b6 Replace checkNetworkStackPermission in TestNetworkService
Use the underlying PermissionUtils directly instead.

Bug: 178352309
Change-Id: I840a7b7d53531604a214b73f1f518b2ebb10e71e
Test: atest FrameworksNetTests
2021-03-02 02:27:42 +00:00
lucaslin
19a48b80d6 Use UserHandle#getIdentifier to get the userid
UidRange uses PER_USER_RANGE to calculate and get the userid,
but PER_USER_RANGE is a hidden API, so use getIdentifier to get
the userid instead.

Bug: 170598012
Test: atest FrameworksNetTests:UidRangeTest
Change-Id: I06ab0f2da8a33d2b718bbc3a609d3d6a5fe0a095
2021-03-02 02:21:39 +00:00
Remi NGUYEN VAN
348ac413ac Merge "Move QoS API classes to Connectivity" am: 32a606fe54
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1611876

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idad1f51e7f269c2cef9e836efa668a5a0afd4c5a
2021-03-02 01:28:59 +00:00
Remi NGUYEN VAN
cd45ee68cf Move Proxy, PacProxySelector out of Connectivity
PacProxySelector is tied to IProxyService, which does not have a formal
API.
Proxy is the interface with ConnectivityService, and all its methods are
public or module API.

Bug: 171540887
Test: m
Change-Id: I8ceba961a81661c3e11d8179955b594d3cab6ff7
2021-03-01 18:35:26 +09:00
Remi NGUYEN VAN
cb61701582 Move QoS API classes to Connectivity
The classes were added in S and are used to back ConnectivityManager
APIs. Add them to the connectivity boundary as they belong together with
ConnectivityManager.

Bug: 181512874
Test: m
Change-Id: I03b5978949b200a72813d1ebc4812d851fe3df37
2021-03-01 18:09:30 +09:00
Remi NGUYEN VAN
fc6869064c Move SocketUtils out of the connectivity module
SocketUtils contains system APIs for modules to interact for sockets,
wrapping internal APIs. It should be part of the platform to keep access
to the internal APIs.

This involves splitting NetworkUtils.protectVpn to NetworkUtilsInternal,
since SocketUtils and VpnService are the only users of that method.

The @UnsupportedAppUsage NetworkUtils.protectVpn has low usage
count, and is already available through VpnService.protect.

Bug: 181512874
Test: boots, VPN working
Change-Id: I7028d334975f7536c06afac7a22200c33db707ac
2021-03-01 16:50:08 +09:00
Remi NGUYEN VAN
e593f0a85a Merge "Split out the connectivity API surface" am: d799e71134
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552658

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6e51465cfeab43ff5f154771e2e22a7cd981d066
2021-03-01 02:10:04 +00:00
Remi NGUYEN VAN
d799e71134 Merge "Split out the connectivity API surface" 2021-03-01 01:07:19 +00:00
Junyu Lai
d70fb68230 Merge "[FUI08] Create NeworkStateSnapshot" am: f641e8c44c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536328

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If6f0e981228ef886496f55626b499f9c487af320
2021-02-26 11:30:53 +00:00
Junyu Lai
f641e8c44c Merge "[FUI08] Create NeworkStateSnapshot" 2021-02-26 10:53:36 +00:00
Remi NGUYEN VAN
be1791058f Split out the connectivity API surface
Split out connectivity APIs to connectivity module directories. This
prepares future move of the connectivity code into a mainline module,
but still keeps it implemented by framework-minus-apex for now: the API
stubs are moved to framework-connectivity.stubs, but the implementation
on device remains in the same place.

This allows moving the connectivity code in/out of APEX with minimal
changes.

BYPASS_INCLUSIVE_LANGUAGE_REASON=Moving files, can't modify released API

Bug: 171540887
Test: device boots, connectivity working

Merged-In: I21c42f032efa6c10e36c749df3183ce9679303a7
(cherry-pick from internal branch with API files conflicts)

Change-Id: I21c42f032efa6c10e36c749df3183ce9679303a7
2021-02-26 19:23:25 +09:00
Aaron Huang
b1bf756c8c Use the net-utils-device-common version of HexDump
KeepaliveTracker is included in ConnectivityService mainline
module and it will not be able to access internal util class
com.android.internal.util.HexDump. Use the HexDump defined in
net-utils-device-common to remove dependency on internal util
class.

Bug: 177046265
Test: FrameworksNetTests
Change-Id: I1f5a6a749106b98e2baf22d6a290dcf8b51a6c36
2021-02-26 07:10:19 +00:00
junyulai
74dcf1a32d [FUI08] Create NeworkStateSnapshot
Since NetworkState has UnsupportedAppUsage APIs that cannot
be changed, create another class for follow-up patches
to expose as system API.

Test: NetworkStateSnapshotTest
Bug: 174123988
Change-Id: I54ef872847f34166aa34a79f6178c90ac12b6c72
2021-02-26 11:57:06 +08:00
Junyu Lai
31893354d1 Merge "Fix copyright license of VpnTransportInfo" am: ff35256ebd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1607313

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifed529b4a91bb3c52acb3d1ce708a5999a2bb595
2021-02-26 03:56:16 +00:00
Junyu Lai
ff35256ebd Merge "Fix copyright license of VpnTransportInfo" 2021-02-26 03:38:59 +00:00
Remi NGUYEN VAN
28a0d9f352 Merge "Fix CaptivePortalDataTest on R" am: af593a6514
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1605013

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifbfed272ece8e1f4c437281fc6ca46de793520fe
2021-02-26 03:25:46 +00:00
Remi NGUYEN VAN
5cb7ff8c8e Merge "Add public alternative for protectFromVpn" am: cc595f8d17
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1605094

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I759af534bdf50f647351056275857c056998bf14
2021-02-26 03:22:03 +00:00
Remi NGUYEN VAN
af593a6514 Merge "Fix CaptivePortalDataTest on R" 2021-02-26 01:51:14 +00:00
Remi NGUYEN VAN
cc595f8d17 Merge "Add public alternative for protectFromVpn" 2021-02-26 01:50:32 +00:00
Chris Weir
1636f85cab Merge "Update tests for PANS network usage metrics" am: 2a6448ce32
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1578824

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8ac8031b7e405226a1b055be3c80eb902d48338b
2021-02-25 21:52:40 +00:00
Chris Weir
2a6448ce32 Merge "Update tests for PANS network usage metrics" 2021-02-25 21:37:42 +00:00
Paul Hu
48912f723c Merge "Use alternative PhoneStateListener formal API" am: 5f72702134
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554994

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I221f70b66e229c7209111227c40a0f4c0e616d85
2021-02-25 13:04:23 +00:00
Paul Hu
5f72702134 Merge "Use alternative PhoneStateListener formal API" 2021-02-25 12:14:53 +00:00
Junyu Lai
418c1867c8 Merge "[VCN07] Bypass VCN for non-internet app accessible cellular services" am: c8c6433b56
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1597954

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ied1e0628645c1320cf306fe508820cb80d03373a
2021-02-25 11:03:33 +00:00
lucaslin
aad3854ad9 Add test for getStartUser(), getEndUser() and createForUser()
- Follow-up commit will modify getStartUser() and getEndUser(),
to make sure the result is consistent, add test before changing
getStartUser() and getEndUser().
- Add a test for createForUser() to ensure the last uid of
the previous user is smaller than the first uid of the next user.
- Move this test file to tests/net/common, so that it can be run
in CTS.

Bug: 170598012
Test: atest FrameworksNetTests:UidRangeTest
      CtsNetTestCasesLatestSdk:UidRangeTest
      Also run above tests on Q and R devices.
Change-Id: I8b146aa14b50911e50a39f266e8d8dc17df853b2
2021-02-25 18:32:40 +08:00
Junyu Lai
c8c6433b56 Merge "[VCN07] Bypass VCN for non-internet app accessible cellular services" 2021-02-25 10:16:03 +00:00