Commit Graph

928 Commits

Author SHA1 Message Date
Xinyi Zhou
59b40a2405 Change system-current.txt and module-lib-current.txt for changing API
according to council feedbacks

Bug: 216590902
Test: Flashed and confirmed logs
Ignore-AOSP-First: nearby_not_in_aosp_yet
CTS-Coverage-Bug: 213364287
Change-Id: Iea331d9d8b3425498f921104e946dc259710ae94
2022-03-08 19:24:41 +00:00
Patrick Rohr
d1dccf83fc Remove restriction that limits updateConfiguration API to Auto
Test: TH
Change-Id: Ibd1b6493778b98fc765e6eebdfe8f9c1fef29a73
2022-03-08 16:13:48 +00:00
Patrick Rohr
faa9fe86b6 Remove restriction that limits updateConfiguration API to Auto
Test: TH
Change-Id: Ibd1b6493778b98fc765e6eebdfe8f9c1fef29a73
2022-03-08 16:13:48 +00:00
James Mattis
6869c411fc Allowing for null net caps in updateConfiguration
Marking NetworkCapabilities as nullable in updateConfiguration and
updating where needed to support this. This will allow callers of the
ethernet network management updateConfiguration API to use it primarily
for setting an ethernet network's IP configuration.

Bug: 222565654
Bug: 220017952
Bug: 210485380
Test: atest EthernetNetworkUpdateRequestTest

Change-Id: I1f80e950acbd078a6b3378e1fa5f1e4173112e79
2022-03-08 16:50:35 +01:00
James Mattis
db3007caca Allowing for null net caps in updateConfiguration
Marking NetworkCapabilities as nullable in updateConfiguration and
updating where needed to support this. This will allow callers of the
ethernet network management updateConfiguration API to use it primarily
for setting an ethernet network's IP configuration.

Bug: 222565654
Bug: 220017952
Bug: 210485380
Test: atest EthernetNetworkUpdateRequestTest

Change-Id: I1f80e950acbd078a6b3378e1fa5f1e4173112e79
2022-03-08 16:50:35 +01:00
Aaron Huang
cf97f22cdc Fix proto invalid write type
While dumpProtoLocked is called, InvalidProtocolBufferException
occurred because types are mismatched between platform side and
module side.

netstats.proto was moved into connectivity module, both the
platform(incident.proto) and the module uses protoc-gen-javastream
to generate the Java classes from it. It should be fine since
platform includes the source of the proto, and jarjar the generated
classess in the module to avoid conflict with platform.

Bug: 218566849
Test: adb shell incident 3001
      adb shell dumpsys netstats --proto
      atest CtsIncidentHostTestCases:IncidentdTest#testIncidentReportDumpAuto
Change-Id: I4654350a59dc1ca1a925785ad37f34aa7b481235
Merged-In: I4654350a59dc1ca1a925785ad37f34aa7b481235
2022-03-07 08:44:25 +00:00
Aaron Huang
85b2dc0020 Fix proto invalid write type
While dumpProtoLocked is called, InvalidProtocolBufferException
occurred because types are mismatched between platform side and
module side.

netstats.proto was moved into connectivity module, both the
platform(incident.proto) and the module uses protoc-gen-javastream
to generate the Java classes from it. It should be fine since
platform includes the source of the proto, and jarjar the generated
classess in the module to avoid conflict with platform.

Bug: 218566849
Test: adb shell incident 3001
      adb shell dumpsys netstats --proto
      atest CtsIncidentHostTestCases:IncidentdTest#testIncidentReportDumpAuto
Change-Id: I4654350a59dc1ca1a925785ad37f34aa7b481235
Merged-In: I4654350a59dc1ca1a925785ad37f34aa7b481235
2022-03-07 08:44:25 +00: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
1e0da21bfe [DU09-2]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: Iab32b8fc129b77d6786c2f1f2339e515f2eb55f7
2022-03-07 16:28:55 +08:00
Frank
fd5dcd2dd9 [DU09-2]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: Iab32b8fc129b77d6786c2f1f2339e515f2eb55f7
2022-03-07 16:28:55 +08:00
Wei Wang
88c484422c API changes for addressing API Council comments.
Bug:222291418
Bug:222291433
Bug:222291394
Bug:222291470
Bug:222291434
Bug:222291543
Bug:222291565

Test: atest CtsNearbyFastPairTestCases
Ignore-AOSP-First: new project
Change-Id: If85c8071503a79b8057d5703d4276adba4403c00
2022-03-06 14:44:00 -08:00
Aaron Huang
5fbd57eab4 Fix proto invalid write type
While dumpProtoLocked is called, InvalidProtocolBufferException
occurred because types are mismatched between platform side and
module side.

netstats.proto was moved into connectivity module, both the
platform(incident.proto) and the module uses protoc-gen-javastream
to generate the Java classes from it. It should be fine since
platform includes the source of the proto, and jarjar the generated
classess in the module to avoid conflict with platform.

