Commit Graph

660676 Commits

Author SHA1 Message Date
Junyu Lai
caaa2364e9 [MS57.1] Prepare APIs for data migration utility
This includes:
1. Move PREFIX_* constants to NetworkStatsManager to expose
   in later changes.
2. Rename networkId to wifiNetworkKey.
3. Rename subType to ratType.
4. Replace SUBTYPE_COMBINED with NETWORK_TYPE_ALL
5. Fix lint errors when exposing system api.

Test: TH
Bug: 204830222
Change-Id: I2b7c34958bc59c3225c96f12abba008b83101585
2022-01-20 13:10:36 +00:00
Junyu Lai
685a738d19 [MS45] Expose SystemApis to query summary and history with template
This includes:
1. queryDetailsForDevice: get history of network stats that
   matches the given template.
2. querySummaryForDevice: similar to the above one, but the
   result is aggregated over time.
3. queryDetailsForUidTagState: get history of uid stats that
   matches the given template, uid, tag and other conditions.
4. querySummary: similar to the above one, but the
   result is aggregated over time.
5. queryTaggedSummary: similar to the above one, but only
   return tagged data.

Test: TH
Bug: 204830222
Change-Id: Ic18010822a33e340b954e9c53dc515f3b6224d6d
2022-01-20 13:03:39 +00:00
Junyu Lai
304be56bdf [MS41.1] Prepare for APIs for querying usage with template
This CL includes:
1. Prepare for queryDetailsForDevice which allows callers
   to query history of networks that matches the given template.
2. Prepare for queryDetailsForUidTagState, which allows
   callers to query history uid stats with the given template,
   uid and other conditions.
3. Enforce fine location permission if the caller is querying
   data usage with a template which contains wifi network keys.

Test: atest NetworkStatsServiceTest NetworkStatsManagerTest
Bug: 204830222
Bug: 200768422
Change-Id: I6783d6bfd6e075e0b3ec8a3c91836377f1d71c7a
2022-01-20 13:03:35 +00:00
Treehugger Robot
a57618d34d Merge "Add AUDIO_FORMAT_LC3 in BtCodec" 2022-01-20 06:19:05 +00:00
Aaron Huang
f66050e681 Merge "Have NetworkStats implements iterable" 2022-01-20 04:09:00 +00:00
Paul Hu
f276eba866 Merge "Split out the nsd API surface and use framework-connectivity-tiramisu" 2022-01-20 03:02:56 +00:00
Treehugger Robot
0433d02aa5 Merge "[MS64] Remove subscriberId and NetworkId in proto" 2022-01-20 02:32:59 +00:00
Kevin Rocard
2f56b3ab02 Merge "Refactor Ringtone.playFallbackRingtone" 2022-01-19 19:42:26 +00:00
Benedict Wong
ab7f5b533d Merge "Revert "Revert "Listen for individual subscription mobile data toggles""" 2022-01-19 16:51:09 +00:00
Junyu Lai
95d764cfa8 [MS64] Remove subscriberId and NetworkId in proto
netstats.proto is about to move into mainline module.
And it can no longer see privacy.proto definition.
Thus, this change remove PII data that is not very useful
when debugging and any reference to privacy.proto.

Test: adb bugreport and check output at transponder
Bug: 204830222
Change-Id: I755530f356d2c16b336d62785c4c17c557f792db
2022-01-19 16:08:40 +00:00
paulhu
c100db56a2 Split out the nsd API surface and use framework-connectivity-tiramisu
- Split out nsd APIs and hidden APIs to Connectivity module.
- Keep the all files in f/b/packages/Connectivity-T and add
  framework-connectivity-tiramisu library on p/m/Connectivity.
  Then make framework to use this module library.
- Remove NsdService from SystemServer which will register from
  ConnectivityServiceInitializer

