Once the data usage part moves into the module, the OEM would
lose the ability to modify the code, thus we need a mechanism
to prevent data loss during migration. Hence, provide a
helper class to read old version of persistent network
statistics, the implementation is intended to be modified
by OEM partners to accommodate their custom changes.
This interface will be invoked by NetworkStatsService during
the boot up phase in the migration process which will be
introduced in follow-up changes.
Test: atest NetworkStatsDataMigrationUtilsTest
Bug: 204830222
Change-Id: I4a9c8a04761b530ce0b31869f0d7fc191b00438f
Currently NetworkStatsService call
NetworkManagementSocketTagger#setKernelCounterSet which would call into
netd to update UidCounterSet bpf map. This change let
NetworkStatsService get UidCounterSetMap and update it directly. After
this change, NetworkManagementSocketTagger#setKernelCounterSet could be
removed because NetworkStatsService is the only caller.
Test: dump UidCounterSetMap to ensure it still have value after removing
netd code.
Change-Id: I7ae14106ded4fa55122e93e76c3057052a2fa33e
Remove the implementation of NetdTetheringStatsProvider#getTetherStats
and getNetworkStatsTethering since all callers are migrated to use
INetd#tetherGetStats directly.
Bug: 209738761
Test: run TrafficStatsTest NetworkUsageStatsTest
Change-Id: I69ac951704548c981d1c6ce8238c1d913d96ef62
This reverts commit 9c4045f7c9c265a3a7026d381ff7f502b810256c.
Reason for revert: API council feedback
Bug: 210800751
Change-Id: I2ebcc0a94aad393e75a6aaf2addc333eb7fa437f
Add a new builder constructor in Ikev2VpnProfile.Builder to allow
building Ikev2VpnProfile from a IkeTunnelConnectionParams object.
Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I586e7b24c35a777d39402148036d25606a733e85
CTS-Coverage-Bug: 184750836
Due to existing naming conventions these become
COLOR_Format32bitABGR2101010 and COLOR_Format64bitABGRFloat.
Bug: 197651595
Test: build
Change-Id: I9ce6177ec9d2a73ab9faa67c1d7c7d42fc9a35f7
ModemActivityInfoException is a SystemApi but the constructor
is not. There's a longstanding need to expose it for testing.
Bug: 186152174
Test: make update-api && make offline-sdk-docs
Change-Id: I609b4a893e2f4fad54d29e09234da08a45efac78
StorageManager.prepareUserStorage() can throw an exception if a
directory cannot be encrypted, for example due to already being
nonempty. In this case, usage of the directory must not be allowed to
proceed. UserDataPreparer currently handles this by deleting the user's
directories, but the error is still ultimately suppressed and starting
the user is still allowed to proceed.
The correct behavior in this case is to reboot into recovery to ask the
user to factory reset the device. This is already what happens when
'init' fails to encrypt a directory with the system DE policy. However,
this was overlooked for the user directories. Start doing this.
Bug: 164488924
Change-Id: Ib5e91d2510b25780d7a161b91b5cee2f6f7a2e54
We only need one defaults for doc-stubs. Add the module-classpath
defaults and api-db generation to the modules that need it instead.
Test: m framework-doc-stubs before & after and diff soong intermediates
Change-Id: I26066d1a8bb3ef190c89d840b52884d2b71ee977
This is used by NetworkPolicyManagerService to find
relevant networks of a given NetworkPolicy.
Test: TH
Bug: 204830222
Change-Id: I7176ab727bf208e0fd05ecb9c2bcb00cd3438031
Remove hidden APIs and replace the constants with SystemApi that are
exposed by NetworkTemplate.
Also fix typo and remove getElapsedRealtime() which is a hidden API
from StatsPullAtomService.
Bug: 210073043
Test: TH
Change-Id: I8b980417faf776b9b7b0fbcc4f04525b516452a0
Merged-In: I8b980417faf776b9b7b0fbcc4f04525b516452a0
Test: atest clockwork-settings-robotests
make RunSettingsRoboTests -j40
make RunSettingsLibRoboTests
ROBOTEST_FILTER=DataUsageControllerTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=NetworkCycleChartDataLoaderTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=NetworkCycleDataForUidLoaderTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=NetworkCycleDataLoaderTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=DataUsageUtilsTest
Bug: 204830222
Change-Id: I1e2eaf55f247b1c1104164721d7025f457fcd9a6
SummaryForAllUidLoader is using INetworkStatsSession hidden APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
Test: atest clockwork-settings-robotests
make RunSettingsRoboTests -j40
make RunSettingsLibRoboTests
ROBOTEST_FILTER=DataUsageControllerTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=NetworkCycleChartDataLoaderTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=NetworkCycleDataForUidLoaderTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=NetworkCycleDataLoaderTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=DataUsageUtilsTest
Bug: 204830222
Ignore-AOSP-First: Related API conflict, need master first.
(cherry-picked from ag/16689474)
Change-Id: Iac733a5021d0d79111c0350b694e4ed0ec90e262
Merged-In: Iac733a5021d0d79111c0350b694e4ed0ec90e262
Replace with public APIs. Since NetworkStatsHistory is no longer
accessible, use List<Bucket> as an alternative structure for
furthur manipulating.
Test: atest clockwork-settings-robotests
make RunSettingsRoboTests -j40
make RunSettingsLibRoboTests
ROBOTEST_FILTER=DataUsageControllerTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=NetworkCycleChartDataLoaderTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=NetworkCycleDataForUidLoaderTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=NetworkCycleDataLoaderTest
make RunSettingsLibRoboTests
ROBOTEST_FILTER=DataUsageUtilsTest
Bug: 204830222
Ignore-AOSP-First: Related API conflict, need master first.
(cherry-picked from ag/16681840)
Change-Id: I5336ceef43193343d707724066e2da40f1ff0633
Merged-In: I5336ceef43193343d707724066e2da40f1ff0633