Bug: 218566849
Test: adb shell incident 3001
      adb shell dumpsys netstats --proto
      atest CtsIncidentHostTestCases:IncidentdTest#testIncidentReportDumpAuto
Change-Id: I4654350a59dc1ca1a925785ad37f34aa7b481235
Merged-In: I4654350a59dc1ca1a925785ad37f34aa7b481235
2022-03-04 06:39:30 +00:00
Frank Li
a301247810 Merge "[MS68.4] Address comments at aosp/1958144" am: 481c0cd100
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1973859

Change-Id: I20538f9c3637fe2282b00ce426c14379fb7899ea
2022-03-03 02:53:23 +00:00
Frank Li
ef6f50b007 Merge "[MS68.3] Address comments at aosp/1958144" 2022-03-03 02:26:53 +00:00
Frank Li
0cc12cf02d Merge "[MS68.3] Address comments at aosp/1958144" 2022-03-03 02:26:53 +00:00
Frank Li
481c0cd100 Merge "[MS68.4] Address comments at aosp/1958144" 2022-03-03 02:26:53 +00:00
Frank Li
dfeea7208c Merge "[SUBID01-1]Grow NetworkIdentity to include a new mSubId field" am: 8039c85336
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1895196

Change-Id: Ifd74ecea09dda5ff534e05ca4bb293bbf32b788e
2022-03-02 12:53:11 +00:00
Frank Li
9de9a8b2de Merge "[SUBID01-0]Grow NetworkIdentity to include a new mSubId field" 2022-03-02 12:26:11 +00:00
Frank Li
9a74429f56 Merge "[SUBID01-0]Grow NetworkIdentity to include a new mSubId field" 2022-03-02 12:26:11 +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 Li
0e9d604526 Merge "[DU03-4]Add NETWORK_STACK Permission check for NetworkStatsService API" am: 1b87cafbc1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2004490

Change-Id: I6c29156646e99e93120def63394ab02778e754bb
2022-03-02 08:19:19 +00:00
Frank Li
1b87cafbc1 Merge "[DU03-4]Add NETWORK_STACK Permission check for NetworkStatsService API" 2022-03-02 07:48:45 +00:00
lifr
7c9fde88d6 [SUBID01-0]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
            NetworkStatsDataMigrationUtilsTest

 (cherry-picked from ag/16825721)

Change-Id: Ie1fe81006555dbcca4b62457fa6c319f04b4576d
Merged-In: Ie1fe81006555dbcca4b62457fa6c319f04b4576d
2022-03-02 11:20:09 +08:00
lifr
2bdae7d6e4 [SUBID01-0]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
            NetworkStatsDataMigrationUtilsTest

 (cherry-picked from ag/16825721)

Change-Id: Ie1fe81006555dbcca4b62457fa6c319f04b4576d
Merged-In: Ie1fe81006555dbcca4b62457fa6c319f04b4576d
2022-03-02 11:20:09 +08:00
Chun Zhang
9c18dab11d Add AccountKeys to FastPairAccountDevicesMetadataRequest
Test: CTS test.
Bug: 204780849
Change-Id: I57a529a476f04c78d95763562e61ae55fb774fa9
Merged-In: I57a529a476f04c78d95763562e61ae55fb774fa9
Ignore-AOSP-First: nearby_not_in_aosp_yet
CTS-Coverage-Bug: 205591293
2022-03-01 19:43:45 +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
e20ff88e34 [MS68.3] Address comments at aosp/1958144
Test: atest TrafficStatsTest NetworkUsageStatsTest FrameworksNetTests
Bug: 204830222

(cherry-picked from ag/16813003)

Change-Id: I5a54b44294021d64d8506eeb570db0db8544472a
Merged-In: I5a54b44294021d64d8506eeb570db0db8544472a
2022-03-02 03:05:53 +08:00
Frank
5f93cdff5a [MS68.3] Address comments at aosp/1958144
Test: atest TrafficStatsTest NetworkUsageStatsTest FrameworksNetTests
Bug: 204830222

(cherry-picked from ag/16813003)

Change-Id: I5a54b44294021d64d8506eeb570db0db8544472a
Merged-In: I5a54b44294021d64d8506eeb570db0db8544472a
2022-03-02 03:05:53 +08:00
Frank
350414997d [DU03-4]Add NETWORK_STACK Permission check for NetworkStatsService API
1. getUidStatsForTransport API

Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
            MobileRadioPowerCalculatorTest NetworkStatsServiceTest

(cherry-picked from ag/16816095)

Change-Id: I022c34b5af87fe3ff6857ea264bac2f7098eaed4
Merged-In: I022c34b5af87fe3ff6857ea264bac2f7098eaed4
2022-03-02 02:30:51 +08:00
Frank
5c3fa07cc1 [DU03-4]Add NETWORK_STACK Permission check for NetworkStatsService API
1. getUidStatsForTransport API

Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
            MobileRadioPowerCalculatorTest NetworkStatsServiceTest

