* 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: 63908092
Test: HwAccelerationTests
Do not start the animation at creation time
When starting, first update the time, so it doesn't think we skipped a
bunch of frames if we're resuming.
Continue storing the SkPicture when stopped, so that we can continue to
show the same frame, without a jump.
Change-Id: I5ac77f2561fc9f42f8f69ebfbee21fe647cfc75a
The current implementation schedules the next frame of the images
to be decoded after the current frame completes but potentially
schedules tasks that will result in a no-op execution if a new
frame is not yet needed.
Test: HwAccelerationTest
Change-Id: I0510cb5a1b801abd651327e924deb586af0306d6
Add the native method used to read the detail information of network
stats from bpf maps. The native method of NetworkStatsFactory should
choose the correct implementation to get the stats detail depending on
the kernel version. Currently the bpf result is printed as a reference
and the actual behavior of NetworkStatsFactory should not change.
Test: NetworkStatsFactory related cts test should not fail.
Bug: 30950746
Change-Id: I4715a23559b5b2306bd556cea0431f0ed172a993
ImageDecoder is a new way to decode Bitmaps (or Drawables) that
streamlines common use cases of BitmapFactory.
Bug: 63909536
Bug: 63908092
Test: I0f36ce34c968fd7fae4d8edebabea3a421859615
Ib2877276da8464b5f3eef0bbb848de202c90e97e
I8d1672180d8325ae1caf44f0bbf41036b94e6253
I405ebc86f7b6b019e0f040f1d4afe2e9d4354e5d
Iaeb7c27bafb351932f0fabe59461ef50b1e2424a
Change-Id: Iee236ac73e0bc37ef6903a8150c0d2c84e5cf906
Unhide some compressed audio formats for offloading
or direct output.
Unhide AudioManager method to query whether a given
format can be offloaded on the device.
Unhide AudioTrack.Builder method to request offload.
Unhide callback for new AudioTrack events and
associated methods.
Bug: 63934228
Test: same as MediaPlayer2 tests
Change-Id: If763eb2424baa6aa55cb60e96bb3564c4234e23f
Surface new callbacks from native AudioTrack to
Java through the existing callback method and
post to the Java instance.
New AudioManager method to query whether offload
is supported.
Allow using non-PCM format on a track built for
offload (new option in AudioTrack.Builder)
Numerous "todo" are added for the unhide of the
API additions and will be in a separate patch.
Bug: 63934228
Test: same as MediaPlayer2 tests
Change-Id: I98a81ffffc95c7596a39ee634dcb89bb854f3178
List of error codes defined in https://www.sqlite.org/rescode.html
Test: Cause an exception and verify error codes are expanded:
SQLiteConstraintException: NOT NULL constraint failed: test.num
(code 1299 SQLITE_CONSTRAINT_NOTNULL)
Bug: 30014655
Bug: 64262688
Change-Id: Ia4f5fedebea9803805e7ab27fa623a5eec1e5cfe
Previously, the format and internal format are the same, however, per
https://www.khronos.org/registry/OpenGL-Refpages/es3.1/html/glTexImage2D.xhtml,
this is no longer the case, thus we need to convert to proper format when we
have the sized format.
BUG: 72065799
Test: none
Change-Id: Ib1f90db6692b3629928ed664e5c775adfb4f63dd
* changes:
Track and persist in stats whether traffic is on the default network.
Add the default network to NetworkStats and NetworkStatsCollection.
Pass all default networks to NetworkStatsService
This allows us to maintain NetworkStats entries that track
whether the traffic was on the default network.
At the moment, the stats collection code always passes in
DEFAULT_NETWORK_NO. However, this value is a no-op, since it is
not persisted to disk. Only the ident, the uid/set/tag, and the
packet/byte/operation counters are persisted.
A future change will add defaultNetwork to the ident and start
persisting it.
Bug: 35142602
Test: runtest frameworks-net
Change-Id: Ifa291c62c0fa389b88e5561086a29dcd7cee2253
This saves us two atomic operations that a copy would cost us (inc +
dec), and hopefully makes some internal tooling -- which yet doesn't
model atomics well -- happy.
Bug: None
Test: Builds
Change-Id: Ic55c3db6af55f45eceaf30c1ee479e9ae70aabb4
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
Bug: 63909536
Bug: 63908092
Test: CtsGraphicsTestCases (ImageDecoderTest)
Refactor a method for calling postProcess from ImageDecoder. This will
be shared with the animated drawable (TODO). Call
PostProcess.postProcess in Java inside a try block to ensure that the
Canvas is released. Otherwise, a client could hold on to a pointer to
Canvas and keep using it, even though we have removed its backing.
In addition, share code for calling nDecodeBitmap.
Change-Id: I81ce2befce91ac1e27c78ad059c4b173a2c7e679
HwParcel's verifySuccess method doesn't actually check
to see if the call succeeded.
Change-Id: Iaa99cbfd6f5f211facaa20c09c5e1dae8e2b8a7f
Fixes: 71813867
Test: boot walleye, hidl_test_java
This patch makes sure getInternalFormat() returns GL_RGBA16F for FP16 bitmap,
getType() should return GL_HALF_FLOAT per spec
https://www.khronos.org/registry/OpenGL/extensions/OES/OES_vertex_half_float.txt,
finally, make sure checkFormat should enforce the correct format and type.
BUG: 72065799
Test: none
Change-Id: I63e79e11b1668b455e64ce20c6db806a1179fb6c
Bug: 63909536
Test: CtsGraphicsTestCases(ImageDecoderTest) and Skia
Depends on https://skia-review.googlesource.com/94620 in Skia.
Move the code for determining the actual sample size to Skia.
That code includes tests which caught bugs that are hard to
test for from the Java API. (Previously, we could end up using
the wrong sample size and then scaling unnecessarily.)
Change-Id: Ib3a5d70e4845e95b18af77668383d38746cb21fc
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
Bug: 71578461
Test: CtsGraphicsTestCases
Switch to SkCodec::MakeFromStream, and use its error code to determine
the Exception/error message. Then pass that to
SkAndroidCodec::MakeFromCodec. This is essentially what happened
previously (minus error reporting).
Change-Id: Iabaa61a4321d2f2e257db587013afda605b005b0