Commit graph android_packages_modules_Co.../framework/src
Message SHA1
Merge "Implement Settings#checkAndNoteChangeNetworkStateOperation on CS" into sc-dev
Paul Hu   authored and   Android (Google) Code Review   commited 2021-03-02 13:03:13 +00:00
6a1e76ab95
Merge "Fix copyright license of VpnTransportInfo" am: 993c655bf3 am: 03a3a561b1 am: a39f3727f9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1607313

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibf6ba342dfbc92fc4852b96d1c3f3b3f34cc3322

Junyu Lai   authored and   Automerger Merge Worker   commited 2021-03-01 08:07:27 +00:00
e9abf0ed07
Merge "Add public alternative for protectFromVpn" am: a68e748601 am: c9ba0260a3 am: e1cdb63453
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1605094

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If0c46c990def1b6884a6008841f3d5bd912b8650

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-01 08:01:51 +00:00
bb12b0df41
Merge "Use alternative PhoneStateListener formal API" am: 4de7d07302 am: 6f12370cfc am: 340a4b0dc5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554994

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib176dcbf9d2d60f3f7393e50d765f296a83b77ce

Paul Hu   authored and   Automerger Merge Worker   commited 2021-02-26 17:25:40 +00:00
ced4d94c93
Merge "[VCN07] Bypass VCN for non-internet app accessible cellular services" am: ef906819f9 am: b25df9f6c7 am: d71c292044
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1597954

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iade334bfade0457afc6ab2806e481a5e0c85616c

Junyu Lai   authored and   Automerger Merge Worker   commited 2021-02-26 17:25:16 +00:00
d4ec0e4160
Merge "Fix copyright license of VpnTransportInfo"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-02-26 03:38:59 +00:00
993c655bf3
Merge "Add public alternative for protectFromVpn"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-02-26 01:50:32 +00:00
a68e748601
Merge "Use alternative PhoneStateListener formal API"
Paul Hu   authored and   Gerrit Code Review   commited 2021-02-25 12:14:53 +00:00
4de7d07302
Merge "[VCN07] Bypass VCN for non-internet app accessible cellular services"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-02-25 10:16:03 +00:00
ef906819f9
Fix copyright license of VpnTransportInfo
Test: TH
Bug: None
Change-Id: Id1fe2c62a0fd60b9833d8b00d2fa2ddc2f031004

junyulai   commited 2021-02-25 10:31:56 +08:00
50f96a50bc
Merge "APIs for 5G slicing" into sc-dev
Sarah Chin   authored and   Android (Google) Code Review   commited 2021-02-24 17:36:45 +00:00
414f1fd265
Add public alternative for protectFromVpn
The method is called directly by VpnService#protect.

Bug: 171540887
Test: m
Change-Id: I7cbb1ef1301dcf8d27b2cc39c0431a0156fe3442

Remi NGUYEN VAN   commited 2021-02-24 14:49:35 +09:00
caaa4df54c
Merge "Move shared methods to net shared lib" am: 36c58380fe am: 0367f91058 am: f3dec042fa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1571901

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0b7028aa8bb303edf27f4ff93f54a753d0b4ee78

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-02-24 01:08:24 +00:00
31175a3bed
Merge "Clean up T&C implementation" am: 27f44dc792 am: 23cce86e06 am: d9dc2f3a51
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1583505

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I35f732fbfa73d8b207c0e1b22595d2fd0135152c

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-02-24 00:19:18 +00:00
7678869a9a
Merge "Revert "Revert "Delete VPN methods in ConnectivityManager.""" am: 25e1524c60 am: e14979682a am: d06fbbb6f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1597635

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iff8ce4686f52a73c4a5a2d66218c9a6e3e883a3b

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-02-23 22:56:21 +00:00
f53acaa691
Implement Settings#checkAndNoteChangeNetworkStateOperation on CS
Connectivity is becoming a mainline module in S and
ConnectivityManager#enforceChangePermission is using
Settings#checkAndNoteChangeNetworkStateOperation for performing a
strict and comprehensive check of whether a calling package is
allowed to change the state of network. However, Mainline modules
are not allowed to use non-formal APIs, fortunately CS is the
only caller of this ConnectivityManager#enforceChangePermission.
Thus, implement the Settings API on ConnectivityService and remove
the ConnectivityManager#enforceChangePermission and
Settings#checkAndNoteChangeNetworkStateOperation.

