Currently, socket tagging is implemented in the framework. The
Java code is in NetworkManagmentSocketTagger.java and the JNI is
in libandroid and loaded by the general framework JNI loader.
- Move the Java implementation to TrafficStats, which is the only
caller of NetworkManagmentSocketTagger. This simplifies the
code a bit because a number of methods can be deleted.
- Move the JNI code to a new JNI library in the APEX. The library
depends only on the NDK and statically links the NDK-only
version of libnativehelper. Its size is only 5k on ARM and 10k
on ARM64.
- Temporarily make the framework depend on this library until the
rest of the T connectivity code moves to the APEX.
Test: atest NetworkUsageStatsTest CtsNetTestCases:TrafficStatsTest
Change-Id: I050c7c515237f68b78d08987bc443f50a7949c06
Replaced "than" (comparative) with "then" (temporal) for the setTextSize JavaDoc. No functional change.
Change-Id: I84b5d1b250cb7a5d925cfbd0a86a2bfef55ade24
Null pointer exception occured while calling callsessionupdated on listener object.
Listener turned null at the time of executor method is on run. Null check is present before setting the call to executor.
Modified the null checks to be inside of the executor.
Test: Conference call in oriole userdebug
Bug: 210701681
Change-Id: Iffeedb669b4abb9b4f32f015aaea4ba3b99c00f5
Merged-In: Iffeedb669b4abb9b4f32f015aaea4ba3b99c00f5
Modified to schedule callbacks on main thread or callback executor rather than on binder thread
Introducing utility api runWithCleanCallingIdentity to run the action in executor
Test: atest FrameworksTelephonyTests:ImsCallTest
Bug: 197989471
Change-Id: Icdb0750d63f242eb79351781a4b75ca745c30083
Merged-In: Icdb0750d63f242eb79351781a4b75ca745c30083
Previously, conscrypt and i18n were excluded from the list of modules
from which combined_apis retrieved system and module-lib API files as
they did not provide those files. They now provide those files so no
longer need to be treated specially.
The conscrypt and i18n (and art) are excluded from the
framework-updatable-stubs-module_libs_api as that is used with a
java_system_modules that already provides the conscrypt and i18n
and art APIs.
Bug: 216435117
Test: m all-modules-system-stubs
m frameworks-base-api-system-current.txt
m frameworks-base-api-module-lib-current.txt
Change-Id: I58502249c59b1faa65fb288ac11becd9496ff37e
Previously, conscrypt and i18n were excluded from the list of modules
from which combined_apis retrieved annotation zip files as they did not
provide those files. They now provide those files so no longer need to
be treated specially.
Bug: 216435117
Test: m sdk-annotations.zip
Change-Id: I6db85a44715362dfb288ddf9010e2289233acf78
Currently, NetworkStatsService deletes tag data by calling
NetworkManagementSocketTagger, which then calls into libcutils
"qtaguid" code. Instead, make NetworkStatsService call into
libcutils directly and delete the NetworkManagementSocketTagger
code.
In the future, this will make it easier for NetworkStatsService
to perform this operation by calling directly into BpfNetMaps.
Because the unit test does not yet have working JNI code, provide
an internal TagStatsDeleter interface that can be mocked out via
the Dependencies class. This is a bit ugly but it will be deleted
as soon as the code uses BpfNetMaps directly.
Delete NetworkManagementSocketTagger#setKernelCounterSet since it
was replaced in aosp/1958917.
Also remove unused includes and make formatting changes suggested
by clang-format.
Test: m
Test: atest NetworkStatsServiceTest
Test: atest NetworkUsageStatsTest
Test: atest TrafficStatsTest
Test: stats deleted when CtsUsageStatsTestCases completes and test APK is uninstalled
Change-Id: I62987000afc185199821580232bfb7668c8e301e
Eliminate another two enumerations of all modules.
Bug: 169103987
Test: m android_{,system_}stubs_current && diff intermediates (no diffs)
Merged-In: I0d35f1e76320356ee4e5535a40614cf7d8ff4486
Change-Id: I0d35f1e76320356ee4e5535a40614cf7d8ff4486
Add a new API to return a unique key corresponding to a specific
VPN session, so that when VPN sends ACTION_VPN_MANAGER_ERROR
intent, the app can know if this intent is sent for the session
that the app is using.
Bug: 191413541
Test: atest CtsNetTestCases
Change-Id: I372308f7f4d20acf3ea17a322bc5f39e0bac460f
To make data usage as a mainline module, move getAllCollapsedRatTypes
to StatsPullAtomService since currently it is the only user. Also, the
method needs to call getCollapsedRatType, thus move getCollapsedRatType
to NetworkStatsManager and expose it as module API.
Bug: 210073043
Test: builds, FrameworksNetTests
Change-Id: Ibe41b50f173464694c21dd22841552bdb69a6a14
Move NETWORK_TYPE_5G_NSA to NetworkStatsManager. Also expose it as
module API so that it can be used out of module.
Bug: 210073043
Test: builds, FrameworksNetTests
Change-Id: I670c7e1405107bbe30b92fe1a8d81652c46de6d9