Commit graph android_packages_modules_Co.../framework
Message SHA1
Merge "[FUI22] Support getAllNetworkStateSnapshot" am: 4c73e05c1d am: 773a813dc2 am: ee3fc01443
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1614779

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I52f8339bd1cda35a3f26f28fd3c0165f6f6ff91e

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-03-05 07:10:46 +00:00
d175285e54
Emphasize possibility of multiple networks with same transport
Bug: 180125982
Test: compiles
Change-Id: I70d312c29b7d7b773ebb8d70043f239a6c1aae15

David Su   commited 2021-03-05 01:21:21 +00:00
43042a95cd
Move NetworkState to Connectivity
NetworkState is becoming an internal implementation class, with
NetworkStateSnapshot replacing it as a proper API. Considering this it
belongs inside Connectivity.

Bug: 174123988
Test: m
Change-Id: I201f1a07c50d9da31e33f5c207875da8863ef57c

Remi NGUYEN VAN   commited 2021-03-05 08:56:55 +09:00
919a491443
[FUI22] Support getAllNetworkStateSnapshot
Currently, ConnectivityService has getAllNetworkState but it is
not ideal to expose as system API since the plan is to get rid
of NetworkState. Thus, create a new one that returns
NetworkStateSnapshot to fulfill the needs.

Note the original getAllNetworkState cannot be deleted now since
it has @UnsupportedAppUsage annotation.

Test: atest FrameworksNetTests
Bug: 174123988
Change-Id: Icddd434552b0e9ecbc8299e7242ec88cf3145aca

junyulai   commited 2021-03-04 18:41:09 +08:00
b12113700c
Merge "[CS05]Remove the hidden API usage of MetricsLogger" am: 4297526f8b am: 7f3280692c am: 8faf9990e6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612039

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2d784ac885ffcbc7a4539cf6e5b4774af5c11c43

Frank Li   authored and   Automerger Merge Worker   commited 2021-03-04 05:08:28 +00:00
5d4495deb8
Replace withCleanCallingIdentity with [clear|restore]CallingIdentity
To prevent using @hide method - withCleanCallingIdentity() from
mainline module, use clearCallingIdentity() &
restoreCallingIdentity() instead.

Bug: 172183305
Test: FrameworksNetTests, CtsNetTestCasesLatestSdk
Change-Id: I8221bb8717ba6809c5087ea2808cd4ccef948cfd

lucaslin   commited 2021-03-04 09:38:21 +08:00
eaff72d544
Merge "[CS05]Remove the hidden API usage of MetricsLogger"
Frank Li   authored and   Gerrit Code Review   commited 2021-03-04 01:34:53 +00:00
4297526f8b
Use ArraySet#add() instead of ArraySet#append()
ArraySet#append() is a hidden API which is not accessible for
mainline module, use public one - ArraySet#add() instead.

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

lucaslin   commited 2021-03-04 09:29:30 +08:00
d9264b1fa3
[CS05]Remove the hidden API usage of MetricsLogger
Legacy metrics are unused and deprecated, so they are being removed.
Therefore, delete the usage of the hidden MetricsLogger API.

Bug: 157966864
Test: atest CtsNetTestCases
      atest CaptivePortalTest
      atest ConnectivityServiceTest
Change-Id: I51241f5d50ec580015882c84dd917b015c700c7c

lifr   authored and   Frank Li   commited 2021-03-03 10:17:52 +00:00
1c7789742b
[Telephony] Use TelephonyCallback instead of PhoneStateListener part1
Since the redesign of PhoneStateListener, use TelephonyCallback to get the callback of EVENT_*

Bug: 167684594
Test: make
Change-Id: Ia3b777b12142b104b5798804f50b34748f9bf28c

Zoey Chen   commited 2021-03-03 13:25:54 +08:00
68d60cdb1a
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
Merged-In: I7433976bfe25bcb2af85ffb9338959cbcc9f42f3

