Commit Graph

6488 Commits

Author SHA1 Message Date
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
Frank Li
d15c37c0e0 Merge "[DU04]Remove NetworkPolicyManagerInternal from NetworkStatsService" 2022-01-15 23:14:16 +00:00
Aaron Huang
357b2c0570 Merge "Add PolicyDirection InfDef annotation to IpSecManager" am: 3498c7a5cc am: 90d6cafc8a am: b0b2e115e2 am: c3de62bb58
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1928465

Change-Id: I757c9e684b9d1077573b6b705b151925a342e1cc
2022-01-15 07:13:24 +00:00
Aaron Huang
3498c7a5cc Merge "Add PolicyDirection InfDef annotation to IpSecManager" 2022-01-15 06:08:32 +00:00
lifr
0bd4952f49 [DU04]Remove NetworkPolicyManagerInternal from NetworkStatsService
NetworkStatsService is using NetworkPolicyManagerInternal APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.

Bug: 211843446
Test: atest NetworkStatsServiceTest NetworkPolicyManagerTest
            NetworkPolicyManagerServiceTest
Change-Id: I0f3f02d1dc014967fab27ffcf37dd1918dbef5e0
2022-01-15 14:06:31 +08:00
Benedict Wong
8161eee7af Merge changes I61c84693,I929428f7 am: e6b79e2923 am: d00c6818dd am: 83bdc37516 am: c7ce11cd64
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925501

Change-Id: I36f0b3338f0f27be217d12258aed90438f7d297f
2022-01-14 18:18:47 +00:00
Benedict Wong
e6b79e2923 Merge changes I61c84693,I929428f7
* changes:
  Expose entry/exit bandwidth criteria APIs for VCN templates
  Add minimum required bandwidth to network templates
2022-01-14 17:12:13 +00:00
Yan Yan
6391ebe715 Improve the API doc for setVcnUnderlyingNetworkPriorities
Bug: 205343355
Test: make
Change-Id: Ib1cb4b2e05f1e769b4ccb4a45b6abd7589d35a07
2022-01-13 16:39:39 -08:00
Treehugger Robot
a6d19a4b0b Merge "Add constants of VpnManager events" am: 3cca242ec3 am: b4c82c6f3a am: af3813a332 am: b7260a552a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899036

Change-Id: I88680d5e269e912099919f0693d172e2317942cf
2022-01-13 20:49:53 +00:00
Treehugger Robot
3cca242ec3 Merge "Add constants of VpnManager events" 2022-01-13 19:40:03 +00:00
lucaslin
7cb77f7347 Add constants of VpnManager events
Bug: 191413541
Test: N/A
Change-Id: I1db1419d701940ba74b59f61d510878f08e64c91
2022-01-13 08:19:14 +00:00
Benedict Wong
073e1ac89b Expose entry/exit bandwidth criteria APIs for VCN templates
This change adds additional criteria for bandwidth in both the
upstream and downstream directions, ensuring that a minimum quality
bar can be guaranteed for VCN underlying networks. Both directions
support separate entry/exit criterion to allow for hysteresis.

Bug: 205343355
Test: atest FrameworksVcnTests
CTS-Coverage-Bug: 209498272
Change-Id: I61c8469380551e673d91f9a4428d21a40f164841
2022-01-13 05:44:56 +00:00
Benedict Wong
ee22e0d57d Add minimum required bandwidth to network templates
This change adds a minimum required bandwidth to the VCN network
templates, ensuring that a minimum bar of throughput can be required of
underlying networks.

Bug: 211008106
Test: atest FrameworksVcnTests
Change-Id: I929428f75e5e543966a03061d13f300dd8b0956f
2022-01-13 05:35:50 +00:00
Aaron Huang
314e2b37f2 Add PolicyDirection InfDef annotation to IpSecManager
IpSec is going to be moved into Connectivity module and it needs to
use PolicyDirection annotation. Add PolicyDirection IntDef annotation
so that it can be used in the module.

Bug: 204153604
Test: FrameworksNetTests
Change-Id: Ib411d8c436d67574bfaf7f3aba43e5f31e7487e2
2022-01-13 10:43:54 +08:00
Ashwini Oruganti
776b439703 Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex"" 2022-01-12 23:07:08 +00:00
James Mattis
3099eade93 Merge "Making NetworkCapabilities @NonNull" am: 1f21e4acf4 am: e8fb563c9a am: ff27afbc45 am: 05426db34d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1941593

Change-Id: I113520a4859c4b5b2bb375346a440ba0cd46126a
2022-01-12 18:35:27 +00:00
Bernardo Rufino
331be9a643 Revert "Migrate unsafe parcel APIs in framework-minus-apex"
This reverts commit 90bb3709dc.

