Commit Graph

2858 Commits

Author SHA1 Message Date
Aaron Huang
0a8439db0b Merge changes I5ed1bc8b,Ie9e6af0e am: 834026197f am: 5a4bd548f1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645290

Change-Id: Ia0f9ad67aaf675e8190d52e5814dbe855021a8b3
2021-04-06 14:41:28 +00:00
Aaron Huang
83f11c333c Migrate hidden API in IpConfigStore to formal API am: ace9a3d468 am: 0994e5b8c4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1577123

Change-Id: I7ef352c7213864ee2ff99c5a2517fb1b9e68d1d2
2021-04-06 14:41:24 +00:00
Aaron Huang
5a4bd548f1 Merge changes I5ed1bc8b,Ie9e6af0e am: 834026197f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645290

Change-Id: I9fe40b60f31f0897f8cb62a39787536cd5524157
2021-04-06 14:06:51 +00:00
Aaron Huang
0994e5b8c4 Migrate hidden API in IpConfigStore to formal API am: ace9a3d468
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1577123

Change-Id: I218559824dc81cc1b57f17ef43f3fb29ec0fc4f5
2021-04-06 14:03:54 +00:00
Aaron Huang
cdbde20884 Fix IpConfigStore dependencies on framework-connectivity
This change fixes IpConfigStore dependencies on framework-connectivity
hidden APIs.
- Use the version of SystemApi to new RouteInfo.
- Inline the implementation of isIPv4Default() directly because
  isDefaultRoute() is a public API so it can be used in this class.

(cherry-picked from ag/13945685)
Bug: 178777253
Test: FrameworksServicesTests:IpConfigStoreTest
Merged-In: I5ed1bc8bc8bee5b0c795fd8577a2d64628998e51
Change-Id: I5ed1bc8bc8bee5b0c795fd8577a2d64628998e51
2021-04-06 07:18:06 +00:00
Aaron Huang
ace9a3d468 Migrate hidden API in IpConfigStore to formal API
IpConfiguration and StaticIpConfiguration are included
in framework-connectivity which cannot have external
hidden API usages dependencies on them. IpConfiguration
and StaticIpConfiguration provide builder and getter
methods for the fields of the objects which are formal APIs.
So, replace the usages in IpConfigStore with those formal
APIs to remove the dependencies.

(cherry-picked from ag/13929104)
Bug: 178777253
Test: FrameworksServicesTests:IpConfigStoreTest
Merged-In: Ie9e6af0efe2c39667bb8faa1e3a498b1f61e1432
Change-Id: Ie9e6af0efe2c39667bb8faa1e3a498b1f61e1432
2021-04-06 07:13:56 +00:00
Les Lee
6da1dc6363 Merge "Fix Wi-Fi SSID null handling" am: cadd76044e am: 0685b82ee2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1624059

Change-Id: I9dacf92104c544f9ed12dc6fa60e4895ab228cbd
2021-04-06 05:24:54 +00:00
Les Lee
0685b82ee2 Merge "Fix Wi-Fi SSID null handling" am: cadd76044e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1624059

Change-Id: I92537bac7a2762a74a1df051efa1600fdf381eeb
2021-04-06 04:42:57 +00:00
lesl
1c4cd5c1d8 Fix Wi-Fi SSID null handling
When Wi-Fi SSID is null in NetworkCapabilities,
get Wi-Fi SSID from connection info (WifiInfo) which is non-null design.

Bug: 176396812
Test: FrameworksNetTests NetworkPolicyManagerServiceTest
Change-Id: I59c7d8f7e176d0c6bb100721269f3f6165f0ca21
2021-03-30 23:57:56 +08:00
Junyu Lai
e5144d8d44 Merge "[SP31] Expose onSetWarningAndLimit System API" am: fc6a6628b9 am: 5d4287d895
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625864

Change-Id: I022b2d130729f31fbd3fe8edaec6c998cdcd2aa4
2021-03-30 09:00:57 +00:00
Junyu Lai
5d4287d895 Merge "[SP31] Expose onSetWarningAndLimit System API" am: fc6a6628b9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625864

Change-Id: I7a95af1d2879fce22e1e644923661ccbc2253f26
2021-03-30 08:19:25 +00:00
Junyu Lai
fc6a6628b9 Merge "[SP31] Expose onSetWarningAndLimit System API" 2021-03-30 08:00:45 +00:00
Junyu Lai
f638eae6b4 Merge "[SP29] Send interface warning bytes to NetworkStatsProvider" am: 8ce0afea2f am: 5bf5e2f58f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1470723

