Commit graph android_packages_modules_Co.../framework-t
Message SHA1
Merge "Remove unused empty filegroups from connectivityT package."
Xiao Ma   authored and   Gerrit Code Review   commited 2022-04-07 03:45:45 +00:00
8e13391915
Merge changes from topic "MDns_AIDL"
* changes:
  Use MDns aidl on NsdService
  Add MDnsManager

Paul Hu   authored and   Gerrit Code Review   commited 2022-04-07 02:06:35 +00:00
09475308b7
Use MDns aidl on NsdService
- Use MDns aidl to communicate with mdns service and register
  event listener to receive callback.
- Remove all NDC relevant code on NsdService.
- Use MDns aidl on NsdServiceTest.

Bug: 209894875
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I65929dee3838fef753396e86c665abd66b6fec81

paulhu   commited 2022-04-04 15:18:27 +00:00
2b9ed95ae5
Add MDnsManager
- Have MDnsManager to manage mdns native service binder call.
- Register it as a system service for NsdService.
- NsdService will use aidl to communicate with mdns, so add the
  relevant lib to framework-connectivity
- Add jarjar rule for mdns-aidl-interface classes.

Bug: 209894875
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: Ibc8b726c01a15015b450caf94d0afed570117b7f

paulhu   commited 2022-04-04 15:02:17 +00:00
541b72d03b
Address EthernetManager javadoc review comments
Test: TH
Change-Id: Iafa8979d8e96ea4d078b017e56ee61334d33b5f5

Patrick Rohr   commited 2022-04-04 14:59:42 +02:00
50c470e308
Update javadoc to match expectation for UnsupportedOperationException
Test: builds
Change-Id: I44eac15972ed099fc12599a78a71557a7b16d593

Patrick Rohr   commited 2022-04-04 14:59:42 +02:00
0f2cbe92f1
Remove unused empty filegroups from connectivityT package.
connectivity-tiramisu-sources filegroup in the framework-t and service
folder is useless after moving all source files to updatable-sources
filegroup, delete them from f/b/packages/connectivityT.

Bug: 210586283
Test: m
Change-Id: I22e9a70a04929144488380d1530cd7baa78ce056

Xiao Ma   commited 2022-04-04 07:00:59 +00:00
f90f1efff4
Use Sources.bp for building
Reference Sources.bp from Android.bp, so that they are used as build
files.

Sources.bp is separate from Android.bp as it was migrated from the
Android.bp files in the old code location. They can be merged into the
main Android.bp file (or removed by removing the filegroups) after the
migration is done.

Also remove references to the AIDL filegroups, as files are now merged
into the common framework/aidl-export directory which is used as include
directory for aidl source generation already, so they do not need to be
referenced separately. framework/aidl-export can contain AIDLs for S-
API classes that became updatable API in T (the contents of
framework-t), as they are the same as any other API class for the
purposes of AIDL code generation: it's OK for any S+ code to reference
S+ API classes.

Finally, fix reference to mByteStream in IpConfigStoreTest. It was
already wrong but did not break the build because the test was not being
built in the old location.

Bug: 222234190
Test: TH
Merged-In: I81893df9f327abb84f1561b2b33027a2d23a4d65
Merged-In: I67c703e3f7aa9d5787f032a79ed62e45412baf4f
Change-Id: I9093f9ae2f9d76e597f20de48680e459891755b4

Remi NGUYEN VAN   commited 2022-03-25 14:58:43 +00:00
0395b70000
Merge history of ConnectivityT
Renamed files/directories:
ConnectivityT/service/Android.bp --> service-t/Sources.bp
ConnectivityT/framework-t/Android.bp --> framework-t/Sources.bp
ConnectivityT/framework-t/aidl-export --> framework/aidl-export
ConnectivityT/service --> service-t
ConnectivityT/framework-t --> framework-t
ConnectivityT/tests --> tests
ConnectivityT/OWNERS --> (removed)

BUG: 222234190
TEST: TH
Ignore-AOSP-First: Move with history done per-branch
Merged-In: I81893df9f327abb84f1561b2b33027a2d23a4d65
Merged-In: I67c703e3f7aa9d5787f032a79ed62e45412baf4f
Change-Id: I27a91f1a94f9d807f92762436f533c4b0d0114d5

Remi NGUYEN VAN   commited 2022-03-25 11:02:45 +00:00
700ffc994f
Merge "Add getInterfaceList module-lib API in EthernetManager."
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-24 06:15:43 +00:00
e38626a4a2
Merge "Update the module-lib API txt with getInterfaceList api."
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-24 06:15:43 +00:00
f7c4dcaaf4
Merge "Fix ethernet enable / disable API"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-24 06:09:28 +00:00
95738f7c18
Merge "Fix ethernet enable / disable API"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-24 06:09:28 +00:00
04f9843d32
Update the module-lib API txt with getInterfaceList api.
Bug: 171872016
Test: m
Merged-In: I16c69aa0d236036a600bdae9fb8326ff70fd4fda
Change-Id: I1ee2ad76b4950906516fae7328785b8c583f7adb