Sarah Chin   authored and   Chalard Jean   commited 2021-03-03 14:16:21 +09:00
ae9a64d7da
Merge "Implement Settings#checkAndNoteChangeNetworkStateOperation on CS"
Paul Hu   authored and   Gerrit Code Review   commited 2021-03-03 01:07:20 +00:00
1ea28296e6
Merge "Move OemNetworkPreferences aidl to connectivity" am: 4daa02ee79 am: 1063e9ff33 am: e268e877c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612038

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib37a92a20b907faed245cca914b46be9b8c1e7fb

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-02 21:09:58 +00:00
ed29c2cf8d
Merge "Move UidRange to connectivity" am: f251c52efb am: c46edc6c24 am: 6dd910c726
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612295

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie9d41595a21c494931e9bf45bfc4e8b2aa9803f3

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-02 21:09:32 +00:00
6fd9e1b31d
Merge "Move Proxy, PacProxySelector out of Connectivity" am: a103c450bc am: 694f952a30 am: a7005ec455
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1598157

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib253a7ccf3beb8e9e5d0988db3d0662074dedda7

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-02 20:37:24 +00:00
eb0cc323ce
Merge "Move SocketUtils out of the connectivity module" am: e467f13ace am: 3c2c63e525 am: 1efb1bf4a8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1592273

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9de14464ebb9d43e7c4fdc683c23ddbbcc7ef269

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-02 19:56:48 +00:00
32e2c767fe
Merge "Move QoS API classes to Connectivity" am: 32a606fe54 am: c535ef183f am: 045c615bb2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1611876

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8b7416a1d5c8103415246016f43dddc932d0be2b

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-02 19:53:40 +00:00
3d6cee3c7d
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
324ccfa064
Merge "Move OemNetworkPreferences aidl to connectivity"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-03-02 09:29:07 +00:00
4daa02ee79
Merge "Move UidRange to connectivity"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-03-02 09:27:50 +00:00
f251c52efb
Merge "Move Proxy, PacProxySelector out of Connectivity"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-03-02 07:49:00 +00:00
a103c450bc
Merge "Move SocketUtils out of the connectivity module"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-03-02 06:44:01 +00:00
e467f13ace
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

Remi NGUYEN VAN   commited 2021-03-02 15:35:36 +09:00
5115480e8f
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

Remi NGUYEN VAN   commited 2021-03-02 13:56:38 +09:00
24d950ce5a
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

Remi NGUYEN VAN   commited 2021-03-01 18:35:26 +09:00
a1433566fe
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

Remi NGUYEN VAN   commited 2021-03-01 18:09:30 +09:00
070ff8bb9c
Merge "Fix copyright license of VpnTransportInfo" am: 9b9f823f11 am: f83741d25d am: bc88904010
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
b083e81f73
Merge "Add public alternative for protectFromVpn" am: 0c04e41e7b am: 14b6af4431 am: e456ac2061
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
fb559351e4
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

Remi NGUYEN VAN   commited 2021-03-01 16:50:08 +09:00
1e29080037
Merge "Split out the connectivity API surface"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-03-01 01:07:19 +00:00
306da2a1b5
Merge "Use alternative PhoneStateListener formal API" am: 73e1c90697 am: 181827f862 am: 5611936630
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
40435af9f7
Merge "[VCN07] Bypass VCN for non-internet app accessible cellular services" am: 8be73b451f am: 1dda31390d am: 54319cbd0a
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
85393f6b78
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

Remi NGUYEN VAN   commited 2021-02-26 19:23:25 +09:00
f15fc7f9a8
Merge "Fix copyright license of VpnTransportInfo"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-02-26 03:38:59 +00:00
9b9f823f11
Merge "Add public alternative for protectFromVpn"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-02-26 01:50:32 +00:00
0c04e41e7b
Merge "Use alternative PhoneStateListener formal API"
Paul Hu   authored and   Gerrit Code Review   commited 2021-02-25 12:14:53 +00:00
73e1c90697
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
8be73b451f
Fix copyright license of VpnTransportInfo
Test: TH
Bug: None
Change-Id: Id1fe2c62a0fd60b9833d8b00d2fa2ddc2f031004

junyulai   commited 2021-02-25 10:31:56 +08:00
5f658cbb9b
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

Change-Id: I21c42f032efa6c10e36c749df3183ce9679303a7

Remi NGUYEN VAN   commited 2021-02-25 11:01:24 +09:00
11b5a5cc71
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
983abe47bb
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
5b1411c636
Merge "Move shared methods to net shared lib" am: 6a67b78d2b am: 5ca975bf07 am: 4529181d4f
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
f823bbc5ff
Merge "Clean up T&C implementation" am: 1b3cd84d1c am: 6a810afd15 am: 064b340c56
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
de371923c9
Merge "Revert "Revert "Delete VPN methods in ConnectivityManager.""" am: 10de86f5e5 am: bdbd425a3b am: ec81e831f6
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
33ae237686
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
Merged-In: I6f03398c1735b89470ad5bdbe3a036929daeb53c

paulhu   authored and   Paul Hu   commited 2021-02-23 08:35:38 +00:00
bb0277e7e6
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
3ba84e60f9
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
e7ec282eee
Merge "Move shared methods to net shared lib"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-02-23 00:58:59 +00:00
6a67b78d2b
Merge "Clean up T&C implementation"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-02-22 19:58:43 +00:00
1b3cd84d1c
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
4aad90f1b1