Change-Id: I6d799819362fd7d89b6be691d15c49314c867734
2021-03-30 03:30:15 +00:00
Junyu Lai
5bf5e2f58f Merge "[SP29] Send interface warning bytes to NetworkStatsProvider" am: 8ce0afea2f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1470723

Change-Id: I9004a9af67fffc90c1d9f8ff18448d2258caf5ba
2021-03-30 03:10:57 +00:00
Junyu Lai
8ce0afea2f Merge "[SP29] Send interface warning bytes to NetworkStatsProvider" 2021-03-30 02:56:25 +00:00
Junyu Lai
c462315620 Merge "[SP28] Add API for set data warning" am: f1a1d71020 am: e09bf898ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1469125

Change-Id: I43fa10034699732b6091fe290a4e064478c8a0e1
2021-03-29 12:12:19 +00:00
Junyu Lai
e09bf898ea Merge "[SP28] Add API for set data warning" am: f1a1d71020
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1469125

Change-Id: Ibdf919a762952350dc89bda59724b2f0cb291313
2021-03-29 11:30:37 +00:00
Junyu Lai
f1a1d71020 Merge "[SP28] Add API for set data warning" 2021-03-29 11:06:05 +00:00
Junyu Lai
175a1d4e49 Merge "Support Dual ViLTE stats" am: df875106a7 am: 4ea19cf4b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540920

Change-Id: Iaa7d8d3dcb106cd19777fe1ff64db5ab4ea75991
2021-03-29 08:26:07 +00:00
Junyu Lai
4ea19cf4b0 Merge "Support Dual ViLTE stats" am: df875106a7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540920

Change-Id: Ie65e2a2530b3e10b1cb7b571bbe4e7255caf1b08
2021-03-29 07:37:34 +00:00
Junyu Lai
df875106a7 Merge "Support Dual ViLTE stats" 2021-03-29 06:59:19 +00:00
Lucas Lin
2c8aab4b61 Merge changes I6d5dd0a8,I106b3e4f am: 0cf3234045 am: 12ecb8f040
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653932

Change-Id: Ic04621eaa36aa0b2837dced4730d32f415f8dc13
2021-03-25 12:22:16 +00:00
Lucas Lin
24f46aaa90 Merge "Use getAllInterfaceNames to get all interface names" am: c4c056b647 am: ef4b30c59d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653937

Change-Id: I2a51fc361a3ef6fe7a99fe70e8c47fdffa2903bd
2021-03-25 12:21:20 +00:00
Lucas Lin
12ecb8f040 Merge changes I6d5dd0a8,I106b3e4f am: 0cf3234045
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653932

Change-Id: Ife29dba8549f9b86cfe757a59fd4c8e61e55738f
2021-03-25 11:46:03 +00:00
Lucas Lin
ef4b30c59d Merge "Use getAllInterfaceNames to get all interface names" am: c4c056b647
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653937

Change-Id: I42de5ac3508b7947ac3b53717f1133ea6aa8588c
2021-03-25 11:30:31 +00:00
Lucas Lin
0cf3234045 Merge changes I6d5dd0a8,I106b3e4f
* changes:
  Use public API Network#getNetId() to get netid
  Remove unused import IConnectivityManager
2021-03-25 10:49:35 +00:00
lucaslin
20966d9193 Use public API Network#getNetId() to get netid
Network class will be a part of mainline module, external callers
cannot call its hidden constant. Use public API - getNetId() to
get netid instead.

Bug: 182963397
Test: m
Change-Id: I6d5dd0a8c3879df7bdc1d58e36022045c303bb40
Merged-In: I6d5dd0a8c3879df7bdc1d58e36022045c303bb40
  (cherry-picked from ag/13927649)
2021-03-25 10:48:55 +00:00
lucaslin
11e8857033 Use getAllInterfaceNames to get all interface names
The current design is using hidden API - getStackedLinks() to
get LinkProperties then call getInterfaceName() to get the
interface name. In fact, this behavior could be replaced by
system API - getAllInterfaceNames().

Bug: 182963397
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases
Change-Id: Id2b19dc5099355af69d23a6d99d2b7e6c0e1e88a
Merged-In: Id2b19dc5099355af69d23a6d99d2b7e6c0e1e88a
  (cherry-picked from ag/13927660)
