Commit Graph

478 Commits

Author SHA1 Message Date
Patrick Rohr
4e6570c359 Merge "Revert^2 "Change Ethernet API to use OutcomeReceiver"" 2022-03-22 10:00:08 +00:00
Remi NGUYEN VAN
d12566508b Merge "Add Executors to NSD callbacks" am: 009094b070 am: 34759d1685 am: 801152830c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2027063

Change-Id: Ief40c29dce0484983f95d66d8506a24b35a46b30
2022-03-22 09:46:03 +00:00
Remi NGUYEN VAN
8d0fa1c2ad Merge "Add Executors to NSD callbacks" 2022-03-22 08:33:48 +00:00
Remi NGUYEN VAN
009094b070 Merge "Add Executors to NSD callbacks" 2022-03-22 08:33:48 +00:00
Xiao Ma
3abd1033d2 Merge "Add getInterfaceList module-lib API in EthernetManager." into tm-dev 2022-03-18 13:00:01 +00:00
Mark Chien
7fd5a98d6a Merge "Add setEthernetEnabled and its listener API" into tm-dev 2022-03-18 11:43:52 +00:00
Remi NGUYEN VAN
c7aa9e3c62 Add Executors to NSD callbacks
Add Executor variants to all methods with callbacks.

Bug: 218752665
Test: atest NsdManagerTest
Change-Id: I4c31e2d7ae601ea808b1fd64df32d116c6fff97f
2022-03-18 09:26:11 +00:00
Remi NGUYEN VAN
1d36db9653 Add Executors to NSD callbacks
Add Executor variants to all methods with callbacks.

Bug: 218752665
Test: atest NsdManagerTest
Change-Id: I4c31e2d7ae601ea808b1fd64df32d116c6fff97f
2022-03-18 09:26:11 +00:00
Xiao Ma
217c99da20 Add getInterfaceList module-lib API in EthernetManager.
Bug: 171872016
Test: m
Change-Id: Ib0e6c8f67c6ded7d17bb9e0ff49e7ff495c8819d
2022-03-18 17:18:54 +09:00
markchien
db9e89aa7b Add setEthernetEnabled and its listener API
Bug: 171872016
Test: atest EthernetServiceTests

Change-Id: Iefd24d955572589c5bd3ca9a8139ea6e44979e8a
2022-03-18 17:12:56 +09:00
Patrick Rohr
dceb895995 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
Ignore-AOSP-First: CP to make automerger happy.
Change-Id: I3361ad0e01e761ffd77faf6c55924fa4612ede90
2022-03-18 07:24:01 +00:00
Patrick Rohr
58b2dffa1c 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
Ignore-AOSP-First: CP to make automerger happy.
Change-Id: I7c46545a47034be409071c2ec007d9e1480c6ed0
2022-03-18 12:19:52 +08:00
Patrick Rohr
d6156a930e Revert^2 "Change Ethernet API to use OutcomeReceiver"
369c79bca4

Merged-In: I7c46545a47034be409071c2ec007d9e1480c6ed0
Change-Id: If9b055e0862755f1d33b5ba6e026fd827bc1d0ea
2022-03-18 12:06:27 +08:00
Quentin Perret
eac786e2ff Merge "Revert "Change Ethernet API to use OutcomeReceiver"" am: 8efc170b0b am: 4f24e69879 am: 8ee0c2bbc4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2030086

Change-Id: I063096a6502f8b8536e797ab30b0be09ae7401b8
2022-03-17 17:02:48 +00:00
Quentin Perret
369c79bca4 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
2022-03-17 15:20:53 +00:00
Quentin Perret
7844d41513 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
2022-03-17 15:20:53 +00:00
Patrick Rohr
a5a7bd70c7 Merge "Change Ethernet API to use OutcomeReceiver" am: a7b1911815 am: b12e08bdfe am: 7e9fe04fb9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2028164

Change-Id: I3161e6e7022eaa30e89e3322bcf6298f48753f00
2022-03-17 14:53:24 +00:00
Patrick Rohr
8d59ceeb28 Merge "Add Nullable IpConfiguration to ethernet update request" am: bc1479af8f am: f95355f826 am: d520904a20
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2025283

Change-Id: Ib2e58c9e451b51ed80136bba585a098bc0ddb45a
2022-03-17 08:13:57 +00:00
Patrick Rohr
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: I7c46545a47034be409071c2ec007d9e1480c6ed0
2022-03-17 08:20:45 +01:00
Patrick Rohr
77a3a8408b 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
2022-03-17 08:20:45 +01:00
Junyu Lai
7a01fb6c68 Merge "[MS83.1] Make some APIs module-lib instead of system current" into tm-dev 2022-03-17 01:50:14 +00:00
Patrick Rohr
746d082279 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
2022-03-16 20:28:45 +01:00
Patrick Rohr
7215598852 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
2022-03-16 20:28:45 +01:00
Patrick Rohr
112f3762bb Merge "Split out the ethernet API surface and use framework-connectivity-t" 2022-03-16 16:03:30 +00:00
Patrick Rohr
cbcf21833f Merge "Split out the ethernet API surface and use framework-connectivity-t" 2022-03-16 16:03:30 +00:00
Frank Li
a89e379e00 Merge "[DU04-2]Appropriate changes to the NetworkPolicyManager API" am: 73c476d79d am: 8c4e592d2e am: f946d59035
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2007132

