Commit Graph

661469 Commits

Author SHA1 Message Date
markchien
8b99e0bdf9 Replace INetd#trafficSwapActiveStatsMap with ConnectivityManager API
INetd#trafficSwapActiveStatsMap is deprecated and the implementaion is
moved into tethering (connectivity) mainline module. A new
ConnectivityManager API swapActiveStatsMap is temprary exposed for
NetworkStatsFactory. Once NetworkStatsFactory move into tethering
module, swapActiveStatsMap API would be removed and NetworkStatsFactory
should could call the implemeneted inside the module directly. This
should happen before T sdk finalization.

Bug: 209935649
Test: atest NetworkStatsFactoryTest
Change-Id: I6685fe513511e7af9fa6521601891c66d1297da0
2022-01-21 19:24:08 +08:00
markchien
86b957648b Replace some netd calls in NetworkManagementService
Some netd binder calls which used in NetworkManagementService are
deprecated, replace them with new ConnectivityManager APIs. The only
caller for those replaced functions are NetworkPolicyManagementService.

Although NetworkPolicyManagerService starts before ConnectivityService,
it is fine for replacement because the order in SystemServer is
create ConnectivivtyService -> NPMS#bindConnectivityManager ->
NPMS#systemReady. NPMS#initService is called under NPMS#systemReady, it
guarantees that ConnectivityManager will always be initialized when it
is called.

Bug: 209935649
Test: m
Change-Id: I2142f997ae1086d1cc3f71d5b2f5c9cfe0466a76
2022-01-21 17:51:20 +08:00
Junyu Lai
af3d521d82 Merge changes from topic "ms65-identity" am: 3e389629aa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954383

Change-Id: I9f23eea029a8640fe12177c2a5575dd18163b201
2022-01-21 09:38:28 +00:00
Frank Li
991351f546 Merge "[DU07]Remove BatteryStatsImpl NetworkStats.subtract dependences" am: a078c73c47
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956076

Change-Id: I1c9d81559b8b1b4cc6dff8bb722f32fe0b0500e9
2022-01-21 09:38:01 +00:00
Junyu Lai
3e389629aa Merge changes from topic "ms65-identity"
* changes:
  [MS65.1] Add NetworkIdentity#Builder
  [MS46] Remove INetworkStatsSession usage from NetworkCycleDataLoader
2022-01-21 09:36:08 +00:00
Frank Li
a078c73c47 Merge "[DU07]Remove BatteryStatsImpl NetworkStats.subtract dependences" 2022-01-21 09:19:34 +00:00
Mark Chien
df5628980a Merge "Added callback from Tethering to PanService" am: e44282f897
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1751527

Change-Id: I72b811fde92861e3e942c5996895f899a40186d6
2022-01-21 09:01:53 +00:00
Mark Chien
e44282f897 Merge "Added callback from Tethering to PanService" 2022-01-21 08:43:53 +00:00
Treehugger Robot
56da05be6c Merge "[MS29] Remove Trace hidden API dependencies" am: be70a4353a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952201

Change-Id: I441fa0446d213d2ef95b214cfd66c8a260758d57
2022-01-21 08:31:33 +00:00
Frank Li
9c737b782c Merge "[DU03-1]Remove INetworkStatsService from BatteryStatsImpl" am: acd0aef603
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1948496

Change-Id: I49fa5db3a3d2c1de736044a55819e02f0eee71d1
2022-01-21 08:30:54 +00:00
Treehugger Robot
be70a4353a Merge "[MS29] Remove Trace hidden API dependencies" 2022-01-21 08:29:29 +00:00
Frank Li
acd0aef603 Merge "[DU03-1]Remove INetworkStatsService from BatteryStatsImpl" 2022-01-21 08:15:25 +00:00
Treehugger Robot
e817b6d6e7 Merge "Disable eject button for StubVolumes" am: fef33579a6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1914530

Change-Id: I622f12df0a4ef78162611c0cc05fcbe4bfbe44a4
2022-01-21 06:42:56 +00:00
Junyu Lai
c048d53e60 [MS29] Remove Trace hidden API dependencies
Since data usage related code is going to move to mainline module,
hidden classes and methods can no longer be accessed. Thus,
expose the needed system apis since there is no alternative.

Test: TH
Fix: 215152167
Bug: 204830222
Change-Id: I41046f90b9ff8f1755304e5d289584d39599fd13
2022-01-21 06:34:55 +00:00
Treehugger Robot
fef33579a6 Merge "Disable eject button for StubVolumes" 2022-01-21 06:27:37 +00:00
lifr
20689682e5 [DU03-1]Remove INetworkStatsService from BatteryStatsImpl
Expose systemapi NetworkStats.getDetailedUidStats for use by
BatteryStats.

BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.

Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
            MobileRadioPowerCalculatorTest NetworkStatsServiceTest
CTS-Coverage-Bug: 213437796
Change-Id: I40d713923278f4654d67bb4d12155cea85c10447
2022-01-21 13:52:41 +08:00
Sharon Su
92bea7818d Merge "Add new MANAGE_WALLPAPER_EFFECTS_GENERATION permission for the cts test" am: d1dfefffec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1955201