Xiao Ma   commited 2022-03-23 15:18:24 +00:00
bdfed34bbc
Update the module-lib API txt with setEthernetEnable API
Bug: 171872016
Test: atest EthernetServiceTests
Change-Id: I61c5209f50ab62327b75813804bde1aa1a014054
Merged-In: I61c5209f50ab62327b75813804bde1aa1a014054

markchien   commited 2022-03-23 17:02:14 +08:00
e1cde2694f
Add getInterfaceList module-lib API in EthernetManager.
Bug: 171872016
Test: m
Merged-In: Ib0e6c8f67c6ded7d17bb9e0ff49e7ff495c8819d
Change-Id: I94fd147d0f8cf09cb7445fd2b5bc8e4528e8390e

Xiao Ma   commited 2022-03-22 13:59:40 +00:00
1edd4554e5
Add setEthernetEnabled and its listener API
Bug: 171872016
Test: atest EthernetServiceTests

Merged-In: Iefd24d955572589c5bd3ca9a8139ea6e44979e8a
Change-Id: Iefd24d955572589c5bd3ca9a8139ea6e44979e8a

markchien   authored and   Xiao Ma   commited 2022-03-22 13:58:14 +00:00
5912ab6906
Merge "Fix proto invalid write type"
Aaron Huang   authored and   Gerrit Code Review   commited 2022-03-22 12:18:39 +00:00
286f4e2c88
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: I3361ad0e01e761ffd77faf6c55924fa4612ede90
Change-Id: I3361ad0e01e761ffd77faf6c55924fa4612ede90

Patrick Rohr   commited 2022-03-22 12:12:48 +00:00
3879cf1a78
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

Patrick Rohr   commited 2022-03-22 10:00:50 +00:00
a873f582a1
Merge "Revert^2 "Change Ethernet API to use OutcomeReceiver""
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-22 10:00:08 +00:00
a68fba1659
Merge "Revert^2 "Change Ethernet API to use OutcomeReceiver""
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-22 10:00:08 +00:00
4e6570c359
Merge "Add Executors to NSD callbacks"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2022-03-22 08:33:48 +00:00
8d0fa1c2ad
Merge "Add executors to NsdManager"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2022-03-22 08:33:48 +00:00
b58df4bf13
Add Executors to NSD callbacks
Add Executor variants to all methods with callbacks.

Bug: 218752665
Test: atest NsdManagerTest
Change-Id: I4c31e2d7ae601ea808b1fd64df32d116c6fff97f

Remi NGUYEN VAN   commited 2022-03-18 09:26:11 +00:00
c7aa9e3c62
Revert^2 "Change Ethernet API to use OutcomeReceiver"
41000c6106

Merged-In: I4c204a8489c0be006c00581d833f2bb46ae0e71d
Change-Id: I42f5ca159db523f85903c411c4a4838eb324c5ad

Patrick Rohr   authored and   markchien   commited 2022-03-18 12:11:51 +08:00
2cef8f1314
Revert^2 "Change Ethernet API to use OutcomeReceiver"
369c79bca4

Merged-In: I7c46545a47034be409071c2ec007d9e1480c6ed0
Change-Id: If9b055e0862755f1d33b5ba6e026fd827bc1d0ea

Patrick Rohr   authored and   markchien   commited 2022-03-18 12:06:27 +08:00
d6156a930e
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: I45af594f7233ed89113f4cf7f977092271980672

Quentin Perret   commited 2022-03-17 15:20:53 +00:00
369c79bca4
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

Quentin Perret   commited 2022-03-17 15:20:53 +00:00
41000c6106
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

Remi NGUYEN VAN   commited 2022-03-17 11:01:56 +00:00
59145dc7f8
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: I7c46545a47034be409071c2ec007d9e1480c6ed0

Patrick Rohr   commited 2022-03-17 08:20:45 +01:00
cf01b8a4f7
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

Patrick Rohr   commited 2022-03-17 07:21:33 +01:00
ea7e6d56f4
Add Nullable IpConfiguration to ethernet update request
Test: atest EthernetServiceTests
Bug: 220017952
Change-Id: Icb5af11e67e397628484726ab6f69afa5d1fe7f5

Patrick Rohr   commited 2022-03-16 20:29:05 +01:00
8a910f4ecd
Add Nullable IpConfiguration to ethernet update request
This is not currently used by anyone, but will allow us to only update
NetworkCapabilities in the future. This could be useful for testing.