(cherry-picked from ag/16816095)

Change-Id: I022c34b5af87fe3ff6857ea264bac2f7098eaed4
Merged-In: I022c34b5af87fe3ff6857ea264bac2f7098eaed4
2022-03-02 02:30:51 +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
paulhu
e8054a8ad1 Rename framework-connectivity-tiramisu to framework-connectivity-t
Note: There is a difference on Tethering/apex/Android.bp because
      framework-connectivity-tiramisu has been marked on
      bootclasspath_fragment.

Bug: 215434166
Ignore-AOSP-First: Merge conflict. Will cherry-pick to AOSP afterwards.
Test: build, flash, device boot to home.
Merged-In: I9ebedf8813cbfa30d979bc35a3b2306715be682b
Change-Id: I9ebedf8813cbfa30d979bc35a3b2306715be682b
(cherry picked from commit 1d87cbdc88)
2022-03-01 03:10:41 +00:00
paulhu
537f72061a Rename framework-connectivity-tiramisu to framework-connectivity-t
Bug: 215434166
Test: build, flash, device boot to home.
Merged-In: I9ebedf8813cbfa30d979bc35a3b2306715be682b
Change-Id: I9ebedf8813cbfa30d979bc35a3b2306715be682b
2022-03-01 09:44:21 +08:00
James Mattis
c22df9d3b0 Merge "Updating Eth Update Request to use Builder" am: e5fd971d2e am: 3fb1f8adab am: be7ea07ec8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1991011

Change-Id: Idf1b3a44c21886540230cae43ec30035024a74c5
2022-02-28 21:22:52 +00:00
James Mattis
fbb8986a58 Merge "Updating Eth Update Request to use Builder" 2022-02-28 16:55:49 +00:00
James Mattis
e5fd971d2e Merge "Updating Eth Update Request to use Builder" 2022-02-28 16:55:49 +00:00
Lorenzo Colitti
0c0ab875e9 Merge changes from topic "ms52-movenetstats" am: cebdfba1bb
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1987452

Change-Id: Ia7a6725b6cf8cdfa0ab712f5f2c4fe223892f39a
2022-02-28 06:08:47 +00:00
Remi NGUYEN VAN
2fa0db3124 Add setPollForce to module API am: 73a61e7c28
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1987450

Change-Id: Ibec723d59eae973168b0c5715acfd5dff2c99164
2022-02-28 06:08:44 +00:00
Junyu Lai
0a7c4c5659 [MS54.3] Move NetworkStats to updatable sources am: eb6f4bef96
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1987447

Change-Id: I902a20e0c2304cae6e57a32c5b33403245116f7f
2022-02-28 06:08:37 +00:00
Lorenzo Colitti
46d003e258 Merge changes from topic "ms52-movenetstats"
* changes:
  Expose MATCH_PROXY as a module-lib API.
  Add setPollForce to module API
  Move networkstats JNI to connectivity module
  [MS54.1] Move NetworkStats to updatable sources
  [MS62.1] Start NetworkStatsService from the module
2022-02-28 05:32:23 +00:00
Lorenzo Colitti
ca25ad3567 Merge changes from topic "ms52-movenetstats"
* changes:
  Expose MATCH_PROXY as a module-lib API.
  Add setPollForce to module API
  Move networkstats JNI to connectivity module
  [MS54.1] Move NetworkStats to updatable sources
  [MS62.1] Start NetworkStatsService from the module
2022-02-28 05:32:23 +00: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
James Mattis
aa2202c220 Updating Eth Update Request to use Builder
Updating EthernetNetworkUpdateRequest to use a builder for
creation and also changing to use IpConfiguration instead of
StaticIpConfiguration.

Bug: 220017952
Bug: 210487893
Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: I78b002c12cf927c075671b75f0fe0d7878443b56
2022-02-24 13:38:04 -08:00
James Mattis
420d6e09c9 Updating Eth Update Request to use Builder
Updating EthernetNetworkUpdateRequest to use a builder for
creation and also changing to use IpConfiguration instead of
StaticIpConfiguration.

Bug: 220017952
Bug: 210487893
Bug: 210485380
Test: atest EthernetServiceTests
Change-Id: I78b002c12cf927c075671b75f0fe0d7878443b56
2022-02-24 13:38:04 -08:00
Aaron Huang
d24637842e Merge "Check iface by TextUtils.equals" am: 213018b736 am: cf11f77e11 am: 0eb1037a53
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1946587

Change-Id: Ifc4eb584382781de9ab5e4304357012d95660f66
2022-02-22 12:20:40 +00:00
Aaron Huang
6b1e9e63cb Merge "Check iface by TextUtils.equals" 2022-02-22 09:48:08 +00:00
Aaron Huang
213018b736 Merge "Check iface by TextUtils.equals" 2022-02-22 09:48:08 +00:00