Bug: 178565313
Test: atest FrameworksNetTests
Change-Id: I6f03398c1735b89470ad5bdbe3a036929daeb53c

paulhu   authored and   Paul Hu   commited 2021-02-23 08:33:01 +00:00
acae8dde4b
APIs for 5G slicing
Create TrafficDescriptor class
Create new APN ENTERPRISE
Update setupDataCall and DataCallResponse to take TrafficDescriptor and
matchAllRuleAllowed
Move ApnTypes from Annotation to ApnSetting

Bug: 179312227
Test: atest FrameworksTelephonyTests
Change-Id: I7433976bfe25bcb2af85ffb9338959cbcc9f42f3

Sarah Chin   commited 2021-02-22 21:58:07 -08:00
a5e4fc1359
Merge "Move shared methods to net shared lib"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-02-23 00:58:59 +00:00
36c58380fe
Merge "Clean up T&C implementation"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-02-22 19:58:43 +00:00
27f44dc792
Use alternative PhoneStateListener formal API
MultinetworkPolicyTracker is part of Connectivity mainline module
which cannot call @hide API to register PhoneStateListener. Thus,
replace it to formal API.

Bug: 171183530
Test: atest FrameworksNetTests
Change-Id: Ib02790623e82726aaada33f559226020d1e0019b

paulhu   commited 2021-02-22 14:31:58 +08:00
ec4738e48f
Merge "Revert "Revert "Delete VPN methods in ConnectivityManager."""
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-02-22 06:12:48 +00:00
25e1524c60
Revert "Revert "Delete VPN methods in ConnectivityManager.""
1. Stop using ConnectivityManager for VPNs in VpnDialogs.
2. Delete updateLockdownVpn, since all callers have been migrated
   to calling VpnManager directly.
3. Delete the call to VpnManager in factoryReset, since the only
   caller (ResetNetworkConfirm) has been updated to call into
   VpnManager directly.
4. Delete getVpnManager, since it is now unused.

This reverts commit 66ef4728a1.

Reason for revert: should be safe to submit now that aosp/1596096 is merged

Bug: 173331190
Test: treehugger
Change-Id: Ife3607c024006ce4fe46c981e9742170becb6331

Lorenzo Colitti   commited 2021-02-22 05:07:22 +00:00
684d3471eb
[VCN07] Bypass VCN for non-internet app accessible cellular services
Deduce the NET_CAPABILITY_NOT_VCN_MANAGED capability from other
capabilities and user intention, which includes:
   1. For the requests that don't have anything besides
      VCN_SUPPORTED_CAPABILITIES, add the NOT_VCN_MANAGED to
      allow the callers automatically utilize VCN networks
      if available.
   2. For the requests that explicitly add or remove
      NOT_VCN_MANAGED,  do not alter them to allow user fire
      request that suits their need.

Test: atest NetworkRequestTest#testBypassingVcnForNonInternetRequest
Bug: 175662146
Change-Id: I2876264cee14b624c89ba3b380027a8b521ad8ea
  (cherry-picked from aosp/1549817)

junyulai   commited 2021-02-22 10:19:16 +08:00
71d157f0e2
Merge changes I0a75c440,Ief9e8925,Ie03e8276,If0ac9a64,I716bd771 am: d55023c6e9 am: 634db1b9de am: 6468f11dcb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573943

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I52c41154ae3364774e63376fbdd5a9f42727b65f

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-02-20 05:04:03 +00:00
10423d3de1
Merge changes I0a75c440,Ief9e8925,Ie03e8276,If0ac9a64,I716bd771
* changes:
  [IT06]Move INetworkActivityListener into connectivity module
  [IT05] Remove the unused network activity logic out from NMS
  [IT4.7] Add network activity info into dumpsys for debugging
  [IT4.6] Unbundle NMS out from ConnectivityManager
  [IT4.5] Update radio power from CS directly

Chiachang Wang   authored and   Gerrit Code Review   commited 2021-02-20 02:02:46 +00:00
d55023c6e9
Merge "Revert "Delete VPN methods in ConnectivityManager."" am: 19261dd671 am: e14f718270 am: ea2109dfb4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1596592

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9d80ea1c572a3eec58a67b0d7c4faa79b30c206a

