Commit Graph

33 Commits

Author SHA1 Message Date
junyulai
0f54d64db2 Make some NetworkStats APIs system-current
Move iterator and NetworkStats.Entry getters to system-current
according to API council feedback. This reverts parts of
ag/17117903.

Test: TH
Fix: 225168182
  (cherry-picked from ag/17397294)
Change-Id: Ia7fdf8d31a96a26b0bf1682f462292b051560477
Merged-In: Ia7fdf8d31a96a26b0bf1682f462292b051560477
2022-04-11 18:45:36 +08:00
junyulai
dd1d02415d [MS83.2] Make some APIs module-lib instead of system current
Test: m
Fix: 217479745
  (cherry-picked from ag/17118003)
Change-Id: Ief3f2304f11b7940a18b98b8533fbca85ffa4dc1
Merged-In: Ief3f2304f11b7940a18b98b8533fbca85ffa4dc1
2022-04-11 18:44:37 +08:00
Patrick Rohr
f7c4dcaaf4 Merge "Update the module-lib API txt with getInterfaceList api." 2022-03-24 06:15:43 +00:00
Patrick Rohr
04f9843d32 Merge "Fix ethernet enable / disable API" 2022-03-24 06:09:28 +00:00
Xiao Ma
bdfed34bbc Update the module-lib API txt with getInterfaceList api.
Bug: 171872016
Test: m
Merged-In: I16c69aa0d236036a600bdae9fb8326ff70fd4fda
Change-Id: I1ee2ad76b4950906516fae7328785b8c583f7adb
2022-03-23 15:18:24 +00:00
markchien
e1cde2694f Update the module-lib API txt with setEthernetEnable API
Bug: 171872016
Test: atest EthernetServiceTests
Change-Id: I61c5209f50ab62327b75813804bde1aa1a014054
Merged-In: I61c5209f50ab62327b75813804bde1aa1a014054
2022-03-23 17:02:14 +08:00
Patrick Rohr
a873f582a1 Fix ethernet enable / disable API
The ethernet APIs connectNetwork() / disconnectNetwork() are
inaccurately named. Physical link state cannot be changed by calling an
API. This change renames these functions to enableInterface and
disableInterface, respectively, to better reflect their intention and
behavior.

Test: atest EthernetManagerPermissionTest
Merged-In: I0f2866d09b745e7bdb261a1258f94cfd51223a8f
Change-Id: I0f2866d09b745e7bdb261a1258f94cfd51223a8f
2022-03-22 10:00:50 +00:00
Patrick Rohr
a68fba1659 Merge "Revert^2 "Change Ethernet API to use OutcomeReceiver"" 2022-03-22 10:00:08 +00:00
Remi NGUYEN VAN
b58df4bf13 Merge "Add executors to NsdManager" 2022-03-22 08:33:48 +00:00
Patrick Rohr
2cef8f1314 Revert^2 "Change Ethernet API to use OutcomeReceiver"
41000c6106

Merged-In: I4c204a8489c0be006c00581d833f2bb46ae0e71d
Change-Id: I42f5ca159db523f85903c411c4a4838eb324c5ad
2022-03-18 12:11:51 +08:00
Quentin Perret
41000c6106 Revert "Change Ethernet API to use OutcomeReceiver"
Revert "Change Ethernet API to use OutcomeReceiver"

Revert "Change network management listener to outcome receiver"

Revert submission 2028203-ethernet-outcomereceiver

Reason for revert: BuildMonitor investigating b/225169800
Reverted Changes:
I4c204a848:Change Ethernet API to use OutcomeReceiver
I7c46545a4:Change Ethernet API to use OutcomeReceiver
Id8fadfed9:Change network management listener to outcome rece...

Change-Id: Ibd1d70ac3fb691f9a777e59da4886ab60dc969ac
2022-03-17 15:20:53 +00:00
Remi NGUYEN VAN
59145dc7f8 Add executors to NsdManager
Add executors to APIs added in T, and overloads with Executors for
consistency to register/resolve.

Bug: 218752665
Test: atest NsdManagerTest
Change-Id: I9d89ea8352aa8274a90bf6cb273d5b45828f53cc
2022-03-17 11:01:56 +00:00
Patrick Rohr
ea7e6d56f4 Change Ethernet API to use OutcomeReceiver
This change addresses API review feedback. In addition, it changes the
returned result from Network to the interface name. The current API
returning a Network object is racy and cannot be implemented correctly.
Users should instead use the ConnectivityManager#requestNetwork() API to
get hold of the Network for a given interface.