2021-03-25 08:10:28 +00:00
junyulai
47597b92ab [SP31] Expose onSetWarningAndLimit System API
Test: atest NetworkPolicyManagerServiceTest NetworkStatsServiceTest
Bug: 149467454
CTS-Coverage-Bug: 183598414
Merged-In: I6f5e22e3a7b80a38cae9f3c5d7296a1dff34facf
Change-Id: I6f5e22e3a7b80a38cae9f3c5d7296a1dff34facf
  (cherry-picked from ag/13981689)
2021-03-25 09:32:43 +08:00
junyulai
8947c7125a [SP29] Send interface warning bytes to NetworkStatsProvider
This change contains necessary modification in NPMS and NSS
to send warning bytes to NetworkStatsProvider. But since
no any provider has been upgraded to handle such parameter.
Thus, no behavior change is made in this patch.

Test: atest NetworkPolicyManagerServiceTest NetworkStatsServiceTest
Test: atest NetworkPolicyManagerServiceTest#testStatsProviderWarningAndLimitReached
Bug: 149467454
Bug: 170699770
Bug: 170179169
Merged-In: I6c4863030c36328db571294fd12a40e59864def5
Change-Id: I6c4863030c36328db571294fd12a40e59864def5
  (cherry-picked from ag/13982166)
2021-03-25 09:23:24 +08:00
junyulai
d66c225def [SP28] Add API for set data warning
To have better control and race-free of set data warning
to tether offload hardware, an interface of set warning and
limit at the same time in the NetworkStatsProvider is needed.

This is a no-op change which expose such interface with minimum
changes in service side to get build pass. The implementation
would be included in follow-up patches.

Test: atest NetworkStatsServiceTest
Test: atest NetworkPolicyManagerServiceTest
Test: atest GtsNetworkStackHostTestCases
Test: m doc-comment-check-docs
Bug: 149467454
Bug: 170699770
Bug: 170179169
Merged-In: I6ee661497f7dedb871c85786d1950cab951d8aa2
Change-Id: I6ee661497f7dedb871c85786d1950cab951d8aa2
  (cherry-picked from ag/13959436)
2021-03-24 22:48:26 +08:00
Chalard Jean
9c2d78e605 Merge "Annotate NSM heavy methods with @WorkerThread" am: e096339dc3 am: 6e3de2d9b6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625859

Change-Id: I4091f82e7b95901a88cd9528c92df4519fb3edd1
2021-03-17 03:08:28 +00:00
Chalard Jean
6e3de2d9b6 Merge "Annotate NSM heavy methods with @WorkerThread" am: e096339dc3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625859

Change-Id: Id925979c238c8ae482dbb9c78bf7f4e0f27255d6
2021-03-17 02:26:48 +00:00
Chalard Jean
e096339dc3 Merge "Annotate NSM heavy methods with @WorkerThread" 2021-03-17 02:03:22 +00:00
Zhengyu Zhan
63a5820b4f Support Dual ViLTE stats
Some operator supports multiple VILTE,
both two SIM cards can make VILTE call.
We need to record VILTE data to different interface.
Now NetworkStatsService has only one VILTE data
interface: "vt_data0". All VILTE data stats will
be recorded in this interface.

Bug: 130871087
Test: NetworkStatsServiceTest#testDualVilteProviderStats
Change-Id: I000ec756827bc42cac88dd0a2ca6b7999252357e
2021-03-15 10:00:59 +08:00
Lucas Lin
a7baeed6a6 Merge changes Ib80f814f,Ic605e489 am: 02929bde11 am: 39e98823a3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1626209

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0f41a9cd27dd37c859e69fe02a32b9ab13fb0d46
2021-03-12 04:34:22 +00:00
Lucas Lin
39e98823a3 Merge changes Ib80f814f,Ic605e489 am: 02929bde11
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1626209

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I94fd187e5f2cc0428807668f82b3a29ad8b66c47
2021-03-12 03:56:18 +00:00
Lucas Lin
02929bde11 Merge changes Ib80f814f,Ic605e489
* changes:
  Use new API - getIpSecNetIdRange() in IpSecService
  Add a new API to get the network ID range of IPSec tunnel interface
2021-03-12 03:30:32 +00:00
Remi NGUYEN VAN
71bd83fe19 Add Ethernet, TestNetworkSpecifier API am: 65949518fa am: cd075295ae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574300

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I63159846579c43c721eeb86c9a55faa3f2888be8
2021-03-12 00:26:45 +00:00
Remi NGUYEN VAN
cd075295ae Add Ethernet, TestNetworkSpecifier API am: 65949518fa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574300

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1a1b38fb6b8b6831bac016a8352ae9073758f9af
2021-03-12 00:10:08 +00:00
lucaslin
7eb76590b8 Use new API - getIpSecNetIdRange() in IpSecService
Use new API - getIpSecNetIdRange() to get the network ID range
of IPSec tunnel interface.