Nataniel Borges   authored and   Automerger Merge Worker   commited 2021-02-19 17:02:32 +00:00
cb251114d3
Merge "Delete VPN methods in ConnectivityManager." am: e66719e8ed am: bd53da5929 am: 9d99263e49
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1594171

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iadf429549b60f96c471a29fb91f12ff340c94cb0

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-19 17:01:44 +00:00
4786dccb26
Revert "Delete VPN methods in ConnectivityManager."
This reverts commit 2698d0c254.

Bug: 180710918
Reason for revert: Broken build 

Change-Id: I6e6318b4c01ccab27ca3e9f16bb2194aa1d9ffd2

Nataniel Borges   commited 2021-02-19 15:25:33 +00:00
66ef4728a1
Delete VPN methods in ConnectivityManager.
1. Stop using ConnectivityManager for VPNs in VpnDialogs.
2. Delete updateLockdownVpn, since all callers have been migrated
   to calling VpnManager directly.
3. Delete the call to VpnManager in factoryReset, since the only
   caller (ResetNetworkConfirm) has been updated to call into
   VpnManager directly.
4. Delete getVpnManager, since it is now unused.

Test: m
Bug: 173331190
Change-Id: I5d071281c0e36f6523fea10671a9abf994c66d66

Lorenzo Colitti   commited 2021-02-19 17:34:30 +09:00
2698d0c254
Merge "Use formal API for ActivityThread to set proxy"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-02-19 05:42:06 +00:00
86ecbddaf0
Use formal API for ActivityThread to set proxy
Add setHttpProxyConfiguration to the public API, and use
ConnectivityManager APIs from ActivityThread (instead of hidden APIs) to
get/set the proxy for an app process.

The default proxy is now initialized with getDefaultProxy instead of
getProxyForNetwork(null); this should not make a difference, as nothing
should have called bindProcessToNetwork at that point yet.

Bug: 174436414
Test: m; device boots
Merged-In: Ifb516194ecde1567cea4b6806946091cdcf2f015

Change-Id: I06b797eeae54609aecdc0afe1df4e6c602a17a69

Remi NGUYEN VAN   commited 2021-02-19 13:53:56 +09:00
9ff113bbe1
Merge "Split parcelable .aidl files to aidl-export"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-02-19 02:21:25 +00:00
75c728d254
[IT06]Move INetworkActivityListener into connectivity module
INetworkActivityListener is hidden and the only usage is inside
the connectivity module. Thus, move this into module scope.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I0a75c440c1daa773217bbd362b212fda4d07ec64

Chiachang Wang   commited 2021-02-18 12:03:21 +08:00
e9bc163a29
[IT4.6] Unbundle NMS out from ConnectivityManager
ConnectivityService is no longer to update idle timer to NMS but
send to INetd directly after this change. Replace the API
implementation in ConnectivityManager to refer into
ConnectivityService instead of NetworkManagementService to remove
the dependency between CM and NMS for ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: If0ac9a6427dba5a732a15b5d7ca1351b71b07b7b

lucaslin   authored and   Chiachang Wang   commited 2021-02-18 11:48:06 +08:00
a5e9bdbc3b
Split parcelable .aidl files to aidl-export
The one-line "parcelable X" files need to be imported by targets that do
not build against SDK (the SDK has prebuilt definitions), so prepare a
dedicated directory for them.
This avoids having users of the classes include the whole src/
directory, which could contain definitions for classes that are not part
of the public API, so should not be imported.

Also move back to frameworks/base/core some .aidl definitions that
were separated from their associated class.

Bug: 171540887
Test: m
Merged-In: I7432fe4c87cd3cab04dcb6185c9a4f3f84376549
Change-Id: I7432fe4c87cd3cab04dcb6185c9a4f3f84376549

Remi NGUYEN VAN   commited 2021-02-18 01:17:04 +00:00
d2107994d6
Merge "Split parcelable .aidl files to aidl-export" into sc-dev
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2021-02-18 01:16:10 +00:00
8a4cfc1e39
Merge "Expose TEST_TAP_PREFIX as system API" am: a23086c536 am: 37a204c54b am: 25951eaf9d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579503

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia3a9078ce1e823c4762e193cbc27b7ab7d8932a8

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-17 14:00:01 +00:00
6462a39929
Merge "Expose TEST_TAP_PREFIX as system API"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-02-17 12:28:56 +00:00
a23086c536
Merge "Do not depend on Tethering stubs in CM consts" am: b55fb561a8 am: 1fc4057bb0 am: 334df070a6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1589693

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie49e4f4e37439aab3ab1bd5e649c1d84cbc3ce8c

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-02-17 08:53:40 +00:00
6039c5aee8
Split parcelable .aidl files to aidl-export
The one-line "parcelable X" files need to be imported by targets that do
not build against SDK (the SDK has prebuilt definitions), so prepare a
dedicated directory for them.
This avoids having users of the classes include the whole src/
directory, which could contain definitions for classes that are not part
of the public API, so should not be imported.

