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
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
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
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
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
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
Bug: 214615268
Test: Manually test signal passing from framework to bluetooth/system
Tag: #feature
CTS-Coverage-Bug: 214616659
Change-Id: I51766a0250058b01ed31ec5ebef914617ad72d9a
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
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
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
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
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
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
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
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
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
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
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
Replace android.provider.Settings.Global methods that return the default
value and hardcoding them inside the methods.
Bug: 213329727
Test: atest NetworkStatsServiceTest
Change-Id: I51d686222f983c8deb71d4b32f9e443e87a5e53e