Commit Graph

6519 Commits

Author SHA1 Message Date
Chiachang Wang
6e7c4e7dc6 Merge "Address API review feedback" am: 4123af09c9 am: 1dedf4a69d am: af72438c7d am: 32f716b417
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976446

Change-Id: I9935a6a937d7e9cb953e68e34afa738598ed1ea5
2022-02-10 01:39:12 +00:00
Chiachang Wang
4123af09c9 Merge "Address API review feedback" 2022-02-10 00:50:30 +00:00
Treehugger Robot
5f07972554 Merge "Update VPN event strings for the IKE lib update" am: 5e7da1cfc4 am: 09831a1aaa am: e4e049c4f9 am: 6df12a625b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976226

Change-Id: I33e2fbae504bd3b01c71708ef94af956dbae7c12
2022-02-09 07:09:40 +00:00
Jean Chalard
993c5e1003 Merge "Allow VPN apps to ask for running the validation checks" am: cbb2fa2f00 am: 64ba50411e am: 1f929d9bd5 am: aac1b3a307
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1962928

Change-Id: Iab6157c17d9f4c6554ba65296443eec42dd21e71
2022-02-09 06:57:05 +00:00
Treehugger Robot
5e7da1cfc4 Merge "Update VPN event strings for the IKE lib update" 2022-02-09 06:28:39 +00:00
Chiachang Wang
7e34f92ab2 Address API review feedback
Change naming of getExcludeLocalRoutes and setExcludedLocalRoutes
APIs based on API review feedback.

Bug: 217742354
Test: atest FrameworksNetTests
Change-Id: Ia330b571726f93fb38dc24341cc6b748269ccb61
2022-02-09 14:28:12 +08:00
Jean Chalard
cbb2fa2f00 Merge "Allow VPN apps to ask for running the validation checks" 2022-02-09 06:03:45 +00:00
Lucas Lin
e7d6aeeb26 Merge "Add a new API startProvisionedVpnProfileSession()" am: f0524f1698 am: f6bf9b14d0 am: fed12c46a7 am: 6f1fdda01e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1906011

Change-Id: Iab1f1ace8f8685fc36dfce2e85bb36b2d2b2fb7b
2022-02-09 02:22:46 +00:00
Lucas Lin
f0524f1698 Merge "Add a new API startProvisionedVpnProfileSession()" 2022-02-09 01:12:03 +00:00
Chiachang Wang
3fc98d5ebd Allow VPN apps to ask for running the validation checks
Expose an API to allow VPNs app to ask for running the validation
check on the VPN network built from Ikev2VpnProfile.

Bug: 184750836
Test: New test in Ikev2VpnTest
      Also FrameworksNetTests
Change-Id: I385bb887b6c697d8f5d87af750dbd2aab44afca6
CTS-Coverage-Bug: 184750836
 (but CTS is in the same topic, just not detected by the tool)
2022-02-09 02:19:15 +09:00
Chalard Jean
87d4c529e0 Update VPN event strings for the IKE lib update
With a recent update, the IKEv2 library exposed the internal
errors happening on the link. This had us realize one error
code was a little bit ill-named and the other can't be exposed
because the system doesn't know about it happening.

Update the name of the events for this.

Test: m
Change-Id: I228b8309acbb5f599b908633923b16cd09e9c0af
2022-02-08 11:18:24 +09:00
Lorenzo Colitti
b5e914a343 Delete DhcpResults from frameworks/base.
This class is only used by NetworkStack, so move it to the
NetworkStack project.

Test: m
Change-Id: I356ee7b24613e84b8a90ddccd6d25d0742d13ae7
Merged-In: I356ee7b24613e84b8a90ddccd6d25d0742d13ae7
2022-02-07 06:03:11 +00:00
TreeHugger Robot
d44f10236a Merge changes from topic "no-dhcpresults"
* changes:
  [automerge] Delete DhcpResults from frameworks/base. 2p: a2ea37e61e
  Delete DhcpResults from frameworks/base.
2022-02-07 05:53:10 +00:00
Remi NGUYEN VAN
e839e63d21 Remove @hide usage and fix NetworkPolicy backup
Remove usage of hidden symbols for network stats APIs, replacing them
with public API alternatives.

Also fix backup of NetworkPolicy when the set of subscriber IDs is
empty. This as not caught because the test used a hidden API builder
that creates a non-empty set containing null.