Bug: 220017952
Test: TH
Change-Id: I4c204a8489c0be006c00581d833f2bb46ae0e71d
2022-03-17 07:21:33 +01:00
Patrick Rohr
8a910f4ecd Add Nullable IpConfiguration to ethernet update request
Test: atest EthernetServiceTests
Bug: 220017952
Change-Id: Icb5af11e67e397628484726ab6f69afa5d1fe7f5
2022-03-16 20:29:05 +01:00
Patrick Rohr
6dde8ac532 Merge changes from topic "ethernet_mainline"
* changes:
  Fix the NPE thrown when starting Ethernet service in OS lower than T.
  Remove the stub ethernet service from Connectivity module.
  Update hidden API files for EthernetManager API move.
  Provide a stub ethernet service to build in sc-mainline-prod.
  Build ethernet framework source into framework-connectivity-tiramisu
2022-03-16 16:03:30 +00:00
Lorenzo Colitti
8b7896b51a Merge "Rename setUidForeground to noteUidForeground" 2022-03-15 23:33:26 +00:00
Xiao Ma
0a171c006c Build ethernet framework source into framework-connectivity-tiramisu
- move ethernet APIs, build it into framework-connectivity-tiramisu
- start ethernet service from ConnectivityServiceInitializer
- fix EthernetManager dependnecy in Tethering module
- fix EthernetNetworkSpecifier dependency in framework-connectivity
- fix the ethernet related config resource

Bug: 210586283
Test: m
Test: atest FrameworksNetTests EthernetServiceTests
Change-Id: I54857b8517649048a343c72797668394d5225766
Merged-In: I54857b8517649048a343c72797668394d5225766
2022-03-14 14:06:35 +00:00
Aaron Huang
5417280f17 Rename setUidForeground to noteUidForeground
Addresses API review feedback. Both setUidForeground in
NetworkStatsManager and NetworkStatsService are renamed to
noteUidForeground. Thus, the caller in test should be also
modified.

Bug: 222291301
Test: atest FrameworksNetTests
Change-Id: Ifa1e1af3d9fd8b1dc75a8f37947a5958f60ed415
2022-03-10 18:33:50 +08:00
Frank
349fadfa52 [DU09-3]Modify the NetworkStatsCollection Builder API
1. Adding the bucketDuration with unit as bucketDurationmillis
2. make the Key class be final
3. The Key set parameter be marked with an IntDef

Bug: 220153505
Test: atest NetworkStatsCollectionTest
Change-Id: I8919ed595c2d339e8a5c0fc163b3c40edb4a2ad8
2022-03-07 16:31:26 +08:00
Frank Li
481c0cd100 Merge "[MS68.4] Address comments at aosp/1958144" 2022-03-03 02:26:53 +00:00
Frank Li
8039c85336 Merge "[SUBID01-1]Grow NetworkIdentity to include a new mSubId field" 2022-03-02 12:26:11 +00:00
Frank
eeeb76d3bb [MS68.4] Address comments at aosp/1958144
Test: atest TrafficStatsTest NetworkUsageStatsTest FrameworksNetTests
Bug: 204830222
Ignore-AOSP-First: merge conflict

(cherry-picked from ag/16811186)

Change-Id: I2578e13e2844591adac1d1902f2454ec7079ceea
Merged-In: I2578e13e2844591adac1d1902f2454ec7079ceea
2022-03-02 03:09:09 +08:00
Frank
d8990c334a [DU03-4]Add NETWORK_STACK Permission check for NetworkStatsService API
1. getUidStatsForTransport API

Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
            MobileRadioPowerCalculatorTest NetworkStatsServiceTest
Ignore-AOSP-First: merge conflict resolutions

(cherry-picked from ag/16822075)

Change-Id: I2d4d79e5bce648b9937311f5039619ba191728fd
Merged-In: I2d4d79e5bce648b9937311f5039619ba191728fd
2022-03-02 02:23:33 +08:00
lifr
8ba46d804f [SUBID01-1]Grow NetworkIdentity to include a new mSubId field
In the previous design of NSS and NPMS, those only had IMSI to identify
the cell network. Now the telephony has created the "subId" handle,
which is the preferred mechanism for identifying subscribers.