Change-Id: I7e5dc71e1705a7c205c0fd6a7cb57e75cae5a4fc
2022-03-16 13:20:10 +00:00
Frank Li
62bfe3e882 Merge "[DU04-2]Appropriate changes to the NetworkPolicyManager API" 2022-03-16 12:28:24 +00:00
Frank Li
73c476d79d Merge "[DU04-2]Appropriate changes to the NetworkPolicyManager API" 2022-03-16 12:28:24 +00:00
junyulai
5dc94ede39 [MS83.1] Make some APIs module-lib instead of system current
Some of the internal classes are not available for priv-apps.
Thus, make them module-lib instead.

This change also adds some nullability annotations for existing
APIs according to go/android-api-guidelines.

Test: m
Test: m frameworks-base-api-system-current-compat
Fix: 217479745
Change-Id: I18de46b11df7232ab82b9465856fdde621283156
2022-03-16 15:31:51 +08:00
Frank
b9bacae1fc [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
2022-03-16 14:23:50 +08:00
Frank
6e429bec00 [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
2022-03-16 14:23:50 +08:00
Lorenzo Colitti
e1ef6d8259 Merge "Rename setUidForeground to noteUidForeground" am: 8d52f75d38 am: 112efa8a5a am: 1ad828ae91
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2018717

Change-Id: I04612669cde5eea0fef581ab4bcf9274ffe4b57c
2022-03-16 00:37:29 +00:00
Lorenzo Colitti
2a4a56b004 Merge "Rename setUidForeground to noteUidForeground" 2022-03-15 23:33:26 +00:00
Lorenzo Colitti
8d52f75d38 Merge "Rename setUidForeground to noteUidForeground" 2022-03-15 23:33:26 +00:00
Aaron Huang
b95515f13f Merge "Let docs tool to list the newly-visible IntDef values" am: 583be3615a am: b4c83efde2 am: 5004245979
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2020536

Change-Id: Idde4985d233a67ea5049b61d6758b314cb8813cd
2022-03-15 05:04:43 +00:00
Aaron Huang
1b60475d2b Merge "Let docs tool to list the newly-visible IntDef values" 2022-03-15 03:55:41 +00:00
Aaron Huang
583be3615a Merge "Let docs tool to list the newly-visible IntDef values" 2022-03-15 03:55:41 +00:00
Xiao Ma
dbc8e0fb2b 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
2022-03-14 13:47:01 +00:00
Xiao Ma
3574a86616 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
2022-03-14 13:47:01 +00:00
Frank Li
81110f009d Merge "[DU09-2]Modify the NetworkStatsCollection Builder API" am: 23599d75af am: 57e0845a65 am: bd3d328807
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2010324

Change-Id: If886978cb250912e38b978233210ad0ee2d6a88b
2022-03-14 03:32:29 +00:00
Frank Li
96189e9851 Merge "[DU09-2]Modify the NetworkStatsCollection Builder API" 2022-03-14 02:36:08 +00:00
Frank Li
23599d75af Merge "[DU09-2]Modify the NetworkStatsCollection Builder API" 2022-03-14 02:36:08 +00:00
Aaron Huang
0619e29450 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
2022-03-11 01:28:59 +08:00
Aaron Huang
d695111dc9 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
2022-03-11 01:28:59 +08:00
Xiao Ma
a9a3b4ce04 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: I1956848d3248cc56e9841d221e5e4c160bed65a4
2022-03-10 21:22:42 +09:00
Aaron Huang
cdc5fe2b2b 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
2022-03-10 18:31:21 +08:00
Aaron Huang
e6c13a7dd0 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
2022-03-10 18:31:21 +08:00
Xiao Ma
6ca056520f Merge "Remove restriction that limits updateConfiguration API to Auto" am: 1bb1076d6e am: 61d27197ad am: 0884cf9c15
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2015635

Change-Id: I14f6d9bdc65623872e10fc33ce71d74db495c23b
2022-03-10 04:50:57 +00:00
Xiao Ma
2560006257 Merge "Remove restriction that limits updateConfiguration API to Auto" 2022-03-10 03:40:54 +00:00
Xiao Ma
1bb1076d6e Merge "Remove restriction that limits updateConfiguration API to Auto" 2022-03-10 03:40:54 +00:00