Bug: 206893064
Test: m online-sdk-dev-docs
Test: atest FrameworksNetTests CtsNetTestCases
CTS-Coverage-Bug: 207804007
Merged-In: I72c7de124b9cc53f2263bd452ecd5f39e88e485b
Change-Id: I72c7de124b9cc53f2263bd452ecd5f39e88e485b
2022-01-19 18:47:45 +08:00
Junyu Lai
f1245786d6 Merge "[MS24] Remove FileUtils.sync dependencies" 2022-01-19 09:18:48 +00:00
Treehugger Robot
5a1c3525f1 Merge "Remove ServiceManager usage from IpSecTransform" 2022-01-19 07:59:56 +00:00
Aaron Huang
1f7ddfeda2 Have NetworkStats implements iterable
Make NetworkStats be iterable and expose iterator as system API
which is better than expose size() and getValues().
This API could be used by the caller who needs to get entry
from NetworkStats.

Bug: 210073043
CTS-Coverage-Bug: 215061403
Test: build, TH
Change-Id: I6cb4c8f63d7067133f2722b2be7e16b4098a697d
2022-01-19 15:54:17 +08:00
Ted Wang
d9c9831f71 Add AUDIO_FORMAT_LC3 in BtCodec
Bug: 203621600
Test: make
Change-Id: I447b361c5efe578ba1b142791aee7043faf08f52
2022-01-19 15:35:00 +08:00
Junyu Lai
b52609172e Merge changes I16418791,I210f5ddc
* changes:
  [MS37.1] Expose APIs which is used by NPMS
  [MS55] Remove INetworkStats dependency from DataIdleTest
2022-01-19 07:08:15 +00:00
Junyu Lai
57c59fba4c [MS24] Remove FileUtils.sync dependencies
FileRotator will be built with Connectivity mainline module
while the file location will be kept inside platform.
Thus, hidden api usage needs to be addressed.

This change removes some dependencies by inlining the content
of FileUtils.sync to remove the dependency, and change the
Slog to Log.

Test: TH
Bug: 204830222
Change-Id: I6105850dd8311072fd8de2e2864d11fdb052f061
2022-01-19 07:07:34 +00:00
Junyu Lai
53d603a751 [MS37.1] Expose APIs which is used by NPMS
Test: TH
Bug: 204830222
CTS-Coverage-Bug: 213124616
Change-Id: I16418791246b12fc3da7348ed36b58274e20db54
2022-01-19 07:07:34 +00:00
Junyu Lai
90cd83a0d2 [MS55] Remove INetworkStats dependency from DataIdleTest
Replace binder call with NetworkStatsManager Apis.

Test: atest DataIdleTest
Bug: 204830222
Change-Id: I210f5ddc4c14c88253ce442292a1734091621ad8
2022-01-19 07:01:49 +00:00
Frank Li
df246f3c62 Merge "[DU04-1]Remove NetworkPolicyManagerInternal from NetworkStatsService" 2022-01-19 05:32:05 +00:00
Aaron Huang
b892406528 Merge "Replace buildTemplate* with NetworkTemplate.Builder" 2022-01-19 05:03:44 +00:00
Xiao Ma
13dbbcbc09 Merge "Fix the Preconditions dependency in EthernetNetworkSpecifier." 2022-01-19 03:23:17 +00:00
Treehugger Robot
070f2b0502 Merge "Migrating frameworks/base BT files" 2022-01-19 00:31:25 +00:00
Thiébaud Weksteen
dd9db63692 Merge "Transition SerialManager to @EnforcePermission" 2022-01-19 00:28:57 +00:00
John Wu
8c34efd29a Merge "Update AndroidKeyStoreMaintenance framework API" 2022-01-19 00:05:29 +00:00
Colin Cross
a9e0018834 Merge "Fix incorrect licenses in frameworks/base" 2022-01-18 23:31:25 +00:00
Treehugger Robot
e02ea9b779 Merge "Modify KEY_IMS_REASONINFO_MAPPING_STRING_ARRAY's description" 2022-01-18 23:21:56 +00:00
Gareth Vaughan
0702622783 Merge "Add new permission START_CROSS_PROFILE_ACTIVITIES" 2022-01-18 18:54:46 +00:00
Treehugger Robot
e0029a5a87 Merge "Setting ASM to version 7 in sdkparcelables" 2022-01-18 17:53:22 +00:00
Treehugger Robot
061654bdc3 Merge "Fix default value type : should be long instead of int .." 2022-01-18 16:54:45 +00:00
Treehugger Robot
79b1a4da7a Merge "Service: transmits empty station list" 2022-01-18 14:57:51 +00:00
Anton Hansson
09dcc2da3e Merge "Fix test source reference" 2022-01-18 14:43:24 +00:00
Anton Hansson
7e226700a5 Merge changes Ib1a1d1bb,If0362c6d,I6018791a,Id81c93ea,I7704a884, ...
* changes:
  Create a filegroup for public stub sources
  Minor refactorings in api.go
  Convert merged module lib stub to api.go
  Some minor tweaks for api.go
  Temporarily add support for conditional modules
  Construct sdk-annotations.zip programmatically
  Replace manual genrule modules with combined_apis