Bug: 197717846
Test: atest FrameworksCoreTests
Change-Id: I45a98795c571ac97bd6025988da156bd06d57e45
2022-02-07 11:45:12 +09:00
TreeHugger Robot
72d07fb822 Merge "Ensure SubscriptionPlans can be removed" 2022-02-05 02:56:21 +00:00
Sarah Chin
e6f17feb77 Ensure SubscriptionPlans can be removed
Add a duration that the plans last and don't read to/write from disk
for plans. Make non-duration setSubscriptionPlans API deprecated.

Test: atest SubscriptionManagerTest, NetworkPolicyManagerServiceTest
Bug: 210696427
Change-Id: I93aece78eda324c333fbf9f1adbedcf46e4864f0
2022-02-04 15:49:10 -08:00
Presubmit Automerger Backend
d316c590ab [automerge] Delete DhcpResults from frameworks/base. 2p: a2ea37e61e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16781268

Change-Id: I7c98eeef9b2a92dbce1014ce51eaca19d19e40d8
2022-02-03 15:52:01 +00:00
Lorenzo Colitti
a2ea37e61e Delete DhcpResults from frameworks/base.
This class is only used by NetworkStack, so move it to the
NetworkStack project.

Test: m
Change-Id: I356ee7b24613e84b8a90ddccd6d25d0742d13ae7
2022-02-04 00:51:11 +09:00
TreeHugger Robot
3a241a4dc9 Merge "Update getSubscriptionPlans documentation" 2022-01-31 21:59:07 +00:00
Sarah Chin
8e5d992fa4 Update getSubscriptionPlans documentation
getSubscriptionPlans can return null if a plan has not been set for the
given subId yet. Change the annotation from @NonNull -> @Nullable and
update the documentation. SubscriptionManager#getSubscriptionPlans will
return the @NonNull plans instead.

Test: build
Bug: 213896944
Change-Id: I7b232a1a695d1db7cb0d0a177bb1090e9033b805
2022-01-31 18:16:54 +00:00
Junyu Lai
45e6bebaed Merge "[MS59.3] Expose NetworkStatsDataMigrationUtils" am: 853b6f6ede am: cfb860d019 am: 7cdd324483 am: 9beb86bd45
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1961599

Change-Id: Ie96aa4f519816b3c76f6f9e4dc2400070f4d326b
2022-01-29 05:26:20 +00:00
junyulai
07c4c8657d [MS59.3] Expose NetworkStatsDataMigrationUtils
Test: TH
Bug: 204830222
Change-Id: I15a45fbadeb69b70a0e983b00de9e934d29749d6
2022-01-28 11:03:53 +00:00
Chiachang Wang
dd512633c4 Merge "Expose local route exclusion APIs" am: 377dd020fe am: 8a26f53a68 am: 5417b89233 am: d9ff943b80
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1962799

Change-Id: I0331f6a0bfd41990ffd22d06eb2b62ddf2c7f612
2022-01-27 11:42:06 +00:00
Jean Chalard
43aee0df67 Merge "Support building Ikev2VpnProfile from an IkeTunnelConnectionParams" am: b083799699 am: 5f01f6cb66 am: e5550847ee am: 599fe55867
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1958911

Change-Id: I71891242e13bf3183c14e3a11969c16c38c3b3c9
2022-01-27 11:40:44 +00:00
lucaslin
110b5a96d5 Add a new API startProvisionedVpnProfileSession()
Add a new API to return a unique key corresponding to a specific
VPN session, so that when VPN sends ACTION_VPN_MANAGER_ERROR
intent, the app can know if this intent is sent for the session
that the app is using.

Bug: 191413541
Test: atest CtsNetTestCases
Change-Id: I372308f7f4d20acf3ea17a322bc5f39e0bac460f
2022-01-27 19:04:15 +08:00
Junyu Lai
8b33a21870 Merge "[MS59.1] Add NetworkStatsDataMigrationUtils" am: c428b10a74 am: a5beb8b8f9 am: b7a3ae056c am: 93feaa875e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1951480