Reason for revert: b/214053959

Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
2022-01-12 17:44:44 +00:00
James Mattis
1f21e4acf4 Merge "Making NetworkCapabilities @NonNull" 2022-01-12 17:43:22 +00:00
Taras Antoshchuk
739eaf1cb9 Merge "Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."" am: bc8f256721 am: 8c3fa67bbd am: 3dafac7b7c am: 0b4f3bd970
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938732

Change-Id: Ie70c2e45055fbc85d083c94f510e6c223ac8dcf1
2022-01-12 16:15:15 +00:00
Taras Antoshchuk
bc8f256721 Merge "Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."" 2022-01-12 15:27:30 +00:00
Benedict Wong
d29b133e24 Merge changes Ib7d51cf1,I92bd2831 am: 179826efdc am: 934206376c am: 1cf64f23de am: 00429ea809
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1909600

Change-Id: If73744bfb0bb0b2c11a7fa859f7057e69fd36805
2022-01-12 06:42:01 +00:00
Benedict Wong
179826efdc Merge changes Ib7d51cf1,I92bd2831
* changes:
  Expose APIs to configure underlying network priority
  Update setter/getters to configure underlying network priority
2022-01-12 05:21:03 +00:00
Jean Chalard
ea803f670f Merge "Add documentation about VpnProfile#setExcludeLocalRoutes" am: 649c2ea2d2 am: 95535fcf1d am: 9cc469b54e am: 5524a9c92c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1944533

Change-Id: I53e9d50dd0aafb847c4d2abec1c8932965c56987
2022-01-12 02:47:50 +00:00
Jean Chalard
649c2ea2d2 Merge "Add documentation about VpnProfile#setExcludeLocalRoutes" 2022-01-12 01:30:41 +00:00
Chiachang Wang
c8aec5f1a2 Merge "Only set excludeLocalRoutes in the bypassable VpnProfile" am: b70a0862ff am: bfc4c06f12 am: f1f4773f49 am: 8f7da779d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1944537

Change-Id: I224709966a9ae453c90f3f40e391ab8c844ec708
2022-01-11 14:47:28 +00:00
Chiachang Wang
657656b460 Only set excludeLocalRoutes in the bypassable VpnProfile
fromVpnProfile() will be called in the system server directly.
If the input VpnProfile does not set excludeLocalRoute with a
bypassable VPN, it will crash system server. Thus, only set
the excludeLocalRoutes in the bypassable VpnProfile.

Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I311cc7e3c46ab4f6721f477f227e76ba4c0712f6
2022-01-11 13:46:47 +00:00
Chiachang Wang
bac69433f6 Merge "Allow excludeLocalRoutes set only in bypassable profile" am: eaa3fc76a8 am: e6c1b94120 am: 9d00b2224a am: 3c0d514eab
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938237

Change-Id: I501199d6a3095aceefd7ea9e31e96af3d651efb4
2022-01-11 10:06:20 +00:00
Chiachang Wang
eaa3fc76a8 Merge "Allow excludeLocalRoutes set only in bypassable profile" 2022-01-11 08:56:38 +00:00
Chalard Jean
8f6bd923f9 Add documentation about VpnProfile#setExcludeLocalRoutes
The security implications of this API have to be clarified.

Test: comment-only change
Change-Id: Ifa42dfcda961f7645db7da99a307216d8fe21dca
2022-01-11 16:03:59 +09:00
Taras Antoshchuk
fe5a57e8c4 Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."
Revert "Revert "Revert "Revert "Add VpnServiceBuilderShim for Vp..."

Revert submission 1941195-revert-1931760-reland-vpn-impl-part-2-WGARECSJEM

Reason for revert: fixed merge conflict with aosp/1938197
Reverted Changes:
Ic25e5e4ea:Revert^2 "Revert "Add CTS tests for exclude VPN ro...
Ic72cafcf5:Revert "Revert "Revert "Add APIs that allow to exc...
I53802190a:Revert "Revert "Revert "Add VpnServiceBuilderShim ...

Change-Id: Id3e5f698cf8965fa8386a98bed1fd0170a9e0344
2022-01-10 10:20:29 +00:00
James Mattis
085d59ba47 Making NetworkCapabilities @NonNull
Updating InternalNetworkUpdateRequest to require non-null network
capabilities.

Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: I660d039166451c22ffe5b5e603c649a43b71ebf1
2022-01-08 17:16:24 -08:00
Yan Yan
ac9a6b935f Merge "Rename VcnUnderlyingNetworkPrioirty to VcnUnderlyingNetworkTemplate" am: 60ad179dff am: 6ca0ac41d5 am: 4b5fa75804 am: 62654e3ab8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1923190

Change-Id: I62258729b41a476bbde283f74a68c3829a886af9
2022-01-07 23:36:53 +00:00