summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-15Snap for 7825665 from 0cb6215dd6901502fc2ed12bc0cf532c58e0c3d4 to ↵android-12.0.0_r29android-12.0.0_r27android-12.0.0_r21android-12.0.0_r20android-12.0.0_r19android-12.0.0_r18android12-qpr1-d-s3-releaseandroid12-qpr1-d-s2-releaseandroid12-qpr1-d-s1-releaseAndroid Build Coastguard Worker
sc-qpr1-d-release Change-Id: Idde950abe99be3686f0b37d1f1c6ba5f6f9f4c76
2021-10-14Merge changes Ib7a08010,Idd72b82e into sc-qpr1-devChris Kuiper
* changes: sensorservice: Track Proximity state change when app goes idle. sensorservice: Refactor tracking logic for the Proximity sensor.
2021-10-14Merge "binderRpcTest: disable" into sc-qpr1-devTreeHugger Robot
2021-10-14sensorservice: Track Proximity state change when app goes idle.Chris Kuiper
This tracks the Proximity state change when an app subscribed to the Proximity sensor goes idle and its connection is paused. Bug: b/202328704 Tests: See b/202328704#comment9 for tests done. Change-Id: Ib7a08010d903406b67940de56a49e9efb200ad68
2021-10-14sensorservice: Refactor tracking logic for the Proximity sensor.Chris Kuiper
This simplifies the code that tracks if the proximity sensor is active by removing all counting of clients and simply checking the sensor's isSensorActive() method and reporting changes to it. Bug: b/202328704 Tests: See b/202328704#comment9 for tests done. Change-Id: Idd72b82ed0fd5ee089e795ab4b233241350979c2
2021-09-24Merge "Repeat proxy limit callbacks if we keep going above the limit." into ↵TreeHugger Robot
sc-qpr1-dev
2021-09-24Repeat proxy limit callbacks if we keep going above the limit.Martijn Coenen
When we hit the high watermark for number of live proxies in a process, we call a callback with the offending UID. ActivityManagerService will then kill all processes belonging to this UID. The proxy limit callback is only "re-armed" when the number of proxies for that UID drops below a certain value again. However, because the proxies beloging to the now dead processes will only be removed when the GC next runs, and restarted processes may start adding new proxies in the mean time, we may actually never drop below the lower threshold again, and never fire the callback again, despite an ever-increasing amount of proxies. To prevent this, repeatedly fire the limit callback every time that we go another # of high watermark proxies over the limit. This, in combination with a GC in the framework, should make sure that we regularly kill and clean up these processes. Bug: 198340142 Test: Manual Change-Id: I8d877d409863fdae9cffd43709b647d0c1edb440 Merged-In: I8d877d409863fdae9cffd43709b647d0c1edb440
2021-09-23binderRpcTest: disableSteven Moreland
This test is disabled in S, and some of the fixes required for old kernels aren't present here, but new systems are pulling it in. Fixes: 200742446 Merged-In: Ieaeee990843aafdf6baedadd2f26177d53feeb96 Change-Id: I7d50218c7a645196a9f92f9b4f0a2cd7c447eef5
2021-09-20Use sequence numbers to synchronize enabling Pointer Capture (1/2)Prabir Pradhan
InputReader only processes configuration change from its main thread. This means that if there is more than one Pointer Capture change request when the thread is busy or sleeping, it will only process the latest one. To ensure requests to enable Pointer Capture are synchronized with Dispatcher, we must use sequence numbers. Requests to enable Pointer Capture have a sequence number. Requests to disable Pointer Capture do not have a value. Bug: 195312888 Test: atest inputflinger_tests Test: manual with GeforceNow app, see bug. Merged-In: I6ae9c5498dc2f783b4c7211fa3665d42e29d2919 Change-Id: I6ae9c5498dc2f783b4c7211fa3665d42e29d2919
2021-09-15Merge "getProcessFreezeInfo reads more info from kernel" into sc-qpr1-devLi Li
2021-09-10getProcessFreezeInfo reads more info from kernelLi Li
Improve primitive binder function to check if a process has any pending binder transactions so that the freezer policy can choose to wait and drain those pending transactions. Bug: 198493121 Test: app launch/foreground/background stress test Change-Id: Ia7ce6899ddaeb8e8453b0b8f3536d129b6b761d3 Merged-In: Ia7ce6899ddaeb8e8453b0b8f3536d129b6b761d3
2021-09-10Merge "Add support for latching unsignaled buffers in Skia RenderEngine." ↵Derek Sollenberger
into sc-qpr1-dev
2021-09-09[automerger skipped] Surface: Release references to BlastBufferQueue and ↵Vishnu Nair
SurfaceControl on Surface#destroy am: fe4d05cd44 -s ours am skip reason: Merged-In I88fe98fa275dd76e20a5403c24bd2cb3bee5346d with SHA-1 c0fa0078cf is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15787430 Change-Id: I1a5f35936417277b7a96bc6b7796f58ee72c428a
2021-09-09Add support for latching unsignaled buffers in Skia RenderEngine.Alec Mouri
When we re-added support for latching unsignaled buffers we forgot to propagate this support to Skia RenderEngine, since we were assuming that latching unsignaled buffers would no longer be supported. Because partners are still relying on latching unsignaled buffers being available for good performance in some use-cases, Skia RenderEngine needs to wait on incoming buffer fences to prevent tearing. Bug: 196201621 Bug: 195033578 Test: atest librenderengine_test Merged-In: I1f3be882e55de20bdbfa3bf92bf0b8f88b8bc3ea Change-Id: I1f3be882e55de20bdbfa3bf92bf0b8f88b8bc3ea (cherry picked from commit 4ee7b493f770fefc81076131913061cfd407288f)
2021-09-08Surface: 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: I88fe98fa275dd76e20a5403c24bd2cb3bee5346d Merged-In: I88fe98fa275dd76e20a5403c24bd2cb3bee5346d
2021-09-08Merge "Surface: Release references to BlastBufferQueue and SurfaceControl on ↵Vishnu Nair
Surface#destroy" into sc-qpr1-dev
2021-09-07[automerger skipped] libbinder: uptimeMillis returns int64_t! am: 3ba4963f5b ↵Steven Moreland
am: 17aa765fd3 am: d666af6990 am: 62eaabc324 am: d21fe3951a -s ours am: bb79edeabe -s ours am skip reason: skipped by user smoreland Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15759163 Change-Id: I8f306c86ebd3ae91e82c97a75f482b3f528e02e0
2021-09-07[automerger skipped] libbinder: uptimeMillis returns int64_t! am: 3ba4963f5b ↵Steven Moreland
am: 17aa765fd3 am: d666af6990 am: 62eaabc324 am: d21fe3951a -s ours am skip reason: skipped by user smoreland Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15759163 Change-Id: Iec5da912d314e933555e504fefb9705fe0233634
2021-09-07[automerger skipped] libbinder: uptimeMillis returns int64_t! am: 3ba4963f5b ↵Steven Moreland
am: 17aa765fd3 am: d666af6990 am: 62eaabc324 am: 8cec52154e -s ours am: 993b1603d4 -s ours am skip reason: skipped by user smoreland Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15759163 Change-Id: I98a5f9bb0bc2492e3e1138abbb297eaf3f48fd9c
2021-09-07[automerger skipped] libbinder: uptimeMillis returns int64_t! am: 3ba4963f5b ↵Steven Moreland
am: 17aa765fd3 am: d666af6990 am: 62eaabc324 am: 8cec52154e -s ours am skip reason: skipped by user smoreland Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15759163 Change-Id: I7231522436c89fe75b0d96bd1c704545cef38bd9
2021-09-07libbinder: uptimeMillis returns int64_t! am: 3ba4963f5b am: 17aa765fd3 am: ↵Steven Moreland
d666af6990 am: 62eaabc324 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15759163 Change-Id: I53b504bbb6299988939674ba2b21344569c0da6d
2021-09-07libbinder: uptimeMillis returns int64_t! am: 3ba4963f5b am: 17aa765fd3 am: ↵Steven Moreland
d666af6990 am: 62eaabc324 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15759163 Change-Id: Ie9e50a46e486fecafac61d66b79095687d671a3f
2021-09-03libbinder: uptimeMillis returns int64_t! am: 3ba4963f5b am: 17aa765fd3 am: ↵Steven Moreland
d666af6990 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15720346 Bug: 197336441 Change-Id: I703760ecbfa007d27caf76556ed21bbf0558df80
2021-09-03libbinder: uptimeMillis returns int64_t! am: 3ba4963f5b am: 17aa765fd3Steven Moreland
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15720346 Change-Id: I51d7e7341d8af4788dbc224b7ab22129c235aa52
2021-09-03libbinder: uptimeMillis returns int64_t! am: 3ba4963f5bSteven Moreland
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15720346 Change-Id: Ic08346b606933f364a2dbdad7a09c97b9ef059e7
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: I88fe98fa275dd76e20a5403c24bd2cb3bee5346d Merged-In: I88fe98fa275dd76e20a5403c24bd2cb3bee5346d
2021-08-31Use a separate mutex for BLASTBufferQueue in BLASTBufferItemConsumerAlec Mouri
Avoids the following deadlock... Thread 1: * BLASTBufferQueue::transactionCallback acquires BLASTBufferQueue::mMutex * BLASTBufferItemConsumer::updateFrameTimestamps waits to acquire BLASTBufferItemConsumer::mMutex Thread 2: * BLASTBufferItemConsumer::onSidebandStreamChanged acquires BLASTBufferItemConsumer::mMutex * BLASTBufferQueue::setSidebandStream tries to acquire BLASTBufferQueue::mMutex Bug: 192998815 Test: Both CTS Media and Mediav2 (by partner) Change-Id: I37523031841db3f1a29481bbfa76d6c028a6942e
2021-08-31Merge "SF: fix a bug with DISPLAY_EVENT_MODE_CHANGE" into sc-qpr1-devAdy Abraham
2021-08-31Merge "swapchain: always return a signle image for shared presentation mode" ↵TreeHugger Robot
into sc-qpr1-dev
2021-08-30libbinder: uptimeMillis returns int64_t!Steven Moreland
This was limiting device uptime to ~1 month. Certainly, devices should update more frequently, but that decision should not be because of ubsan! This is a partial copy of the change Ifa00c32ee184795b03e16b39ac70ff41ebf00331 here. Bug: 197336441 Test: TH Merged-In: Ifa00c32ee184795b03e16b39ac70ff41ebf00331 Change-Id: Ib9f3e63e968ac77f0f6ea6447d586db588e9dbe4
2021-08-30SF: fix a bug with DISPLAY_EVENT_MODE_CHANGEAdy Abraham
SF might dispatch a DISPLAY_EVENT_MODE_CHANGE event before changing the actual mode. This can happen when the mode change takes more than a single refresh and caused by incorrectly checking the previously reported event without checking for the current mode. Bug: 194515308 Bug: 193945763 Test: SF unit tests Change-Id: Icf44e0fb6aadb76e629cd408907389e2626d2047 Merged-In: Icf44e0fb6aadb76e629cd408907389e2626d2047
2021-08-27Merge "Remove support: libfeature_support_angle.so" into sc-qpr1-devTreeHugger Robot
2021-08-26swapchain: always return a signle image for shared presentation modeAdy Abraham
Bug: 197790618 Test: atest CtsDeqpTestCases -- --module-arg CtsDeqpTestCases:include-filter:dEQP-VK.wsi.android.* Change-Id: If3c086479dfc03af31f503216294eba4fba989de
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: I3c52b07eb262f83f8e860584790ac058de58466a Merged-In: I3c52b07eb262f83f8e860584790ac058de58466a
2021-08-24SF: Tune RefreshRateConfigs for close refresh ratesAdy Abraham
Partial cherry-pick of 15a0fc65eedb633f4fbf988e4a319452ddaebdcc to fix seen in CTS Bug: 196404992 Bug: 196191168 Test: atest CtsDisplayTestCases.android.display.cts.DisplayTest#testModeSwitchOnPrimaryDisplay Change-Id: I9f8abac183bf6255fed4e2481d22aa3eb42b72ac Merged-In: I694e2aa5b16e9b4e0f6d1e8263b1ac35099605fd
2021-08-13[automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream ↵Xin Li
am: 62d46ebc11 -s ours am skip reason: Merged-In I2a2d02a0d7e67ee9577857a210cb6157683e5598 with SHA-1 52846cd871 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15550161 Change-Id: I5af46ba65d1c26d1218b68068ef5710a6056e672
2021-08-13Merge stage-aosp-sc-ts-dev before making it an upstreamXin Li
Bug: 169893837 Merged-In: I2a2d02a0d7e67ee9577857a210cb6157683e5598 Change-Id: I0c4b099b959d66900eebc2624c85e000a84e9c54
2021-08-13SurfaceFlinger: Safely cast from IBinder to Layer::HandleVishnu Nair
Bug: b/193034677, b/193034683, b/193033243 Test: go/wm-smoke, presubmit Change-Id: Iece64fca254edfd0b82e05ad9629824b2364cc13 Merged-In: Iece64fca254edfd0b82e05ad9629824b2364cc13
2021-08-12Merge ab/7633965The Android Open Source Project
Bug: 169893837 Merged-In: I2a2d02a0d7e67ee9577857a210cb6157683e5598 Change-Id: Iecdf0a17afe650483461978b42161940ce002101
2021-08-06Merge "Blast: Fix missing release callbacks for shared buffers" into sc-devandroid12-devVishnu Nair
2021-08-06Merge "SF: fix frame rate for layer tree" into sc-devAdy Abraham
2021-08-05Blast: Fix missing release callbacks for shared buffersVishnu Nair
Fixes an issue where buffers were compared only using the buffer id. In shared buffer mode, the client will queue up the same buffer id multiple times so we need to distinguish using the frame number as well. Test: https://buganizer.corp.google.com/issues/195447981#comment18 Fixes: 195447981 Change-Id: I2a2d02a0d7e67ee9577857a210cb6157683e5598
2021-08-05SF: fix frame rate for layer treeAdy Abraham
With the current implementation we might mark layers as NoVote incorrectly when a sibling has a frame rate. Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest Bug: 195205467 Change-Id: I62641f855a027e1192f9a85a4bc50692b1744764
2021-08-04sensorservice: ProximitySensor needs to report correct sensor state.Chris Kuiper
Calls to ProximitySensor::activate() may repeatedly set enabled=true. The current logic doesn't account for that. In order to correctly report the current sensor state, simply use mSensorDevice.isSensorActive() instead. Bug: 194878856 Test: 1) Reproduced problem and verified mIsProxActive in "dumpsys display" contains the correct value and no more 60/90Hz flicker. 2) Adding local debugs, then mixing making phone calls with additional "sensor_test sample -s8 -n5" commands to create several Prox clients, and verifying logged flags and reference counts. Change-Id: I2342844ff4e6301a6b9ac8a33dc3e6047fca83ad
2021-08-04sensorservice: Fix SensorDevice::isSensorActive().Chris Kuiper
SensorDevice::isSensorActive() currently returns "numActiveClients() > 0", but it should return ".isActive". An "active client" is really one that has some requested batching parameters stored, which it can do even while the sensor is disabled but, the isActive bool tracks whether the the sensor is currently enabled at the HAL, which is what we really want. Bug: b/194878856 Test: Together with ag/15459770: 1) Reproduced problem and verified mIsProxActive in "dumpsys display" contains the correct value and no more 60/90Hz flicker. 2) Adding local debugs, then mixing making phone calls with additional "sensor_test sample -s8 -n5" commands to create several Prox clients, and verifying logged flags and reference counts. Change-Id: Id4a13ebb5cde8de87ee7547d2989c3c0d1a69a09
2021-08-02Merge "SurfaceView: Synchronize destframe updates with SurfaceView size ↵Vishnu Nair
changes" into sc-dev
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: I216586842ff45bfd398659b5cc0c89eaf51394ff
2021-07-29Merge "Don't call invalidateHwcGeometry when handling transactions" into sc-devRob Carr
2021-07-29Merge "Prevent HDRLayerInfoListener traversal from running on every frame" ↵Rob Carr
into sc-dev
2021-07-28Prevent HDRLayerInfoListener traversal from running on every frameRobert Carr
We should only have to update the HDRLayerInfoListener in a few scenarios. 1. A new listener appeared 2. A buffer changed colorspace 3. Surface geometry (visibility, parenting, display, etc) changed We protect the traversal behind these flags to avoid the runtime in the hot path of continuous buffer updates. A follow up fix could consider directly recursively traversing and early returning if !Layer->isVisible. Bug: 186200583 Test: Existing tests pass, simpleperf Change-Id: I549fdf6ea228344f79f6989b86b8e73a6065158a