This reverts commit daf17d415c1a99c515ffa75f3ec3bb0fb87627fe.
Reason for revert: Topic broke go/art-build. Reverting as ART Sheriff.
Change-Id: I913dcb82532d448116b0c60d98a91b9b7442d5c9
This got changed unintentionally in commit fffb273. Restore the
original behavior where JDWP will not be enabled for non-zygote apps.
Bug: 72400560
Test: atest CtsJdwpSecurityHostTestCases
Change-Id: I364a9d8b6e87efc1604741a7e5dd68221ed8e491
Add MicrophoneInfo to represent the microphone characteristics which
including location, orientation, frequency response, sensitivity,
channel mapping and other useful information.
Add a new API in AudioManager to query all current available
microphones.
Bug: 64038649
Test: Run test and check the print log.
Change-Id: Ie0dbfeeb84b88db426518b93c7bb83c8913bca85
* changes:
libandroidfw: Improve performance of AssetManager2
libandroidfw: Add ApplyStyle and SetConfiguration benchmark
Make idiomatic use of ApkAssets and AssetManager
Replace AssetManager with AssetManager2 implementation
Bug: 63909536
Bug: 63908092
Test: TODO
If ImageDecoder.decodeDrawable is called with an animated image Source
(currently GIF or WebP), return an object of a new (hidden) Drawable
subclass. The new Drawable animates, and it implements Animatable (TODO:
implement Animatable2) so users have some control over the animation.
In addition to the normal features of Drawable, this new one supports
many of the features of ImageDecoder, including scaling, cropping and
PostProcess, which enables circle masks/rounded corners and other
arbitrary after-effects. It does *not* support decoding directly to a
Hardware Bitmap, since it cycles through frames and reuses the same
bitmap memory. But it could be made to use shared memory (TODO?).
TODO: Use a better number for the native allocation registry
TODO: Use the RenderThread to drive the animation, and remove decoding
on the UI thread.
TODO: Add support for modifying the loop count
Android.bp:
- build new AnimatedImageDrawable.cpp
AndroidRuntime.cpp:
- register new native methods
AnimatedImageDrawable.java
AnimatedImageDrawable.cpp:
- new Drawable that handles animated images
Canvas.h, SkiaCanvas.h/.cpp
- New virtual method and implementation for drawing SkAnimatedImages
RecordingCanvas.h/.cpp
- Stub implementation of drawing SkAnimatedImages
ImageDecoder.h/cpp
- Allow code sharing with AnimatedImageDrawable.cpp
- postProcess
- access the ImageDecoder struct
Depends on https://skia-review.googlesource.com/c/skia/+/94660 in Skia.
Change-Id: Ie2ec98d9c52deda4d439c6ef8e5dea2861bb93a3
Before this change, seccomp filter setup is as early as in zygote's main
function. To make it possible to split app and system server's filter,
this postpone the setup to after fork. It also starts to call app
specific and system server specific setup function.
The filter setup is done in Zygote's ForkAndSpecializeCommon. This is
because adding a seccomp filter must be done when either the caller has
CAP_SYS_ADMIN or after the PR_SET_NO_NEW_PRIVS bit is set. Given that
setting PR_SET_NO_NEW_PRIVS breaks SELinux domain transition
(b/71859146), this must be done after Zygote forks but before
CAP_SYS_ADMIN is droppped.
Test: (cts) -m CtsSecurityTestCases -t android.security.cts.SeccompTest
Test: no selinux denial flood in dmesg with selinux enforced
Test: debuggerd -b `pidof com.android.phone` # logcat shows tombstoned
received crash request
Bug: 63944145
Bug: 71859146
Change-Id: I8215c8530d3d0de504a270488f8e29635805e8b0
There is already MeasuredText, so renamed existing MeasuredText to
MeasuredParagraph, then renamed PremeasuredText to MeasuredText.
Bug: 67504091
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsTextTestCases:*
Change-Id: Ie20bea9501b18fabb36f64d388a7851c4643d4c3
Move the native implementation of TrafficStats to NetworkStatsService
and apps need to get the NetworkStatsService binder interface from
system_server in order to get the network usage stats since boot. This
implementation can hide the detail of retrieving network traffic
information from apps and the NetworkStatsService can choose which
methoed it use to get the data depending on the kernel version of the
device.
Bug: 30950746
Test: CtsNetTestCases -t android.net.cts.TrafficStatsTest
Change-Id: I53bbefd19aa0b783b9b4b42ea4d76db3e9ec07a3
Bug: 63909536
Bug: 63908092
Test: CTS: I0f36ce34c968fd7fae4d8edebabea3a421859615
One-pager:
https://docs.google.com/document/d/1IWSdXb5O9lu-Zbj7SaNWo5pS7-FHlonFnqazjnecozM/
Design doc:
https://docs.google.com/document/d/15S6DSAV4EwOuJLv29UC_9cdSGdPg3KvOJVn2EHoP3fw/
ImageDecoder is designed to streamline certain patterns of BitmapFactory
use:
- choosing sample size based on actual dimensions
- choosing a specific output size
- post-processing (e.g. for rounded corners)
- copying to HARDWARE
- decode directly to ashmem
- creating a Drawable
- use as an alpha mask
- save RAM (e.g. use RGB_565)
In addition, it will include new features:
- animated drawables (TODO)
- report failures *and* optionally create a partial image
- crop
Add PostProcess to handle post-processing. It is separate from
ImageDecoder so that it may be used in the future by other commands that
might want something similar (e.g. capturing a View).
Consolidate NinePatch code for sharing between BitmapFactory and
ImageDecoder.
Some features left out of this CL:
- Create from ContentResolver + URI
- animation
- report more info in ImageInfo
- more overloads (e.g. null OnHeaderDecodedListener)
Change-Id: Icf011dc1b97b492788e47cf51fcf8abe8e9c7b88
Change the '-Xagentlib:jdwp=...' option to instead use the new
'-XjdwpOptions:...' syntax and remove the explicit transport-lib.
Add a '-XjdwpProvider:...' option. Set it to 'default' by default and
get its value from the 'dalvik.vm.jdwp-provider' property.
Test: Boots. Can debug apps
Test: Set dalvik.vm.jdwp-provider=adbconnection, stop, start, debug
Bug: 62821960
Change-Id: I1605030b94b38676c18885fcf2fa3490bccd3e0d
To measure text beforehand, remove static layout dependency from
MeasuredText. Now MeasuredText can compute native measured text
by itself and StaticLayout use it for line breaking.
This CL introduce one additional JNI method call per paragraph during
line breaking but looks negligible cost.
Here is a raw performance test result on walleye-userdebug.
StaticLayoutPerfTest (median, N=100):
createRandom: 7,879,440 -> 7,964,789 (+1.08%)
createRandom Balanced: 7,835,192 -> 7,848,151 (+0.17%)
TextViewOnMeasurePerfTest (median, N=100):
measure_AtMost: 92,599,175 -> 93,027,121 (+0.47%)
measure_Exactly: 89,949,922 -> 90,439,886 (+0.54%)
measure_Unspecified: 148,645,916 -> 150,047,694 (+0.94%)
Bug: 67504091
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:*
Test: bit CtsGraphicsTestCases:*
Test: bit FrameworksCoreTests:android.text.StaticLayoutTest
Change-Id: Ie932903845645e50cfa0cb428babb31a44babc47
... that returns PID of the process for debuggable builds.
This calls into the C++ equivalent of the function.
Test: lshal
Bug: 68992575
Change-Id: Ia177c709c6930510035cff33dc2389441a76351d
Add the ability to load GPU debug layers from the base
directory of debuggable applications.
This commit:
* Adds a new Setting to Developer options: "Enable GPU debug layers"
* Adds a new way to discover and specify GPU debug layers per app
* Moves much of the layer enabling logic into GraphicsEnvironment
* Removes the JNI component of ApplicationLoaders
Bug: 63708377
Test: Manual, CTS tests to follow
Change-Id: I7d33e9f835f49aa8d86e63bdb32037728bc8b6a4
We no longer need the native calls to ICU since we have ICU4J.
Fixes: 67786879
Test: bit FrameworksCoreTests:android.text.
Change-Id: Ib2ec93017000b4f0343756814ca388bd31457849
Corresponds to the -XX:ForegroundHeapGrowthMultiplier ART option.
Bug: 67416130
Test: make, flash, setprop
Change-Id: Ia9c70c62d8faa3b9aeb7b50dba237095abd53e80
Both native and java bindings.
TODOs:
- Finish WorkSources.
- Clean up the package names for the protos.
- Put the protos in a more suitable location.
Test: stats-log-api-gen-test
Change-Id: Idf4022225e2be05106dbcf7de8e97a3337fc63e2
The property is passed to runtime init as
-XX:MadviseRandomAccess.
Bug: 67772594
Test: make and getprop
Change-Id: I7cbab5d028067810276bc58c312806ea3785f93f
The libcutils interface cannot read properties with value length > 92
characters, whereas the libbase one can. ro.build.fingerprint may be
larger than this size in the future, so we move to libbase to prepare.
Bug: 23102347
Bug: 34954705
Test: build
Change-Id: Ic91aa63c7db1a7a01b9a1ee321b7854a9bcf6d12