Test: atest EthernetServiceTests
Bug: 220017952
Change-Id: I9697399bad2bfe66c6f328064be75f4dfa10af81

Patrick Rohr   commited 2022-03-16 20:28:45 +01:00
746d082279
Merge "Split out the ethernet API surface and use framework-connectivity-t"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-16 16:03:30 +00:00
112f3762bb
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

Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-16 16:03:30 +00:00
6dde8ac532
Merge "[DU04-2]Appropriate changes to the NetworkPolicyManager API"
Frank Li   authored and   Gerrit Code Review   commited 2022-03-16 12:28:24 +00:00
62bfe3e882
[DU04-2]Appropriate changes to the NetworkPolicyManager API
Divide the NetworkPolicyManager API
notifyStatsProviderWarningOrLimitReached into the following two APIs:
1. notifyStatsProviderWarningReached()
2. notifyStatsProviderLimitReached()

Bug: 216474563
Test: atest NetworkStatsServiceTest NetworkPolicyManagerTest
            NetworkPolicyManagerServiceTest OffloadControllerTest
Change-Id: Ic413eb532b5e24d4a7e2afabdcf643ab6607b1ed

Frank   commited 2022-03-16 14:23:50 +08:00
b9bacae1fc
Merge "Rename setUidForeground to noteUidForeground"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-03-15 23:33:26 +00:00
2a4a56b004
Merge "Rename setUidForeground to noteUidForeground"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-03-15 23:33:26 +00:00
8b7896b51a
Merge "Let docs tool to list the newly-visible IntDef values"
Aaron Huang   authored and   Gerrit Code Review   commited 2022-03-15 03:55:41 +00:00
1b60475d2b
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

Xiao Ma   commited 2022-03-14 14:06:35 +00:00
0a171c006c
Split out the ethernet API surface and use framework-connectivity-t
Ethernet framework and service source code is going to be moved to
Connectivity mainline module, this CL contains below corresponding
changes to adapt the migration in f/b side:

1. Split out ethernet module-lib APIs to Connectivity module.
   Add the ethernet resource filegroup to tiramisu-updatable-sources
   filegroup as well, build them together. Also update the module-lib
   and system api txt to reflect the APIs change. Remove the hidden
   APIs which are moved to Connectivity module. This removal fixes the
   api inconsistent issue with Tethering/apex/hidden/.

2. Remove EthernetService from SystemServer which will be registered
   from ConnectivityServiceInitializer.

3. Replace the BackgroundThread class(imported from f/b/core/java)
   with the one in the modules-utils-backgroundthread lib, which is
   visible to Connectivity module.

Bug: 210586283
Test: m
Test: atest FrameworksNetTests EthernetServiceTests
Change-Id: I3e13cb9c0e348333af295c2537d459aa6700ff17
Merged-In: I1956848d3248cc56e9841d221e5e4c160bed65a4

Xiao Ma   commited 2022-03-14 13:47:01 +00:00
dbc8e0fb2b
Merge "[DU09-2]Modify the NetworkStatsCollection Builder API"
Frank Li   authored and   Gerrit Code Review   commited 2022-03-14 02:36:08 +00:00
96189e9851
Let docs tool to list the newly-visible IntDef values
Some *_ALL constants are exposed in T and they should be mentioned
in documentation. Because there are already defined InDef values
for this kind of constants. Thus, remove the list in the javadoc
and leave these up to the doc tool to list the InDef values.

Bug: 222291452
Test: m doc-comment-check-docs
Change-Id: Ibbaee5389a85bb3d696a518deea0897845553bfa

Aaron Huang   commited 2022-03-11 01:28:59 +08:00
0619e29450
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

Aaron Huang   commited 2022-03-10 18:33:50 +08:00
5417280f17
Rename setUidForeground to noteUidForeground
This patch addresses API review about the naming of
NetworkStatsManager#setUidForeground and it would be
more appropriate to rename it to noteUidForeground.

Bug: 222291301
Test: atest FrameworksNetTests
Change-Id: I952762872850889609c9808aa6e3cdfc04317806

Aaron Huang   commited 2022-03-10 18:31:21 +08:00
cdc5fe2b2b
Merge "Remove restriction that limits updateConfiguration API to Auto"
Xiao Ma   authored and   Gerrit Code Review   commited 2022-03-10 03:40:54 +00:00
2560006257
Merge "Allowing for null net caps in updateConfiguration"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-09 09:16:29 +00:00
5ba470eded
Remove restriction that limits updateConfiguration API to Auto
Test: TH
Change-Id: Ibd1b6493778b98fc765e6eebdfe8f9c1fef29a73

Patrick Rohr   commited 2022-03-08 16:13:48 +00:00
d1dccf83fc