2022-01-18 14:18:43 +00:00
Treehugger Robot
a312a961e0 Merge "[MS63.1] Remove TrafficStats.TAG_SYSTEM_DOWNLOAD dependency" 2022-01-18 13:04:35 +00:00
Sorin Basca
e95eaf7f5a Setting ASM to version 7 in sdkparcelables
This is needed when using Java 11 as target.

Test: m
Bug: 195387473
Change-Id: I18abbdfee4039f9a366070b730930396ff4c210e
2022-01-18 09:03:12 +00:00
Meng Wang
7332dedcd1 Fix default value type : should be long instead of int ..
.. for KEY_TIME_TO_SWITCH_BACK_TO_PRIMARY_IF_OPPORTUNISTIC_OOS_LONG
and KEY_OPPORTUNISTIC_TIME_TO_SCAN_AFTER_CAPABILITY_SWITCH_TO_PRIMARY_LONG

Bug: 215048287
Test: make
Change-Id: Ic5505236dd10fad6f9a46e9cf24493d8b4cf8404
2022-01-18 04:57:29 +00:00
Xiao Ma
1c6c66c957 Fix the Preconditions dependency in EthernetNetworkSpecifier.
Ethernet service related files are going to be moved into Connectivity
module. Replace the Preconditions class in the EthernetNetworkSpecifier,
either add modules-utils-preconditions static lib dependency to fix it,
however, notice that will result in the duplicate class import when
moving ethernet stuff to p/m/Connectivity.

Bug: 210586283
Test: atest FrameworksNetTests EthernetServiceTests
Change-Id: I6163699be4126ef1b95dfb87ec9a6aba2c01195a
2022-01-18 04:50:41 +00:00
Roopa Sattiraju
33a02acc17 Migrating frameworks/base BT files
Bug: 206121418
Test: Compile and Test

Merged-In: Idb55371e9d678296fe46e5f4231ec2d12ec8b978
Change-Id: Idb55371e9d678296fe46e5f4231ec2d12ec8b978
2022-01-17 20:48:03 -08:00
Junyu Lai
45f0d14bc7 [MS63.1] Remove TrafficStats.TAG_SYSTEM_DOWNLOAD dependency
Replace with system Api.

Test: TH
Bug: 204830222
CTS-Coverage-Bug: 215043101
Change-Id: Ic14b26d2862f6fe8bee18fe0c9eaf183052452ee
2022-01-18 02:54:27 +00:00
Junyu Lai
6dc2fbcf27 Merge "[MS60] Remove TrafficStats.TAG_SYSTEM_APP dependency" 2022-01-17 23:59:10 +00:00
lifr
c1d2e899ac [DU04-1]Remove NetworkPolicyManagerInternal from NetworkStatsService
Expose system APIs for use by NetworkStatsService.

Bug: 211843446
Test: atest NetworkStatsServiceTest NetworkPolicyManagerTest
            NetworkPolicyManagerServiceTest