Change-Id: Id6663c97ce10c0006b9a654f4ffdb3bc53877726
2022-01-21 04:44:36 +00:00
Junyu Lai
c207cac6ad Merge changes from topic "ms57-migrationapi" am: 159be51df6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1951477

Change-Id: I81863c5db63eb3511fe905851734ab6faaf2fde6
2022-01-21 04:44:16 +00:00
Junyu Lai
e0ee61ea66 [MS45] Expose SystemApis to query summary and history with template am: 685a738d19
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1940846

Change-Id: If04320bcfe487352e6a15f7a9dc9e168ce6ff899
2022-01-21 04:44:14 +00:00
Sharon Su
d1dfefffec Merge "Add new MANAGE_WALLPAPER_EFFECTS_GENERATION permission for the cts test" 2022-01-21 04:33:53 +00:00
Junyu Lai
159be51df6 Merge changes from topic "ms57-migrationapi"
* changes:
  [MS57.1] Prepare APIs for data migration utility
  [MS45] Expose SystemApis to query summary and history with template
2022-01-21 04:26:57 +00:00
Yushin Cho
90ae857738 enc stat: Add feauture and its keys to MediaCodec
Add feature name 'EncodingStatistics' to MediaCodecInfo and its two
keys of average_qp and picture_type to MediaFormat.

App client chooses the 'Level' of an Encoding Statistics information,
where the Level decides the scope of encoding statistics that video
encoder provide the App client with.

With Android T, there will be one level only and the expected kinds
of encoding statistics are average block QP and the picture type of
a frame.

Bug: 205793764
Bug: 203696003
Test: cts
Change-Id: Id8c61de9646ac03926f00a9d223b022bbb9a6925
2022-01-20 20:16:08 -08:00
Treehugger Robot
ec3b9108c5 Merge "Update proto OWNERS for biometrics" am: 614c30b6b5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1955632

Change-Id: Icd0c45da526986c80460babdbbb9d89820ef41a3
2022-01-21 03:55:38 +00:00
Treehugger Robot
614c30b6b5 Merge "Update proto OWNERS for biometrics" 2022-01-21 03:35:16 +00:00
Frank Li
5840685367 Merge "[DU05]Remove the android.provider.Settings.Global in NetworkStatsService" am: b1a917a791
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1937445

Change-Id: Ifbc335a5a3b5a4285f75baac20c2d6995eb1c997
2022-01-21 03:19:47 +00:00
Frank Li
b1a917a791 Merge "[DU05]Remove the android.provider.Settings.Global in NetworkStatsService" 2022-01-21 03:03:51 +00:00
Hans Boehm
3492061b6d Prefer WeakReference.refersTo() to get()
This is an initial pass over frameworks/core to avoid WeakReference
get(), since that can cause the referent to be unnecessarily retained.
Most of these were found by searching for "get() == null".

Bug: 215259836
Test: Treehugger
Change-Id: I5227b05ca22e83b886ccf6713989961076df3f8c
2022-01-20 17:57:02 -08:00
Chen Chen
ad4c6c9492 SpatialAudio: Provide API to allow/disallow low latency audio
Bug: 214615268
Test: Manually test signal passing from framework to bluetooth/system
Tag: #feature
CTS-Coverage-Bug: 214616659

Change-Id: I51766a0250058b01ed31ec5ebef914617ad72d9a
2022-01-20 17:01:16 -08:00
Junyu Lai
e5934548bb Merge "[MS41.1] Prepare for APIs for querying usage with template" am: 22c1481659
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1937268

Change-Id: I36b6ca0261c998e57b48194bc14d465b8ada3193
2022-01-21 00:50:12 +00:00
Junyu Lai
22c1481659 Merge "[MS41.1] Prepare for APIs for querying usage with template" 2022-01-21 00:30:02 +00:00
Dave McCloskey
48ae5a7790 Add permissions to the shell to allow creation of CTS tests for trust.
Test: m TrustTestCases in separate CL
Bug: 213631672

Change-Id: Ie215e988eebe4103458b8be4d00698ae1121f75d
2022-01-20 15:48:11 -08:00
Ilya Matyukhin
12509d07d5 Update proto OWNERS for biometrics
Change-Id: I35d89fc8e441823eda5eb0503a92471eb17c690f
2022-01-20 15:48:07 -08:00
Etienne Ruffieux
d086e8ee72 Merge "Making Process.NFC_UID SystemApi for modules" am: 06580338e6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1945288

Change-Id: I96491cf3736685b252b3ea1ee801596a5e86495d
2022-01-20 23:42:50 +00:00
Phil Burk
a4cc251eb8 Include MIDI service OWNERS for internal/midi
Change-Id: Icabeeab73b3106e87041a0a9149560ad691640f4
2022-01-20 23:34:39 +00:00
Etienne Ruffieux
06580338e6 Merge "Making Process.NFC_UID SystemApi for modules" 2022-01-20 23:19:12 +00:00
Dmitri Plotnikov
0856f76846 Fix concurrency issue with BatteryUsageStats
BatteryUsageStats is created under a BatteryStatsImpl lock.  One of
the elements of BatteryUsageStats is the battery history buffer Parcel.
Once the BatteryUsageStats object is created, the BatteryStatsImpl lock
is released and the history buffer parcel continues to be appended
by BatteryStatsImpl.  The Parcel may even be reset altogether if the
battery stats session is reset.  The BatteryUsageStats object is parceled
during the getBatteryUsageStats binder call. Any modification of the
history buffer concurrent with parceling causes a crash.