Change-Id: Ieff101d7da2bdc533873b3ed1b63fb0c609243db
2022-01-27 10:47:40 +00:00
Chiachang Wang
377dd020fe Merge "Expose local route exclusion APIs" 2022-01-27 09:52:26 +00:00
Jean Chalard
b083799699 Merge "Support building Ikev2VpnProfile from an IkeTunnelConnectionParams" 2022-01-27 09:45:24 +00:00
Chiachang Wang
7e15818350 Expose local route exclusion APIs
Bug: 184750836
Test: make update-api
Test: atest FrameworksNetTests
Change-Id: I70470ab3a945570a23607e39d18f9825d9e1d7aa
CTS-Coverage-Bug: 184750836
2022-01-27 03:35:36 +00:00
Junyu Lai
44f61309c9 [MS59.1] Add NetworkStatsDataMigrationUtils
Once the data usage part moves into the module, the OEM would
lose the ability to modify the code, thus we need a mechanism
to prevent data loss during migration. Hence, provide a
helper class to read old version of persistent network
statistics, the implementation is intended to be modified
by OEM partners to accommodate their custom changes.

This interface will be invoked by NetworkStatsService during
the boot up phase in the migration process which will be
introduced in follow-up changes.

Test: atest NetworkStatsDataMigrationUtilsTest
Bug: 204830222
Change-Id: I4a9c8a04761b530ce0b31869f0d7fc191b00438f
2022-01-26 16:58:55 +00:00
Chiachang Wang
3981eb6376 Support building Ikev2VpnProfile from an IkeTunnelConnectionParams
Add a new builder constructor in Ikev2VpnProfile.Builder to allow
building Ikev2VpnProfile from a IkeTunnelConnectionParams object.

Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I586e7b24c35a777d39402148036d25606a733e85
CTS-Coverage-Bug: 184750836
2022-01-26 06:54:36 +00:00
William Escande
d422e42c86 Merge changes from topics "bluetooth-localsocket-from-filedescriptor", "localsocket-from-filedescriptor" am: 63c3c1f3d4 am: 35dda7049d am: ca3d992029 am: 89826ba131
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1959006

Change-Id: I8f981549f0a4bdcf04332fc1f05d1e12a6b1893f
2022-01-25 16:55:20 +00:00
Lorenzo Colitti
a9a140e2d4 Add a module-lib API for constructing a LocalSocket from an fd. am: 8093d78d1c am: 15bf48abb2 am: 39000cbc73 am: 40f1545d92
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954386

Change-Id: I83768a1f22fc70d004cb54548c8d2d99cecdaa4b
2022-01-25 16:54:49 +00:00
Lorenzo Colitti
15bf48abb2 Add a module-lib API for constructing a LocalSocket from an fd. am: 8093d78d1c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954386

Change-Id: I9fe0e6a22859a82b128b163bc1036712737aa946
2022-01-25 16:00:32 +00:00
William Escande
63c3c1f3d4 Merge changes from topics "bluetooth-localsocket-from-filedescriptor", "localsocket-from-filedescriptor"
* changes:
  Delete LocalSocket#createConnectedLocalSocket.
  Add a module-lib API for constructing a LocalSocket from an fd.
2022-01-25 15:41:08 +00:00
Lorenzo Colitti
d1c5580940 Delete LocalSocket#createConnectedLocalSocket.
The only caller of this method was BluetoothSocket, and that is
being removed in this topic.

Test: m
Bug: 200200870
Change-Id: Ic211448bc805c6f74852a8813317444bfb33c9dd
2022-01-25 10:01:04 +09:00
Yan Yan
9649474755 Merge "Improve the API doc for setVcnUnderlyingNetworkPriorities" am: b85c5d7634 am: e6286ba332 am: 59bb050977 am: 2580f4afc2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1945490

Change-Id: I567de4b56f6b92a1f0f28ca2da23924f84571db8
2022-01-24 19:59:08 +00:00
Yan Yan
b85c5d7634 Merge "Improve the API doc for setVcnUnderlyingNetworkPriorities" 2022-01-24 18:37:31 +00:00
Lorenzo Colitti
8093d78d1c Add a module-lib API for constructing a LocalSocket from an fd.
This allows constructing a LocalSocket from a FileDescriptor
referring to an already-connected socket. The LocalSocket can
then be used to exchange ancillary filedescriptors and fetch
peer socket credentials for the existing FD.