Change-Id: I56a066b7f4b4c2c8fefdd185c2e50de63b1e2629
2022-01-18 03:16:51 +08:00
Anton Hansson
4468d7c6bf Create a filegroup for public stub sources
For use by framework-doc-stubs, to avoid duplicating the list of
modules there.

Bug: 169103987
Test: m framework-doc-stubs ; diff intermediates before & after
Merged-In: Ib1a1d1bb9fcf866278c6ddd057712a9c92716dbf
Change-Id: Ib1a1d1bb9fcf866278c6ddd057712a9c92716dbf
2022-01-17 19:07:11 +00:00
Anton Hansson
fd31645f85 Minor refactorings in api.go
- Make a more generically useful "expandArray" function that can handle
  all the various transforms needed here (another one in the next cl).
- Move all the utility functions to the bottom of the file.

Test: presubmit
Merged-In: If0362c6dd90635831ac2cb2f7da336212f4c23fd
Change-Id: If0362c6dd90635831ac2cb2f7da336212f4c23fd
2022-01-17 19:07:10 +00:00
Anton Hansson
cb00f94596 Convert merged module lib stub to api.go
Bug: 169103987
Test: m framework-updatable-stubs-module_libs_api and diff intermediates
      folder before and after.
Merged-In: I6018791ae136bc764a6e846078c6bce59bcc123b
Change-Id: I6018791ae136bc764a6e846078c6bce59bcc123b
2022-01-17 19:07:09 +00:00
Anton Hansson
05e944d8df Some minor tweaks for api.go
- Make constants for re-used hardcoded module names
- Add a removeAll function
- Move filtering into individual "create" methods.

Bug: 169103987
Test: mmm frameworks/base/api
Merged-In: Id81c93eafdbdbbd0f55a4a906150b58a001392f6
Change-Id: Id81c93eafdbdbbd0f55a4a906150b58a001392f6
2022-01-17 19:07:08 +00:00
Anton Hansson
07a1295cfa Temporarily add support for conditional modules
Some bootclasspath libraries are currently conditionally included
in the SDK. Add support for that in api.go.

Bug: 169103987
Test: mmm frameworks/base/api
Merged-In: I7704a884675eb58c429a59f99a663cf09807ecec
Change-Id: I7704a884675eb58c429a59f99a663cf09807ecec
2022-01-17 19:07:07 +00:00
Anton Hansson
cc18e03e44 Construct sdk-annotations.zip programmatically
Avoid hardcoding the list of modules in yet another place.

Bug: 169103987
Test: diff zip before & after (identical)
Merged-In: Id3983bf5f4b96b23b1da09fd3617870ac3926ea1
Change-Id: Id3983bf5f4b96b23b1da09fd3617870ac3926ea1
2022-01-17 19:07:05 +00:00
Anton Hansson
ec450c058e Replace manual genrule modules with combined_apis
This simplifies the addition of new modules by cutting down the number
of lists that the new module must be added to. The combined_apis module
generates equivalent genrules in a programmatic fashion.

Bug: 169103987
Test: `mmm frameworks/base/api` before and after and compare the soong
      intermediates of that folder.
Merged-In: Ia718f9374042e5fbb2168476f5bad3b1867b8a05
Change-Id: Ia718f9374042e5fbb2168476f5bad3b1867b8a05
2022-01-17 19:07:04 +00:00
William Escande
55d6ce7be2 Merge "add test coveragee for BtProfileConnectionInfo" 2022-01-17 18:19:11 +00:00
Anton Hansson
7854980515 Fix test source reference
If not referencing the filegroup, the package name is not detected
correctly by metalava. This seems to have led to some IntDefs being
dropped.

Test: m sdk-annotations.zip ; diff before and after (notice
      android.test appearing)
Change-Id: I8db80aca28f73a5425618e82a2d7f5bf14e7e00a
2022-01-17 18:14:55 +00:00