The JetPlayer implementation in libmedia was only used by the
JetPlayer JNI code in libandroid_runtime. This change moves
both implementation and JNI to libmedia_jni. This reduces
libandroid_runtime's dependency on libmedia, and results in
a net size reduction of the libraries involved.
Test: atest JetPlayerTest
Change-Id: I028c774fdea167924b064855267254c15f22fddb
Merged-In: I028c774fdea167924b064855267254c15f22fddb
To get profiling info, we need to avoid having compiled code.
Also pass down the --count-hotness-in-compiled-code for measuring
performance in compiled code.
Bug: 139883463
Test: manual
Change-Id: Ib02b476522b7709172fc06d6517446cad59045d4
If specified, does the same behavior as the dalvik.vm.profilebootimage
property used to do. The new property is called profilebootclasspath
and is in the runtime_native_boot namespace.
Added logic to pass down Xjitsaveprofilinginfo if profilebootclasspath
is specified.
Bug: 139883463
Test: adb shell setprop dalvik.vm.profilebootclasspath true
Test: look at logcat to verify the right options are passed down
(cherry picked from commit 7253961bd0)
Merged-In: I3e2ec37931a6f9239c5d0fa9fcaea61637061ac1
Change-Id: Iab2118822e522f9f80016c2c6ad42af9cd7eba03
This is a cherry pick to aosp.
Sets up a public api for logging atoms to statsd. The API excepts a
buffer which is already encoded in the proper format for the socket, as
well as the number of bytes of the buffer to write. It performs a JNI
call to perform the socket write. Autogenerated app code will be built
for each mainline module that needs to use this API to log.
Test: builds
Test: existing logs flow properly
Bug: 126134616
Change-Id: I8a9a91e638d730e3ff69cb9345692e49e0db3c96
Merged-In: I8a9a91e638d730e3ff69cb9345692e49e0db3c96
When starting ART, read property
""persist.debug.dalvik.vm.core_platform_api_policy" and pass its value
on the command line. This enables users to enable core platform API
violation reporting on demand. Note that the settings take effect after
a reboot.
Bug: 125701194
Test: compiles, boots, reporting observed
Change-Id: I97507afc85d8e186736700979c5dbf2ad0f79f12
Changes to android_opengl_* are generated by editing glgen stubs and
re-running gen script.
Bug: 124338141
Test: atest CtsGraphicsTestCases
(cherry picked from commit 61783592df)
Change-Id: I179f90177c8b1b50a923baecef3b5071a9a25ccf
Merged-In: I715123e66f4ace1d6a11a42c8eafc1d02995e88b
In order to notify netd to swap eBPF maps before pulling the
networkStats from eBPF maps, NetworkStatsFactory need to use the
NetdServices to issue binder calls. So it need to be moved from
framework/base/core to framework/base/service since object in
framework/base/core cannot get any system services. This change is also
necessary for setting up a lock inside NetworkStatsFactory to prevent
racing between two netstats caller since the lock need to be hold before
netd trigger the map swap.
Also fix the compile problem caused by moving the NetworkStatsFactory
and the related tests. Rename the packages and the jni functions to a
more proper name.
Bug: 124764595
Bug: 128900919
Test: NetworkStatsFactoryTest
android.app.usage.cts.NetworkUsageStatsTest
android.net.cts.TrafficStatsTest
Change-Id: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
In order to notify netd to swap eBPF maps before pulling the
networkStats from eBPF maps, NetworkStatsFactory need to use the
NetdServices to issue binder calls. So it need to be moved from
framework/base/core to framework/base/service since object in
framework/base/core cannot get any system services. This change is also
necessary for setting up a lock inside NetworkStatsFactory to prevent
racing between two netstats caller since the lock need to be hold before
netd trigger the map swap.
Also fix the compile problem caused by moving the NetworkStatsFactory
and the related tests. Rename the packages and the jni functions to a
more proper name.
Bug: 124764595
Bug: 128900919
Test: NetworkStatsFactoryTest
android.app.usage.cts.NetworkUsageStatsTest
android.net.cts.TrafficStatsTest
Merged-In: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
Change-Id: Ifcfe4df81caf8ede2e4e66a76552cb3200378fa8
Sets up a public api for logging atoms to statsd. The API excepts a
buffer which is already encoded in the proper format for the socket, as
well as the number of bytes of the buffer to write. It performs a JNI
call to perform the socket write. Autogenerated app code will be built
for each mainline module that needs to use this API to log.
Test: builds
Test: existing logs flow properly
Bug: 126134616
Change-Id: I8a9a91e638d730e3ff69cb9345692e49e0db3c96
The ANDROID_TZDATA_ROOT serves a similar purpose to the
ANDROID_RUNTIME_ROOT: it determines the location that can be used to
find time zone data files. Since the Android Core Library will soon
require it to be set it makes sense to check it alongside the
ANDROID_RUNTIME_ROOT variable.
Bug: 128422035
Test: build / boot
Change-Id: Ie4860f60760905a06a744bd48fd773d0a4e8cf6d
This CL adds introspection APIs for Audio Volume group
and callback notification on group volume change.
It allows to keep the same level of service available today
in CarAudioManager and is a starting point to get rid of Stream Alias
hard coded in AudioServer.
Bug: 124767636
Test: dumpsys media.audio_policy
Change-Id: I48909df93c146f071acd24cd3ecc608cb98b4d7e
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
The "gctype" device configuration flag (from the "runtime_native_boot"
namespace) was a string passed verbatim as an argument to the runtime
option "-Xgc". It was too generic, conveyed no typing information, and
was error-prone (there was no control over what was passed from the
server to the zygote, and then to the runtime).
This change replaces "gctype" with a specific, Boolean
"enable_generational_cc" flag. This new flag better reflects the
nature of the experiment to be conducted (either enable or disable
generational garbage collection in ART's concurrent copying
collector).
Test: core/jni/runtime_native_boot-flags-test.sh
Bug: 72446017
Bug: 120794191
Bug: 123754583
(cherry picked from commit 72b16f0ad0)
Change-Id: I5f30f38914bb44d6ce9dc6870ee2c566ce66278a
Merged-In: I30a73171c0dc3c7bc891c4f164eed0ba42b0f420
ART does not support changing the garbage collector type/configuration
dynamically at the moment, so we can only change it when the runtime
starts, i.e. at boot time.
Also materialize "gctype" and "runtime_native_boot" as named constants.
Bug: 120794191
Bug: 72446017
Test: adb shell device_config put runtime_native_boot gctype nogenerational_cc && adb reboot
Test: adb shell device_config put runtime_native_boot gctype generational_cc && adb reboot
(cherry picked from commit 7b098c8487)
Change-Id: Ied0eacf46ab92ba128d0a538a314f42c18c5b8f5
Merged-In: Ibf765a5f442136d6327be99786ea9ae4b4537d59
Added to the runtime_native namespace.
The new property overrides dalvik.vm.gctype if it's set.
Bug: 120794191
Test: adb shell device_config put runtime_native gctype CC,preverify
Test: adb reboot
(cherry picked from commit d2a975adb5)
Change-Id: I9ca29e9a5a0c94234fb14a725334dae82171679b
Merged-In: I30a2a3bcfb83f502f168c0d8588d80982a5f7d76
Adds a facility to sample the median luma in a region
of the SurfaceComposer's result.
Test: atest CompositionSamplingListenerTest
Bug: 124305231
Change-Id: I78eececa9aef420f488a860f4e6891d4af84d27f
The "gctype" device configuration flag (from the "runtime_native_boot"
namespace) was a string passed verbatim as an argument to the runtime
option "-Xgc". It was too generic, conveyed no typing information, and
was error-prone (there was no control over what was passed from the
server to the zygote, and then to the runtime).
This change replaces "gctype" with a specific, Boolean
"enable_generational_cc" flag. This new flag better reflects the
nature of the experiment to be conducted (either enable or disable
generational garbage collection in ART's concurrent copying
collector).
Test: core/jni/runtime_native_boot-flags-test.sh
Bug: 72446017
Bug: 120794191
Bug: 123754583
Change-Id: I30a73171c0dc3c7bc891c4f164eed0ba42b0f420
ART does not support changing the garbage collector type/configuration
dynamically at the moment, so we can only change it when the runtime
starts, i.e. at boot time.
Also materialize "gctype" and "runtime_native_boot" as named constants.
Bug: 120794191
Bug: 72446017
Test: adb shell device_config put runtime_native_boot gctype nogenerational_cc && adb reboot
Test: adb shell device_config put runtime_native_boot gctype generational_cc && adb reboot
Change-Id: Ibf765a5f442136d6327be99786ea9ae4b4537d59
Added to the runtime_native namespace.
The new property overrides dalvik.vm.gctype if it's set.
Bug: 120794191
Test: adb shell device_config put runtime_native gctype CC,preverify
Test: adb reboot
Change-Id: I30a2a3bcfb83f502f168c0d8588d80982a5f7d76
InputWindowHandle and InputApplicationHandle are moved from
com.android.server.input to android.view since commit 788f574.
The related jni declarations should also change to match the
java package for the invocation from java side.
Bug: 111440400
Test: atest WindowStateTests
Observe no UnsatisfiedLinkError in log
Change-Id: Iea4a1bfee25484d3633a8c4860106378908fd2fa
Removing AR from the Android code base. We had already severed the
connection to the AR HAL in Android Oreo. This change simply removes all
unused references and uses of the stubs.
Test: Build compiles. Ensure that clients that provide AR through other
channels continue to work.
Change-Id: I79d19c0bd2b80962cdecc8ad88065911fd6311ac
Bug: 120904891
Bug: 122844033
Bug: 122514935
Test: CtsGraphicsTestCases
Create an SkColorSpace when creating an android.graphics.ColorSpace.Rgb.
This allows simplifying getNativeColorSpace, so that each time we need
it, we do not need to call back up into Java or reconstruct the
SkColorSpace.
Funnel all ColorSpace.Rgb constructors into one, so we can set a final
mNativePtr in the base constructor. Update TransferParameters to also be
final.
Use the same TransferParameters as SRGB in EXTENDED_SRGB and DISPLAY_P3.
When passing a BitmapFactory.Options to native, call getNativeInstance()
(which may throw an Exception) and pass the result to native.
Move native ColorSpace code into its own file.
Make Paint methods @CriticalNative again, now that they do not need the
JNIEnv.
Remove unused decodeBitmap.
Change-Id: I60adbb060b87ab6f92559f1217bfefc0b9ea72e1
This change is the main check in for the historical app op feature.
The idea is to store a historical data about past app op rejections,
accesses, and durations per op for any UID state indefinitely.
Keeping all operations on record is not practical as app ops are
very frequently performed. To address this we are storing aggregated
data as snapshots where we store for every UID and its packages
how many times each op was accessed, rejected, lasted as an aggregate.
To allow history scaling indefinitely we are taking a logarithmic
approach with only the most recent state stored in memory and all
preceding state stored on disk. State on disk is stored in separate
files where each preceding file, i.e. for an older period, would
cover X times longer period with X number of snapshots covering
X times longer period. Initially X is ten but can be tweaked. For
example, the first file could contain data for ten days with daily
snapshots, while the file for older period would have data
for a hundred days with snapshots every ten days, etc.
The implementation is optimized for fast history update and no impact
on system runtime performance and minimizing memory footprint. We
are lazily persisting state to disk on a dedicated thread as this is
slow. We are also reading the relevant historical files on a query
as this is very rare as opposed to state updates.
The base snapshot interval, i.e. snapshot time span, in the initial
iteration and the logarithmic step are configurable. These can be
changed dynamically and the history would be rewriten to take this
into account.
Test: atest CtsAppOpsTestCases
bug:111061782
Change-Id: I55c32c79911ba12b2ace58d2a782b8df1e6bff60
Factorize native to JAVA audio effect descriptor conversion and
place in separate library so that it can be reused by components outside
of AudioEffect class.
Bug: 111438757
Test: make and run CTS tests for AudioEffects
Change-Id: I11eb13cfc08abb8d94ce30ab0d702df04943e1be