This commit adds NetworkStats support for subscriberId as a part of
the network identity key

Bug: 80526261
Test: atest NetworkTemplateTest NetworkStatsCollectionTest
            NetworkStatsServiceTest NetworkIdentityTest
Ignore-AOSP-First: merge conflict resolutions

(cherry-picked from ag/16826535)

Change-Id: I8549b11d0fcfc5a9426724d6b90de27b707cb77c
Merged-In: I8549b11d0fcfc5a9426724d6b90de27b707cb77c
2022-03-01 16:43:28 +08:00
Lorenzo Colitti
9e066c9faf Update API files to unhide MATCH_PROXY.
Bug: 204830222
Test: m
Ignore-AOSP-First: part of topic with internal-only code
  (cherry-picked from ag/16786006)
Change-Id: I9e11eea30ea9c988498e005c33f173ba2d0a32ec
Merged-In: I9e11eea30ea9c988498e005c33f173ba2d0a32ec
2022-02-28 04:17:19 +00:00
Remi NGUYEN VAN
73a61e7c28 Add setPollForce to module API
The API was test API in S, but this is not supported in module API
surfaces. Make it module API instead.

Ignore-AOSP-First: Avoiding merge conflicts. Cherry-pick will follow
Bug: 197717846
Test: Tests already using this API
  (cherry-picked from ag/16780903)
Change-Id: I53959f0ad4c7a41950e9349d539be82b9166b707
Merged-In: I53959f0ad4c7a41950e9349d539be82b9166b707
2022-02-28 04:17:06 +00:00
Junyu Lai
eb6f4bef96 [MS54.3] Move NetworkStats to updatable sources
This CL builds NetworkStats related codes with the
connectivity module instead of platform.

Test: TH
Bug: 197717846
Change-Id: I4eeb7ea9cfc3139991caf0fc22474e0052a0391c
Merged-In: I4eeb7ea9cfc3139991caf0fc22474e0052a0391c
2022-02-28 03:24:19 +00:00
Treehugger Robot
baefbc3375 Merge "Move IpSec APIs to Connectivity module" 2022-02-10 11:45:21 +00:00
Remi NGUYEN VAN
d8965edd3d Add OWNERS for Nearby code
Add owners to Nearby members for the nearby directory and framework-t
API directory.

Test: m
Change-Id: I1095064de389ab5f035d8750c0106195d1c167ac
2022-02-10 15:27:29 +09:00
Aaron Huang
2e778ee46b Move IpSec APIs to Connectivity module
(cherry picked from commit 68ca373929)
Bug: 204153604
Test: TH
Change-Id: If4afabdc65ed2ac3e918af1d4a03c4c9173c4a3c
Merged-In: If4afabdc65ed2ac3e918af1d4a03c4c9173c4a3c
2022-02-10 14:25:04 +08:00
Remi NGUYEN VAN
792947307e Add APIs for discovery with a network request
Verify that services will be found / lost when underlying networks
change.

Bug: 190249673
Test: atest NsdManagerTest
Change-Id: If62b18a729c6d7b8e2c8701eda6f860ecea4cbaf
2022-02-03 18:39:34 +09:00
Remi NGUYEN VAN
06bdcec9fa Add APIs for discover/resolve on specific networks
Test that NsdManager specifies the correct network when a service is
discovered, and that services can be resolved on a specified network.
Also test that service discovery can be started on a specific network.

Bug: 190249673
Test: atest NsdManagerTest

Change-Id: Ie8b551ce9e33e3adf35f75508f91bbd0df71f837
2022-02-03 16:05:02 +09:00
paulhu
802ab9760f Build framework-connectivity-tiramisu library
- Move nsd APIs and build framework-connectivity-tiramisu library
- Add nsd associated hidden apis
- Build service-connectivity-tiramisu-pre-jarjar library for
  T+ services.
- Move ConnectivityServiceInitialiizer to service-t directory
  to create S+ service instances which can avoid dependency on
  lower sdk library.

Bug: 206893064
Test: atest FrameworksNetTests CtsNetTestCases
CTS-Coverage-Bug: 207804007
Merged-In: I9628716f5c38047ff4ea2346b27589077259c436
Change-Id: I9628716f5c38047ff4ea2346b27589077259c436
2021-12-17 00:04:24 +08:00