Preparation for removing implicit include paths for jni.h from soong.
Also remove unnecessary jni.h includes from PathParser.{h,cpp}.
Bug: 152482542
Test: lunch aosp_x86_64 && m checkbuild
Change-Id: Ib18afa3d2c93ed3ce69204286d5177991100fd7e
Exempt-From-Owner-Approval: build refactoring
If an application targets R+, prevent the application from being
installed if the app has a compressed resources.arsc or if the
resources.arsc is not aligned on a 4-byte boundary. Resources tables
that cannot be memory mapped have to be read into a buffer in RAM
and exert unnecessary memory pressure on the system.
Bug: 132742131
Test: manual (adding CTS tests)
Change-Id: Ieef764c87643863de24531fac12cc520fe6d90d0
When the target package update, check if the idmap file must change.
If so, propagate the idmap changes to the targets overlay paths, and
invalidate cached overlay ApkAssets in ResourcesManager.
Bug: 147794117
Bug: 150877400
Test: OverlayRemountedTest
Test: libandroidfw_tests
Change-Id: I6115c30bae3672b188a5ff270720a0eea15b43b5
When multiframe skp support was introduced it set the capture mode to
none for everything but the multiframe use case. This was incorrect in
the case of the CallbackAPI where we want to continue to capture frames.
Bug: 152084866
Test: hwui_unit_tests
Change-Id: I7e3caf41a3725d03252df1ab7bedfe1b69a238c2
Fixes: 153099745
Test: manual
The heif decoder may need to continue reading the input from a
JavaInputStreamAdaptor on the AnimatedImageThread. Attach the JVM like
we do for ByteBufferStream and ByteArrayStream.
Similarly, if the AnimatedImageThread is holding a reference to an
AnimatedImageDrawable, it is possible to call its destructor, and
ultimately InvokeListener's destructor or ByteBufferStreamAdaptor's
release_proc on that thread without the JVM attached. Attach in that
case, too.
Change-Id: I84d236eed2fb5c8617533aed0cae4c762d1eb6dd
AndroidBitmap_unlockPixels is the only way to release the ref on
pixels acquired using AndroidBitmap_lockPixels. Apps that lock an
immutable bitmap therefore are forced to call unlock pixels. Prior
to this CL the unlock would update the GenID of the bitmap and also
print a warning that the app was modifying an immutable bitmap. After
this CL the bitmap's GenID will not be updated and no warning will be
printed.
As a result, apps that were using the NDK to allow them to mutate
immutable bitmaps will break without getting a warning message.
Test: hwui_unit_tests
Bug: 150823341
Change-Id: Ie5e5cf86a7a83d53c179c9b3cf9be1a0566cfd93
Bug: 153071768
Test: AImageDecoderTest
For simplicity, I1aff544e8d6932b9ed0931a00da66a0aba6cd536 made
ImageDecoder skip specifying kOpaque when setting the SkImageInfo for
decoding. For some formats (e.g. jpeg and heif), this results in a log
message:
"Warning: an opaque image should be decoded as opaque - it is being
decoded as non-opaque, which will draw slower"
This isn't relevant to AImageDecoder, which doesn't let you specify
kOpaque or not (since the intent is not to create an SkBitmap for Skia).
Now that ImageDecoder specifies kOpaque properly, the JNI code no longer
needs to correct it.
Replace another opacity check with ::opaque() for simplicity.
Change-Id: I7c270d9b9db61a61a338f40b056ce5d23a56e14d
As we support zip64 in libziparchive, we change the parameter of
the ReadAtOffset() in zip reader from uin32_t to off64_t. So the
derived class needs to be updated as well.
Bug: 150900468
Test: build
Change-Id: Icbfd2dd54b01ff62da988ba8598c1057f9bb6368
This changes removes FrameworkResourceLoaderTest from frameworks/base
before it is moved to CTS.
Bug: 152979463
Test: atest CtsResourcesLoaderTest
Change-Id: I4b899564ab93472cb6d2a5ed0917026753c2827f
If ReliableSurface is forced to acquire a fallback buffer then the
Surface may be abandoned. When getting frame timestamps we need to check
that the Surface still exists.
Bug: 152262035
Test: builds, boots
Test: dumpsys gfxinfo
Change-Id: Ifdb198ebf74cc9dc681c4ab51c4901176a7f5fc9
This CL topic was created via:
find . -name OWNERS | xargs grep -l tobiast | xargs sed \
-i 's/tobiast/ngeoffray/g'
Plus appropriate repo start, git commit, repo upload commands:
while read proj; do croot $proj ; repo start OWNERS-tobiast-ngeoffray ; \
git commit -F ~/commit-message.txt; croot ; done \
< ~/owners-projects.txt
repo upload -t --br=OWNERS-tobiast-ngeoffray
No attempt was made to sort the files after the replacement.
Exempt-From-Owner-Approval: Both old and new owner are on this CL.
Test: Manually inspected the result.
Bug: 152399425
Change-Id: I2f100a71d399a7d4d46ea036fff564ff5c5dbda7
EncodedBuffer is used a lot in incidentd. EncodedBuffer uses malloc
internally to acquire memory. Frequently creating and destroying
EncodedBuffer creates memory fragmentation, leading to high memory
usage after taking an incident report.
Also fixes a few other places with lots of malloc/free operations.
This change:
* Creates a pool of EncodedBuffer in incidentd. The saving is
significant. It reduces EncodedBuffer creation from 3 per section to
3 per report.
* Replaces malloc with mmap inside EncodedBuffer. mmap is guaranteed
to be mem page aligned, so there will be no mem fragmentation after
destroying EncodedBuffer.
* Replaces new with mmap inside TombstoneSection
* Forks a process to execute LogSection, because liblog malloc & free
significant amount of memory
Result:
PSS before taking a report: 1295 KB
PSS after taking a report: 1336 KB
Bug: 150311553
Test: heapprofd
Change-Id: I83bd9c969b751c80b2f42747020799bd85d8aae6
Before overlays could reference internal resources, overlays were
added to AssetManagers before shared libraries. Overlays are now
loaded as shared libraries so they must be assigned package ids
after non-overlay shared libraries so enabling and disabling
overlays does not affect the package ids of the non-overlay shared
libraries.
Since overlays are added to the end of the AssetManager by
ResourcesManager, enabling and disabling overlays will not change
the assets cookie of shared libraries loaded through ResourcesManager,
but it will change the apk assets cookie or overlays added through
AssetManager#addAssetPathAsSharedLibrary.
The package ids of shared libraries added through
AssetManager#addAssetPathAsSharedLibrary will not be affected by
overlays since overlay package ids are assigned last.
Bug: 146685730
Test: CtsHostsideWebViewTests
Change-Id: If7ea17d51b18769bf2465e29af3ae6a71004d06c
This change must be reverted because it broke packages with the same
package name but different package ids loaded at once.
Bug: 146685730
Test: MultiSplitInstallTest
This reverts commit fe50d739f7.
Change-Id: If6364fd660c76284452f77e7d4f09a3df9dede1d
The API is simple enough, so just reimplement everything using the
C API directly.
Bug: 148940365
Test: treehugger
Change-Id: I0a75744e975e8d3c2a557e533eacd03200388ddc
Update statsd to take in times in milliseconds instead of nanoseconds.
Also make appropriate updates for graphics stats, odpm, subsystem sleep
state, and LibStatsPullTests
Test: atest LibStatsPullTests
Test: bit statsd_test:*
Bug: 150788562
Change-Id: I593552d6c50bb4dcb89ca9cc1c737781653e7cc5
Currently there is a limitation where ResourcesLoaders cannot be used
on Resources object not created through ResourcesManager. This change
creates an update handler for Resources objects that are not registered
with ResourcesManager.
The handler changes the loaders on the asset manager owned by the
Resources instance.
Bug: 151666644
Test: atest ResourceLoaderValuesTest
Change-Id: I5a89f686386bdb088dc964014e7becc0c2b4770f
Querying in the native layer for assets provided through
AssetsProviders does not currently work. This change refactors the
AssetProvider API to return a file descriptor that is read in the
native layer and can bubble up to the java layer.
This change also removes the InputStream API to favor of developers
using memfd_create.
Bug: 142716192
Test: atest ResourceLoaderValuesTest
Change-Id: I1a7eca0994c3b7cc32008d9a72bf91086ff0e816