Bug: 172183305
Test: atest FrameworksNetTests:IpSecServiceTest
Change-Id: Ib80f814f991e9f000a68f5c539d15d97cf56930e
2021-03-11 17:30:18 +00:00
Remi NGUYEN VAN
65949518fa Add Ethernet, TestNetworkSpecifier API
Rename StringNetworkSpecifier to EthernetNetworkSpecifier (its only
production user), and make it module-lib API.
The original StringNetworkSpecifier file is actually kept to satisfy
some invalid dependencies; it will be removed separately.

This allows specifying an Ethernet interface with a non-deprecated API:
until this change the only way to do so would be to use
NetworkRequest#setSpecifier(String), which is deprecated.

Similarly, add the TestNetworkSpecifier API for TestNetworkManager, to
replace previous usage of StringNetworkSpecifier. TestNetworkManager is
module API, so TestNetworkSpecifier should be module API too. This
allows tests to request the test interface specifically, without using
the deprecated NetworkRequest#setSpecifier(String).

Bug: 179329291
Test: m
Merged-In: Iee569f5c8bbdc4bc979610e1191308281f3d4620

Change-Id: Iee569f5c8bbdc4bc979610e1191308281f3d4620
2021-03-11 23:02:02 +08:00
Chalard Jean
63595c6f88 Annotate NSM heavy methods with @WorkerThread
Test: TH
Bug: 181906747
Change-Id: Ia30273466c1b91a3dcc5d36dac61f92185dec96e
2021-03-11 10:47:46 +00:00
Remi NGUYEN VAN
274f879ec1 Merge "Remove unused buildNetworkIdentity" am: f182642b86 am: cd19370eba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622670

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6517777a7a2922d1d7cee0fabe4dbe2cd286800c
2021-03-10 00:05:51 +00:00
Remi NGUYEN VAN
cd19370eba Merge "Remove unused buildNetworkIdentity" am: f182642b86
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622670

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If9725e5994731a3f5fd8a9044e82e39f02c61f8a
2021-03-09 23:29:15 +00:00
Remi NGUYEN VAN
872fe3f815 Remove unused buildNetworkIdentity
The overload using a NetworkState is now unused.

Bug: 174123988
Change-Id: I22f2d2fffd2d70c08097d3217f01393ff8e75ab5
Test: m
2021-03-09 09:31:21 +00:00
Chiachang Wang
341f30c018 Merge "Replace ConnectivityManager.isNetworkTypeMobile usage in NSS" am: 874aefac33 am: 2155c3400e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612298

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I562f3152c1c9f5b360dc7206b888b93d058fe162
2021-03-09 05:10:16 +00:00
Chiachang Wang
2155c3400e Merge "Replace ConnectivityManager.isNetworkTypeMobile usage in NSS" am: 874aefac33
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612298

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I22df755d2226d6e4dec6e25fdcb9ecc249d5e4e6
2021-03-09 04:28:21 +00:00
Chiachang Wang
055165000e Replace ConnectivityManager.isNetworkTypeMobile usage in NSS
ConnectivityManager is a part of connectivity mainline. The
hidden methods dependency in ConnectivityManager should be
removed to make it a moudle. NSS use isNetworkTypeMobile to
check if the NetworkState belongs to a cellular network or not.
It should be replaced by the NetworkCapabilities inside the
NetworkState.

The result of isNetworkTypeMobile relies on the legacy network
type. The legacy network type comes from the network type
of its network info. The replacement should consider VPN active
case because the network type will not be TYPE_MOBILE. Thus,
replace it with Networkcapabilities.getDisplayTransport() to
get a transport that can be used to classify a network when
displaying its info to users, i.e. it will return TRANSPORT_VPN
for a vpn network on cellular network.

Bug: 172183305
Test: atest FrameworksNetTests
Change-Id: I2132a7288a93e4430cbd9efabc33ae56ce8bdd9b
2021-03-08 09:11:24 +00:00
Treehugger Robot
431fec7f2b Merge "[FUI22] Support getAllNetworkStateSnapshot" am: 89f7c5570a am: cc34801bd5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1614779

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie34762b31c98bd86f121f17112677cb33704f481
2021-03-05 06:20:16 +00:00