summaryrefslogtreecommitdiff
path: root/core/jni
AgeCommit message (Collapse)Author
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
2021-12-22Merge s-mpr-2021-12-05Eric Arseneau
Change-Id: Ic2889f5eb531008340529eadc36ec8efc62b1984
2021-12-13Merge mpr-2021-11-05Eric Arseneau
Change-Id: If7c68a17857eee4194f28413b938d5647820162c
2021-09-20Surface: Release references to BlastBufferQueue and SurfaceControl on ↵Vishnu Nair
Surface#destroy SurfaceView clients may hold on to surface references. In S this means they would extend the lifetime of the SurfaceControl resulting in "leaking" buffers until the references are cleared or the app is terminated. Fix this by calling a new destroy function on Surface which will explicitly remove references to the SurfaceControl and BBQ it holds. This is safe because SurfaceView controls the lifecycle of the Surface and knows when the Surface will become invalid. Once invalid, the Surface cannot become valid again. Test: repro steps in bug Bug: 198133921 Change-Id: I5c7e43736f025fc0965eae2f19719ba40df3cb70 Merged-In: I5c7e43736f025fc0965eae2f19719ba40df3cb70 (cherry picked from commit 43b0f37a70b36e0dd3b47352d3b5ecdd594e1551)
2021-09-03Surface: Release references to BlastBufferQueue and SurfaceControl on ↵Vishnu Nair
Surface#destroy SurfaceView clients may hold on to surface references. In S this means they would extend the lifetime of the SurfaceControl resulting in "leaking" buffers until the references are cleared or the app is terminated. Fix this by calling a new destroy function on Surface which will explicitly remove references to the SurfaceControl and BBQ it holds. This is safe because SurfaceView controls the lifecycle of the Surface and knows when the Surface will become invalid. Once invalid, the Surface cannot become valid again. Test: repro steps in bug Bug: 198133921 Change-Id: I5c7e43736f025fc0965eae2f19719ba40df3cb70 Merged-In: I5c7e43736f025fc0965eae2f19719ba40df3cb70
2021-08-24Remove support: libfeature_support_angle.soTim Van Patten
Remove support for ANGLE's libfeature_support_angle.so. This also removes all of the logic related to checking the rules file, since libfeature_support_angle.so is what parsed the JSON rules file. Bug: b/187342779 Bug: b/184757175 Test: make and manual verification ANGLE is loaded Change-Id: I02ac083fb8144465b60ac0ed2738c73b31addda1 Merged-In: I02ac083fb8144465b60ac0ed2738c73b31addda1
2021-08-11Merge SP1A.210811.001Brian Orr
Change-Id: I5aa7cf27a3a3cc16830c9947a826e30a0da481c4
2021-08-06Merge SP1A.210803.001Scott Lobdell
Change-Id: I09253f8614e9ee85a59460f3ef25f17dd98cac80
2021-08-04Send the HotwordDetectionService UID to AudioPolicyAhaan Ugale
This change follows the pattern of how the IME UID is set. The UID is stored in AudioService and re-sent there if the audio server dies. Fix: 194368677 Test: manual - hotword works when another app is using the mic and in Auto projection mode; also after restarting the process or killing audio server Test: atest HotwordDetectionServiceBasicTest Change-Id: I325cb33d17387e62302967b261b6fe61086d8893
2021-07-30SurfaceView: Synchronize destframe updates with SurfaceView size changesVishnu Nair
This CL fixes one of the issues with SurfaceView parent frame and content syncing. With BLAST, we have two surface controls each setting a scale. The parent surface control sets a scale based on the requested surface size and the SurfaceView layout size. The BlastBufferQueue surface control scales the buffer to the requested buffer size if the buffer has the appropriate scale mode. The destination frame controls the second scaling and it must be applied with the parent surface scale changes. This cl fixes flickers where the requested fixed surface size changes without any view size changes. This cl allows the caller to pass in a transaction to BLASTBufferQueue#update which is updated with the destination frame changes. This transaction can then be applied with the parent surface changes. This also fixes an issue where destination Frame was being set on every buffer update and when we updated the BlastBufferQueue size. Since buffer transactions can be queued up on the server side, a stale value maybe applied for a few frames causing flickers. Fixes: 194458377 Test: bug repro steps Test: atest SurfaceViewSyncTest#testSurfaceViewSetFixedSize Change-Id: I118bd1c3942b389e3951c3fd7389403895fc7b31
2021-07-27Merge SP1A.210723.002Scott Lobdell
Change-Id: I220cdfc5cb9db40162fd33f400a54591018d54cf
2021-07-23Merge SP1A.210715.002Scott Lobdell
Change-Id: I65e2b7db097927b87c9c4023015c754033c62086
2021-07-23Merge "Add mechanism for a task's windows to be trusted overlays" into sc-devWinson Chung
2021-07-22Implement java PerformanceHintManager on top of nativeBo Liu
Note some exceptions became silence errors in this conversion. Test: None Bug: 194204196 Change-Id: Ia3cc7f2396f2e307a23b40b3f104a2fa90352196
2021-07-21Add mechanism for a task's windows to be trusted overlaysWinson Chung
- Exposes a method to set that a certain part of the SF hierarchy is trusted, and sets this state for tasks in PIP. Bug: 191529039 Test: Manual, try using permission dialog while PIP is active Change-Id: I170cb5a7d22ef569eb36de21cc0bcbef60dd385e
2021-07-20More consistently retry system calls on EINTRHans Boehm
We were not retrying an accept() call om EINTR, resulting in occasional zygote failures. This fixes that, and a few other calls documented to potentially return EINTR. This is based on a quick seacrh of the two files affected by this CL. Bug: 193753947 Bug: 187992348 Test: Build and boot AOSP Merged-In: Icbfb38be5110607c121545e5c200ce65d1eefbfe Change-Id: Icbfb38be5110607c121545e5c200ce65d1eefbfe (cherry picked from commit c3dcb0d088e388d517d5e1dab7a46d361b231407)
2021-07-19Merge "Add PCM float profile if extended precision PCM shows but not pcm ↵TreeHugger Robot
float." into sc-dev
2021-07-16Add PCM float profile if extended precision PCM shows but not pcm float.jiabin
This is required for backwards compatibility. This ensures pre-S apps that look for pcm float continue to see that encoding if the device supports extended precision integers. Test: atest AudioManagerTest Bug: 193747274 Change-Id: Ia244bdcd51520dd082a292baab54f1795ccccaea
2021-07-14Add API to get GPU private memoryKalesh Singh
Remove getGpuDmabufUsageKb since the kernel no longer supports the sysfs nodes that this depends on. Add getGpuPrivateMemoryKb which uses the memtrack hal to report the system-wide GPU private memory. Bug: 193226716 Bug: 193465681 Bug: 192621117 Test: dumpsys meminfo Change-Id: Ib90505ec184339d5acbcd42c67dad3ad65dbd933
2021-07-14Merge SP1A.210709.002Haamed Gheibi
Change-Id: I4610885d5d770d858895057cdd9fea387a5e33dd
2021-07-12Merge "getGpuDmaBufUsageKb: Report usage in Kilobytes" into sc-devKalesh Singh
2021-07-12getGpuDmaBufUsageKb: Report usage in KilobytesKalesh Singh
getGpuDmabufUsageKb currently reports the total size of dma-bufs attached by the GPU device from /sys/kernel/dmabuf/buffer/<inode>/size nodes. However these sysfs nodes report the buffer size in bytes. Convert the value returned by getGpuDmaBufUsageKb to KB. Bug: 193403146 Test: Manual Change-Id: Ie17382794f7e4db34ddadf75488d8f82de435ae0 Merged-In: Ie17382794f7e4db34ddadf75488d8f82de435ae0
2021-07-09Merge SP1A.210624.001Scott Lobdell
Change-Id: I96a39cdca22771b76e89caebd53ed52416005092
2021-07-08Camera: Set metadata vendor id in extension proxy serviceEmilian Peev
Set the appropriate vendor id for any native metadata instantiated within the camera extension proxy service. Bug: 187341271 Test: Partner verified, Camera CTS Change-Id: I07e0be304baac017d44606c1612a24c520bed588
2021-07-08Merge "SurfaceControl: Query native object for transform hint" into sc-devVishnu Nair
2021-07-08Merge "Allow the kernel to upgrade ASYNC mode processes to SYNC mode." into ↵Peter Collingbourne
sc-dev
2021-07-07Allow the kernel to upgrade ASYNC mode processes to SYNC mode.Peter Collingbourne
On devices where the performance of ASYNC mode is similar to SYNC mode on certain CPUs, OEMs may choose to configure the kernel to prefer SYNC mode on those CPUs by writing the value "sync" to the sysfs node: /sys/devices/system/cpu/cpu<N>/mte_tcf_preferred The kernel will only respect the per-CPU preference if the user program allows this by specifying the preferred mode as a member of a set of allowed modes. Since only kernels with r.android.com/1754670 support specifying multiple modes, fall back to trying to specify a single mode if that doesn't work. Bug: 189966263 Change-Id: Ie7ada3b073178b7967f0819cbdadc2d8e3a2c648 Merged-In: Ie7ada3b073178b7967f0819cbdadc2d8e3a2c648
2021-07-05Merge "Add dalvik.vm.force-java-zygote-fork-loop" into sc-devHans Boehm
2021-07-02Merge "Revert "Extract info on LoadedPackage crash"" into sc-devRyan Mitchell
2021-07-02SurfaceControl: Query native object for transform hintVishnu Nair
When a new SurfaceControl was created, the java object's transform hint was not updated. This created a mismatch between the java and native objects resulting in the client getting an incorrect transform hint. Fix this by making the native object the source of truth for transform hints. Test: in landscape mode, dismiss apps and check launcher does not reject buffers Bug: 191841127 Change-Id: Icc87b8cf8158eedb87eea886392a0460a76c6443
2021-07-02Add dalvik.vm.force-java-zygote-fork-loopHans Boehm
Bug: 192020504 Test: Check logcat with and without the flag. Change-Id: Ia46a011125a6e245bbd9065d708d1f905d56e3af Merged-In: Ia46a011125a6e245bbd9065d708d1f905d56e3af (cherry picked from commit f2a815dcbf134e22a60c13121d0a94bf5d018ed5)
2021-07-02AndroidRuntime: pass odsign verification status to ARTOrion Hodson
ART will refuse to load on-device generated artifacts if odsign verification status suggests files have been tampered with. (cherry picked from commit a8b24392a1da6c3441f38acd623fbefaaa97d723) Bug: 180949581 Test: manual Merged-In: I772b5b7b191310bf7c7797161a304a1ab6f53c5e Change-Id: Ia0e5ebf4c763678fef55139af60b169f0e6fdeee
2021-06-29Revert "Extract info on LoadedPackage crash"Ryan Mitchell
The issue has not been reproduced since the finalizer synchronization changes were merged, so remove the signal handler and the stopship. Bug: 159041693 Test: boots Change-Id: I43a590c70a397c5c7eabd0a891d008d4cbfe1f76
2021-06-29Merge changes from topic "system-server-images" into sc-devOrion Hodson
* changes: Fix JNI error Revert^2 "Zygote: Load system server code early"
2021-06-29Merge "Isolate profile ref data" into sc-devTreeHugger Robot
2021-06-29Fix JNI errorTaesu Lee
Replace CallStaticVoidMethod with CallStaticObjectMethod. Bug: 192290163 Test: build & boot Signed-off-by: Taesu Lee <taesu82.lee@samsung.com> (cherry picked from commit 07e04b69a5368936fac185a6fbf8588bf0dc9d25) Merged-In: I02980e58bfd9bb334f1aa50c9e51a8ce4ae5e059 Change-Id: I1ae548e31722675b90be5447aa84e8f5e207cc98
2021-06-28Revert^2 "Zygote: Load system server code early"Orion Hodson
This reverts commit 6be3b0e117903c6aa696f91829012e74df8a4581. (cherry picked from commit d0d23f5a2be1b24cd707ae2fc27288fe00674269) Bug: 180949581 Test: atest odsign_e2e_tests Merged-In: I7a7dd5b475af4502dc9671d2dce02ee3673ddf81 Change-Id: I8a4ddc870816b47593184b06c4b36a41eda923f2
2021-06-23Isolate profile ref dataRicky Wai
Due to aosp/1708274, ref data directory is now world accessible. We need to fix ref data directory so that it does not leak app visibility information. Bug: 189787375 Test: AppDataIsolationTests Change-Id: Iffd8baa74f71ee7a97884f7564643740569556e4
2021-06-23Allow app zygote preload to retain files across forkEgor Pasko
The bug proposes to 'move' the /proc/self/fd/ readlink/stat/etc checks performed by the FileDescriptorAllowlist from before-fork to an earlier stage. The original aim was to allow the app zygote Preload hook to open ashmem/memfd read-only regions to save more RAM (around 5MiB on aarch64) via sharing more across processes. Potentially other files/sockets can be opened - the app zygote takes responsibility of managing file descriptor access controls across its own processes. App Zygote Preload does not run 3rd party code. Unfortunately a straightforward move of the checks to just-before-preload has disadvantages: * opens more codepaths for potential accidental misuse (the zygote accepts commands between preload and fork, there are valid usecases for extending these commands) * this way FileDescriptorAllowlist would need to support more file descriptor types (sockets and maybe pipes), which is not needed now because these FDs are closed right before forking The solution proposed here is to: 1. Determine the set of file descriptors open before preload 2. Run the preload hook 3. Determine FDs opened by the hook and allow them to remain open across fork 4. Hypothetical new attempts to preload (if ever supported) will not affect the allowed FDs - the preload will be able to toss its own FDs the way it wants, but not open the new-new ones Bug: 184808875 Test: Manual: unreleased Chrome patch: while in app zygote preload, create ashmem region, passes it to 'untrusted_app' (=browser process), and call mmap(2) on it. Change-Id: Ie302eabca83a0e4f409cb131e4308b73e5f6a580 Merged-In: Ie302eabca83a0e4f409cb131e4308b73e5f6a580
2021-06-22Merge "Update transform hint from relayout window (1/2)" into sc-devArthur Hung
2021-06-21Merge SP1A.210616.001Daniel Norman
Change-Id: I9acdc955f698dbebb8fad19cfd5cb71fcdd27b45
2021-06-18Merge "Revert "Revert "Release cblocks back to the free pool""" into sc-devTreeHugger Robot
2021-06-17Merge "Camera: Pass targetSdkVersion to camera service APIs" into sc-devTreeHugger Robot
2021-06-17Merge SP1A.210604.001Brian Orr
Change-Id: I5200ee05285ae422d5e9c1c00f45709a5d6188be
2021-06-17Update transform hint from relayout window (1/2)Arthur Hung
The transform hint is used to prevent allocating a buffer of a different size when a window is rotated. We return the fixed rotation transform and pass it to BLASTBufferQueue so the producer can choose to consume the hint and allocate the buffer with the same size. Bug: 188893403 Bug: 177029197 Test: atest WmTests Test: gfxbenchmark Test: atest libsurfaceflinger_unittest SurfaceFlinger_test Change-Id: If631984cf6b4b74ccdf19547fd6a63e759ed5732
2021-06-14Fix NativeThemeRebase null abortRyan Mitchell
ReleasePrimitiveArrayCritical will fail if the java object being released is null. The array may be null if `style_count` is 0. Do not call ReleasePrimitiveArrayCritical on the array if it is null. Bug: 190927589 Test: forest Change-Id: I432668f71137908838ebc3a47d834c1da3c67777
2021-06-14Merge "Parse dalvik.vm.ps-min-save-period-ms property" into sc-devTreeHugger Robot
2021-06-14Merge "Allow HotwordDetectionService access to audioflinger." into sc-devAhaan Ugale
2021-06-13Merge "libandroid_runtime & libhwui: use libstats*_lazy" into sc-devTreeHugger Robot
2021-06-11Camera: Pass targetSdkVersion to camera service APIsShuzhen Wang
This is needed to filter out small JPEG sizes based on targetSdkVersion to maintain backward compatibility. Test: Camera CTS Bug: 187913092 Change-Id: I75bbb4d6130df62c32b01de862ad1b79fcdb7b63