The fd is not dup'd or closed by the API, and the caller is
responsible for closing it. This is consistent with the
constructor of the related LocalServerSocket class, which also
takes an fd and does not manage its lifecycle.

Bug: 200200870
Test: atest CoreTests:android.net.LocalSocketTest CtsNetTestCases:android.net.cts.LocalSocketTest
Change-Id: I86448ba80475c4563194a4a2d9a0c0bbd0b76444
2022-01-25 00:56:44 +09:00
Xiao Ma
fd9fb85bc4 Merge "Move Ethernet related files to f/b/packages/ConnectivityT." am: 487a9cc8a4 am: bf089a8cd1 am: 738edf5e07 am: 33f4958b4b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1934465

Change-Id: I3c77b13525165ef3376b143485ad0a6671ce9ceb
2022-01-24 13:50:35 +00:00
Xiao Ma
824840d16d Move Ethernet related files to f/b/packages/ConnectivityT.
ethernet-service is going to be moved into Connectivity mainline module.
Notice that below sources are also only used in the ethernet framework
during compiling the filegroup: framework-connectivity-ethernet-sources.
Move them from f/b to f/b/packages/ConnectivityT as well.

Ethernet framework only related files:
    - IInternalNetworkManagementListener.aidl
    - InternalNetworkManagementException.java
    - InternalNetworkManagementException.aidl
    - InternalNetworkUpdateRequest.java
    - InternalNetworkUpdateRequest.aidl

Ethernet service only related files:
    - DelayedDiskWrite.java(IpConfigStore imports this class)

Bug: 210586283
Test: build pass
      atest FrameworksNetTests
      atest EthernetServiceTests
Change-Id: I1ec2d1d182c04f3f2acc9b757d5061ca749a4a3c
2022-01-24 04:15:14 +00:00
TreeHugger Robot
ce65b04d56 Merge "Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""" 2022-01-20 11:33:39 +00:00
Frank Li
34697ecc37 Merge "[DU04-1]Remove NetworkPolicyManagerInternal from NetworkStatsService" am: df246f3c62 am: ff2f7802ff am: c9925f1579 am: 0a6d11476e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1944531

Change-Id: If00a1cfb69196507582c6b491948d579a31543e1
2022-01-20 06:04:48 +00:00
Bernardo Rufino
1a5cb387d6 Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""
This reverts commit 331be9a643.

Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55).

Original commit message:

Migrate unsafe parcel APIs in framework-minus-apex

Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93
Test: TH passes
2022-01-19 11:13:18 +00:00
Frank Li
df246f3c62 Merge "[DU04-1]Remove NetworkPolicyManagerInternal from NetworkStatsService" 2022-01-19 05:32:05 +00:00
Junyu Lai
06230562eb Merge "[MS60] Remove TrafficStats.TAG_SYSTEM_APP dependency" am: 6dc2fbcf27 am: c8e96a462d am: 62658a4613 am: 4046bf7c75
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952098

Change-Id: Ie7d35aac370580f5bb20b33c167ba304b6c5ba0a
2022-01-18 01:00:20 +00:00
Junyu Lai
6dc2fbcf27 Merge "[MS60] Remove TrafficStats.TAG_SYSTEM_APP dependency" 2022-01-17 23:59:10 +00:00
lifr
c1d2e899ac [DU04-1]Remove NetworkPolicyManagerInternal from NetworkStatsService
Expose system APIs for use by NetworkStatsService.

Bug: 211843446
Test: atest NetworkStatsServiceTest NetworkPolicyManagerTest
            NetworkPolicyManagerServiceTest
Change-Id: I56a066b7f4b4c2c8fefdd185c2e50de63b1e2629
2022-01-18 03:16:51 +08:00
Junyu Lai
c4c1949aa2 [MS60] Remove TrafficStats.TAG_SYSTEM_APP dependency
Replace with system Api.

Test: TH
Bug: 204830222
Change-Id: If2ef0dbb058c4360f046b1c16fdf467594249b03
2022-01-17 16:18:18 +00:00
Frank Li
6aba4a879b Merge "[DU04]Remove NetworkPolicyManagerInternal from NetworkStatsService" am: d15c37c0e0 am: c1e289ceaf am: f1a2f28e75 am: 9efe853815
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1934459

Change-Id: Icc2aef5cb876439b1e8fd01eca75ceeb1394aac3
2022-01-16 00:23:04 +00:00