Also move back to frameworks/base/core some .aidl definitions that
were separated from their associated class.

Bug: 171540887
Test: m
Change-Id: I7432fe4c87cd3cab04dcb6185c9a4f3f84376549

Remi NGUYEN VAN   commited 2021-02-17 16:12:49 +09:00
076dcdc403
Do not depend on Tethering stubs in CM consts
Tethering API stubs depend on connectivity stubs for classes like
MacAddress or LinkAddress, so connectivity stubs cannot depend on
Tethering stubs or there would be a circular dependency.

This means ConnectivityManager API surface cannot reference Tethering
API constants. Instead, use the literal in ConnectivityManager.

This means that both ConnectivityManager and TetheringManager specify
the constant value. An alternative considered was to have
TetheringManager depend on the ConnectivityManager constants, but
considering that ConnectivityManager only has some of the constants,
this would be more confusing. Breaking the constants by mistake is
unlikely as their values are part of the API surface, so will always be
in sync.

Bug: 171540887
Test: m
Change-Id: I16b6e1912fffc5ff8b3b392901d2357ffd213c72

Remi NGUYEN VAN   commited 2021-02-17 12:04:10 +09:00
23b853b06e
Clean up T&C implementation
Update the T&C variable names internally to user portal, to have
a consistent naming.

Bug: 162785447
Test: compiles - no logic changes
Change-Id: Ie9b0a2630952c2d82606c1ecd089b2131edbcefc

Hai Shalom   commited 2021-02-17 01:29:49 +00:00
c08f878dfc
Merge "[CS01]Remove hidden API usage of NetworkCapabilities" am: 5f2492095f am: a53e22a3e4 am: 20600a280e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1563495

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia2b32d56b4a00608b226c1d9b87b4e5b7818bd86

Frank Li   authored and   Automerger Merge Worker   commited 2021-02-16 04:13:05 +00:00
86becab99c
Merge "Move the VPN code out of packages/Connectivity." am: 125297acbf am: a4bb1e5c84 am: 8ff1082757
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1589331

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0acb8b9e93f839986aa6580832f1cdab12b3baf2

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-16 02:24:39 +00:00
601ccc3c52
Merge "Revert "[VCN07] Bypass VCN for non-internet app accessible cellu..."" am: 75049d8ec8 am: 0ee35089b7 am: 96f21fd65f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1585569

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I88648d8cab6081c178ecdd3b38935658a78b78dc

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-02-16 02:23:51 +00:00
2766d615e6
[CS01]Remove hidden API usage of NetworkCapabilities
The connection service will become the mainline module. The mutable
NetworkCapabilities is deprecated, and the NetworkCapabilities should
be built through their Builder instead.

Bug: 170598012
Test: atest FrameworksNetTests
Test: atest IpConnectivityMetricsTest
Change-Id: I73a4d3a7c118b9cef037ed52efb96ed123da2fa5

lifr   authored and   Frank Li   commited 2021-02-15 17:35:06 +00:00
08b7560748
Move the VPN code out of packages/Connectivity.
Bug: 173331190
Test: atest FrameworksNetTests HostsideVpnTests CtsNetTestCases
Change-Id: Idc6ed1a544e744f8661d1e387da278736d407489

Lorenzo Colitti   commited 2021-02-15 12:05:40 +00:00
1a56171616
Rename getVpnLockdownWhitelist to -Allowlist
Test: m
Change-Id: Id02a37624655c4ff88744c9c57af9f2a17953667
Merged-In: Id02a37624655c4ff88744c9c57af9f2a17953667

Lorenzo Colitti   commited 2021-02-15 12:04:13 +00:00
6cb08ce6d0
Merge "Revert "[VCN07] Bypass VCN for non-internet app accessible cellu...""
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-02-15 11:39:25 +00:00
75049d8ec8
Rename getVpnLockdownWhitelist to -Allowlist
Test: m
Bug: 173331190
Change-Id: Id02a37624655c4ff88744c9c57af9f2a17953667

Lorenzo Colitti   commited 2021-02-15 16:10:14 +09:00
ab9f06ebe0