Bug: 194256984
Test: atest FrameworksCoreTests:BatteryUsageStatsTest FrameworksCoreTests:BatteryUsageStatsProviderTest
Change-Id: I262c4608cd02943f926e8daaf3e782c6fe6eaee7
Merged-In: Ifb03a32275dfbea172cd28309a42349d6dd4bcd5
2022-01-20 23:04:22 +00:00
Etienne Ruffieux
fe195c9b7e Making Process.NFC_UID SystemApi for modules
In order for Bluetooth to be a mainline module, we need to
remove all hidden APIs calls from and to it. NFC_UID is
used inside BluetoothManagerService so we need to be able
to access it.

Tag: #feature
Test: make
Bug: 211851706
Change-Id: Ie778c4467f5db1efa1f759c405373cc3e34747ca
2022-01-20 19:09:50 +00:00
Dave McCloskey
c55ff91842 Merge "Add OWNERS file for TrustManager et al." am: 20b5b3c157
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1955199

Change-Id: I26f5e7657e2c9170a6e16ad7f471bebe08b253f0
2022-01-20 18:04:45 +00:00
Dave McCloskey
20b5b3c157 Merge "Add OWNERS file for TrustManager et al." 2022-01-20 17:43:56 +00:00
Junyu Lai
0157866be7 [MS65.1] Add NetworkIdentity#Builder
Test: atest NetworkIdentityTest#testBuilder
Bug: 204830222

Change-Id: Ifdb6482a54fb1e6999c82647d2710cb833c78d02
2022-01-20 17:12:14 +00:00
Junyu Lai
765f583a9b [MS46] Remove INetworkStatsSession usage from NetworkCycleDataLoader
Use public API instead. Also, since the android.app.usage.NetworkStats
is not friendly for test injection, add several util methods for
test injection.

Test: make RunSettingsLibRoboTests \ ROBOTEST_FILTER=NetworkCycleDataLoaderTest
Bug: 204830222
Change-Id: I1b8328010803050b5e1f176b47654ae18e8e1a0b
2022-01-20 15:03:04 +00:00
Jerome Gaillard
fb8841d1ff Add more owners for LayoutlibLoader.cpp
This file is only added in the host version of libandroid_runtime, to be
used by layoutlib in Android Studio. This adds the android graphics team
and members of the Android Studio team to OWNERS.

Test: N/A
Change-Id: I7a94198953e9ea0e7a0226c5c4f18fb9b0bc96f8
2022-01-20 14:41:59 +00:00
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
Oli Lan
869f53b3d7 Do not initiate clip classification again when copying to profile.
This is a follow-on from aosp/1942953.

After the changes in that CL, when copying a clip to a profile the
new method setPrimaryClipInternalNoClassifyLocked must be used, so
that classification is not started multiple times.

Bug: 215505009
Test: build and manual check
Test: atest ClipDescriptionTest
Change-Id: If4b7d863b1aa70d14e28d6cbd0cb9252a606fc66
2022-01-20 12:23:37 +00:00
Frank
77fb00ddde [DU07]Remove BatteryStatsImpl NetworkStats.subtract dependences
BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.

Bug: 213523117
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
            MobileRadioPowerCalculatorTest
Change-Id: I9e8d94259ad9845d94bfd78d971ff1a2cd7bb38e
2022-01-20 20:08:19 +08:00
Tom Bell
4ad04d5268 Ensure shortcodes beginning 40xx are free of charge as per ITU spec
https://www.itu.int/dms_pub/itu-t/oth/02/02/T020200006B0001PDFE.pdf

Change requested by WindTre, Vodafone for compliance with AGCOM.

Change-Id: I2e6e188bb3f19b6c673b77f1b8885940a2534e1d
BUG: 211727322
BUG: 213183041
TEST: new codes successfully pushed to device, 40400 does not show warning, 41000 does
2022-01-20 10:38:15 +00:00
Nataniel Borges
4e4babec1a Create owner test files for subpackages
Now failures can be automatically directed to the correct buganizer components and forwarded directly to the correct assignees, instead of being all created into the Winscope for further triage

Test: check owners file
Change-Id: I6876a702b4f46443328aab027f7fee994b2bb819
2022-01-20 10:21:40 +00:00
Jakub Tyszkowski
d041a82719 hap: Add constants for the Hearing Access Profile
This adds the Hearing Access Profile (HAP) identifier and
Hearing Access Service (HAS) UUID.

Bug: 150670922
Tag: #feature
Test: compilation
Sponsor: jpawlowski@
Change-Id: If1abbc01e0d5466a2a00ad41cfefdbbcdb0cac1a
2022-01-20 09:39:13 +00:00