Commit graph

9647 commits

Author SHA1 Message Date
TreeHugger Robot
76ad0655bb Merge "log when waiting on a servicemanager" into rvc-dev 2020-05-20 19:14:41 +00:00
Steven Moreland
fb10b6b588 log when waiting on a servicemanager
Since vndservicemanager is no longer installed by default, this gets hit
on those devices.

Fixes: 156571068
Test: TH
Change-Id: I31af865326e9a69042e5c53b63637b95d6de9ad1
(cherry picked from commit 39a572183a)
Merged-In: I31af865326e9a69042e5c53b63637b95d6de9ad1
2020-05-20 17:58:05 +00:00
Jooyung Han
513a77cffd Merge "setDefaultImpl aborts on a second call" into rvc-dev 2020-05-19 23:00:08 +00:00
Jooyung Han
01097e2410 setDefaultImpl aborts on a second call
The actual problem is that default implementation is set globally.
setDefaultImpl might not work as expected when it is called twice with
different instances.

Because we don't have a proper solution for the problem, we prevent
calling setDefaultImpl() twice by aborting.

Exempt-From-Owner-Approval: approved

Bug: 140139809
Test: ./runtests.sh (in /system/tools/aidl)
Merged-In: I659d3eaad3a45dcba608fa79a08f083f84bc4d58
Change-Id: I659d3eaad3a45dcba608fa79a08f083f84bc4d58
(cherry picked from commit 81087399e9)
2020-05-19 22:59:49 +00:00
Steven Moreland
63da46c3ec Merge "libbinder: do not destruct SM global" into rvc-dev 2020-05-19 17:43:53 +00:00
TreeHugger Robot
efde450428 Merge "gui/math/gralloc: Set min_sdk_version" into rvc-dev 2020-05-19 00:02:04 +00:00
Steven Moreland
26476f3e0b libbinder: do not destruct SM global
Let linux clean it up, since this may be accessed by some threads after
the main thread is destructed.

Bug: 154507808 # longterm
Bug: 156785633

Test: w/ repro which calls defaultServiceManager off main thread
Change-Id: Ic109f4bdca3893e6b0b192ac27f3ff03ada6f9e2
(cherry picked from commit 1698ffd088)
Merged-In: Ic109f4bdca3893e6b0b192ac27f3ff03ada6f9e2
2020-05-18 17:36:56 +00:00
Michael Hoisie
b5108191c3 Add null check for fgets in BufferQueueCore
When compiling BufferQueueCore for host linux, the following
warning/error occurs:

error: ignoring return value of function declared with
'warn_unused_result' attribute [-Werror,-Wunused-result]

Add a simple null check to avoid this error. This is a no-op in terms of
functionality.

Bug: 156675939
Test: m -j libgui
Change-Id: I460731ebaf0272fd5376f244e65b763da44e14f0
2020-05-14 20:05:17 -04:00
Chong Zhang
e5b112ae7c Revert "Make libbinder not available to media.swcodec apex"
This reverts commit c5d0344511.

Reason for revert: breaks ndk build on rvc-dev-plus-aosp, not sure why.

https://android-build.googleplex.com/builds/submitted/6492183/ndk/latest/view/logs/build_error.log

Change-Id: Ife18316c47a68a3d93c5a73eb47a142525dbbd0d
bug: 156531370
2020-05-13 21:56:03 +00:00
Chong Zhang
c5d0344511 Make libbinder not available to media.swcodec apex
media.swcodec no longer depends on libbinder.

bug: 139201422
bug: 139016109
test: builds
Change-Id: I633e733902d4d26c0a9249113b6cf4bdde0877ee
2020-05-13 10:03:25 -07:00
Jooyung Han
54042e0ae4 gui/math/gralloc: Set min_sdk_version
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Change-Id: Ib7685f5f4f924ac145eb4f10ad83a6c0548b2206
2020-05-13 18:03:28 +09:00
TreeHugger Robot
942c53703f Merge "Provide a fixed transform hint if the layer is in a fixed orientation 1/2" into rvc-dev 2020-05-11 23:51:56 +00:00
Josh Tsuji
7db72bbbbf Merge "Make TYPE_TRUSTED_APPLICATION_OVERLAY a trusted overlay." into rvc-dev 2020-05-11 20:24:34 +00:00
TreeHugger Robot
01ab4a277f Merge "AChoreographer: Avoid potential NULL dereference" into rvc-dev 2020-05-11 17:59:59 +00:00
Steven Moreland
49b69b8655 Merge "binder tests respect libbinder bitness" into rvc-dev 2020-05-11 17:45:59 +00:00
Greg Kaiser
b66d04b0a2 AChoreographer: Avoid potential NULL dereference
We move our nullptr check to before our dereference of the pointer.

Test: TreeHugger
Bug: 154874011
Change-Id: If1e51b8fb88f72b6b4cbda52543bf093e6c76ca9
2020-05-11 13:53:59 +00:00
Jooyung Han
7bcb89317d Set min_sdk_version to be part of mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Exempt-From-Owner-Approval: cherry-pick from aosp

Bug: 152655956
Test: m
Merged-In: Ifea5ed988fad2e0d29271e6e9cbf0e12100b37d9
Change-Id: Ifea5ed988fad2e0d29271e6e9cbf0e12100b37d9
(cherry picked from commit a395c8d9aa)
2020-05-11 08:33:49 +00:00
Vishnu Nair
6213bd9001 Provide a fixed transform hint if the layer is in a fixed orientation 1/2
The transform hint is used to prevent allocating a buffer of a
different size when a layer is rotated. The producer can choose to
consume the hint and allocate the buffer with the same size.

Provide the graphic producer a transform hint if the layer and its
children are in an orientation different from the display's
orientation. The caller is responsible for clearing this transform
hint if the layer is no longer in a fixed orientation.

Bug: 152919661
Test: atest VulkanPreTransformTest
Test: confirm with winscope trace, buffers are allocated taking into
account the transform hint in fixed orientation scenarios
Test: go/wm-smoke

Change-Id: Iea9dcf909921802a5be5c44dd61be3274f36bbd8
2020-05-08 17:44:10 -07:00
Alec Mouri
a511811bd9 Merge "Receive refresh rate callbacks from DMS" into rvc-dev 2020-05-08 23:54:17 +00:00
Steven Moreland
f9f3de2434 binder tests respect libbinder bitness
Some 32-bit kernels use a binder kernel interface with a different API
controlled by the kernel configuration CONFIG_ANDROID_BINDER_IPC_32BIT.
This changes builds versions of these tests built for this bitness
specially so that they can run and work on these devices.

Test: atest --all binderLibTest{,_IPC_32} binderDriverInterfaceTest{,_IPC_32}
Bug: 154755898

Change-Id: I82b47e8064564a037bf8ed453e9ae7b8901b5667
2020-05-08 13:36:09 -07:00
Alec Mouri
271de040ff Receive refresh rate callbacks from DMS
AChoreographer will use DMS as the source of truth for these callbacks
instead of SurfaceFlinger.

Bug: 154874011
Test: ChoreographerNativeTest
Tes: Manually verify that HWUI is processing refresh rate callbacks
Change-Id: I961a7d1ab335800d3e260ba7564ddca9c0595cfc
2020-05-07 19:17:54 -07:00
John Reck
401cda638e Add hook for intercepting query
Bug: 143555869
Test: verified no kgsl maps in RenderThread
Change-Id: Ifac5869cd6b29570286f8fd2aa641701f77fde94
2020-05-07 16:49:19 -07:00
Joshua Tsuji
466cdea8d2 Make TYPE_TRUSTED_APPLICATION_OVERLAY a trusted overlay.
Test: accept a permission dialog while bubbles are there too
Fixes: 149320322
Change-Id: I3767e2d93d0bcb216483a12d94ffb13ca0051c7e
2020-05-07 21:58:36 +00:00
Siarhei Vishniakou
7e838c2377 Merge "Use <chrono> for input-related timeouts" into rvc-dev 2020-05-07 17:46:17 +00:00
TreeHugger Robot
bd1a5621b6 Merge "Add test to call setInputWindows twice" into rvc-dev 2020-05-07 16:47:00 +00:00
Siarhei Vishniakou
097c3db9fc Use <chrono> for input-related timeouts
There is a lot of confusion in input tests about the units used for the
timeouts. In a lot of cases, the timeouts are set too short, which
causes failures when they start getting enforced. To avoid this, use
std::chrono::duration for the timeouts.

Ideally, we should convert InputWindowInfo and InputApplicationInfo to
use std::chrono::nanoseconds, but that would be a larger change reserved
for a future release.

Bug: 143459140
Test: atest inputflinger_tests libinput_tests inputflinger_benchmarks
Change-Id: Ie7536e8a042a71b372f03314501e0d635a6ac1d4
2020-05-06 21:25:36 -07:00
Siarhei Vishniakou
fb9fcdae2f Add test to call setInputWindows twice
Currently, I'm observing some strange behaviour, where calling
setInputWindows twice results in the touchable region becoming empty.
Add this test to R to see what's going on, and potentially bisect on
this.

Bug: 143459140
Test: atest inputflinger_tests
Change-Id: Ia0acef5d4ee4acc29d20174fe44c9f94172ccd96
2020-05-06 21:25:31 -07:00
Wei Sheng Shih
7fb7a6a1a5 Merge "Makes TYPE_NOTIFICATION_SHADE as trusted overlay" into rvc-dev 2020-05-07 01:37:07 +00:00
Hui Yu
ae1e9f614a Merge "Revert "Add isUidActiveOrForeground for camera/audio to use."" into rvc-dev 2020-05-06 16:59:34 +00:00
wilsonshih
9499a112e3 Makes TYPE_NOTIFICATION_SHADE as trusted overlay
Fix the side effect after we split notification_shade window from status
bar.

Bug: 155373298
Test: follow the steps from b/149320322
Change-Id: I3362186b22505d21ec6e0ad779d4a26304ed782c
Merged-In: I3362186b22505d21ec6e0ad779d4a26304ed782c
2020-05-05 04:44:23 +00:00
TreeHugger Robot
2e7d28cc8e Merge "GLESRenderEngine: validate eglQueryStringImplementationANDROID for nullptr" into rvc-dev 2020-05-05 00:19:14 +00:00
Hui Yu
94ea7ac7e0 Revert "Add isUidActiveOrForeground for camera/audio to use."
Revert submission 10829580-isUidForeground

Reason for revert: In CameraService.cpp, before this change, around "am.isUidActive", there was up to 300 ms retry. After this change, the code could move forward fast without retry, but at "mAppOpsManager->startOpNoThrow" call, for the same reason as uid is not updated fast enough, "mAppOpsManager->startOpNoThrow" could also fail.

This CL does not really fix the root cause, but it changes the timing and now the code fails at "mAppOpsManager->startOpNoThrow" call.

Also the timing change may also cause recent multiple CTS test failures.

Bug: 154570809, 155032617, 154849083


Reverted Changes:
Iffed63293:Add isUidActiveOrForeground() for camera/audio to ...
I3685e0c8d:Add isUidActiveOrForeground() for camera/audio to ...
I51ed1fe78:Add isUidActiveOrForeground for camera/audio to us...

Change-Id: I9fbeb190c5a0ac640ad5be8140fe4aaeb7cfe33d
2020-05-04 18:07:46 +00:00
Michael Hoisie
49497c9af7 Merge "Update libgui to use android::base properties instead of cutils" into rvc-dev 2020-05-02 20:49:42 +00:00
Steven Thomas
32bc62dc0e Merge "Split refresh rate range into two ranges" into rvc-dev 2020-05-02 02:12:38 +00:00
Dheeraj Shetty
5b7d7e2150 Merge "Revert^2 "libui: rewrite Region with FatVector"" into rvc-dev 2020-05-01 23:27:43 +00:00
Michael Hoisie
53e19a76a4 Update libgui to use android::base properties instead of cutils
Clean up cutils/properties.h headers as some files were including it and
not using it.

Also update DebugEGLImageTracker to use android::base properties because
it works on host and is generally more concise.

Bug: 155436554
Test: build, flash and boot
Change-Id: I1dc7060cae9811b69aac9bb36b71b69cd6ecba93
2020-05-01 17:57:38 -04:00
Steven Thomas
f734df4201 Split refresh rate range into two ranges
To prevent low-priority refresh rate considerations from overriding the
app frame rate as specified via the new setFrameRate() api, split the
display refresh rate range into "primary" and "app request" ranges. The
primary range includes the low priority considerations, while the app
request range removes two lower priority considerations.

In general, surface flinger will keep the display refresh rate within
the primary range, but layers with frame rate settings via the
setFrameRate() api may cause surface flinger to pick a refresh rate
outside the primary range. Surface flinger will never choose a refresh
rate outside the app request range specified by display manager.

Bug: 148978562

Test: - Added a new unit test to DisplayModeDirectorTest to verify that
        display manager strips lower priority considerations when
        deciding the app request range.

- Added a new unit test to RefreshRateConfigsTest to verify
  RefreshRateConfigs handles the primary vs app request range
  correctly.

- Manual test: Confirmed that with the "force 90Hz refresh rate" option
  turned on, we don't switch to 60Hz when playing a 60Hz video.

- Manual test: Confirmed that with the "force 90Hz refresh rate" option
  turned on, when an app calls setFrameRate(60), we stay at 60Hz.

- Manual test: Modified a Pixel 4 XL to prefer 60Hz in low brightness,
  entered low brightness, and confirmed we don't touch boost to 90Hz.

- Manual test: Confirmed that Maps stays at 60Hz on Pixel 4.

- Manual test: Turned on verbose logs in RefreshRateConfigs.cpp,
  confirmed they look good.

- Manual test: Inspected dumpsys output, confirmed the primary and
  app request refresh rate ranges are printed correctly.

Change-Id: Ib16cc9b6158efa575cdbfbb7a0ad014008a3e5af
2020-05-01 12:00:01 -07:00
Jagadeesh Pakaravoor
a9a6b46b9c Revert^2 "libui: rewrite Region with FatVector"
Revert submission 10449863-revert-fatvector

Reason for revert: b/149254345

Original change (of introducing FatVector) was reverted as a stop-gap solution to fix the aforementioned bug.

The bug was caused by an ABI lock between Surface's definition (that changed with Region) and lib-imsvt prebuilt.

Enabling this change now as we have re-compiled the prebuilt with the change enabled. Doing that via a revert of the revert.

Reverted Changes:
I8ac66acb8:Revert "hwui: remove FatVector"
Ib60dbf3ef:Revert "libui: rewrite Region with FatVector"

Original changes:
I09dc2fddd:hwui: remove FatVector
I265c6c831:libui: rewrite Region with FatVector

bug: 149254345

Change-Id: I723283a952e0908f595967af0037b0dc1351671b
2020-05-01 15:57:33 +00:00
Lucas Dupin
50f6c0e2d3 Merge "Apply display translation to blurred result" into rvc-dev 2020-04-30 23:04:39 +00:00
Lucas Dupin
19ce655ecf Apply display translation to blurred result
Test: on notched device, hide cutout, swipe down the shade
Fixes: 155130038
Change-Id: I216c77d2c6695c8faf8a0502f9d403a76403a2f6
2020-04-30 14:45:23 -07:00
Ady Abraham
3ef1b76f9c GLESRenderEngine: validate eglQueryStringImplementationANDROID for nullptr
Log fatal the EGL error in case eglQueryStringImplementationANDROID
returns nullptr;

Bug: 155272618
Test: boot
Change-Id: I4be7f798adfa7fdd7378dc509c847299f0539c7f
2020-04-30 17:32:02 +00:00
Dan Stoza
b0c9b69e5d Merge changes Iefa0e017,I79cc96c6,I14e31679,Ie490113e into rvc-dev
* changes:
  Fast path Region::orSelf when empty
  SF: Reduce present fence work
  TracedOrdinal per-frame optimizations
  SF: Extract onMessageInvalidate
2020-04-29 19:33:28 +00:00
Michael Hoisie
bfc95966e7 Remove unused libhardware dependency from libnativewindow
libnativewindow only uses the android.hardware.graphics.common AIDL
dependency.

Bug: 155235859
Test: m -j
Change-Id: I42b26c58ffcf0f19b78794e06449f60fb12d2ca6
2020-04-29 04:19:40 +00:00
Dan Stoza
547808b38c Fast path Region::orSelf when empty
If a Region is empty, orSelf is equivalent to just assigning from the
other Region/Rect, so we don't need to perform a whole rasterization
pass.

Test: libsurfaceflinger_unittest
Test: simpleperf measurement of SF shows workload reduction
Bug: 153112939
Change-Id: Iefa0e0177a0e85ce72e37842885d3c8b68ce6025
2020-04-28 17:57:54 -07:00
Edgar Arriaga
3d61bc1e62 Optimization: Restrict signing to ACTION_UP and ACTION_DOWN while doing a motion gesture such as scrolling apps
Savings. ~2.5% of total system_server time while scrolling on apps drawer screen.

Baseline:
https://pprof.corp.google.com/?id=732307aa60aa82bf478b0c3f0e6de6be&ignore=sendMessage
https://screenshot.googleplex.com/JpWt25tXRJO

Optimized:
https://pprof.corp.google.com/?id=5040d255411f407662a7f2da0109ca48&ignore=sendMessage
https://screenshot.googleplex.com/x81k7vUUKdd

Test: atest inputflinger_tests
Bug: 154278518
Merged-In: I52dd33f8203fe62bfcbde7be5a1ac45c46064585
Change-Id: I52dd33f8203fe62bfcbde7be5a1ac45c46064585
(cherry picked from commit c6ae4bbc44)
2020-04-28 01:23:59 +00:00
TreeHugger Robot
0318777929 Merge "Change to using sysprop for libgui_tests" into rvc-dev 2020-04-28 00:04:08 +00:00
Rob Carr
2a6961746d Merge "BLASTBufferQueue: Don't query for triple buffering" into rvc-dev 2020-04-27 17:20:42 +00:00
Sundong Ahn
f7f7cde49d Change to using sysprop for vrflinger_test
The configstore service was deprecated. So change to use sysprop
instead of configstore.

Bug: 124531214
Test: m -j
Change-Id: I5367b5715c797facd37736eee84651addbaa230d
Merged-In: I5367b5715c797facd37736eee84651addbaa230d
(cherry picked from commit 8e852f5231)
2020-04-27 10:42:19 +09:00
Sundong Ahn
f33c9f1e5f Change to using sysprop for libgui_tests
The configstore service was deprecated. So change to use sysprop
instead of configstore

Bug: 124531214
Test: atest SurfaceTest#CreateSurfaceReturnsErrorBadClient &&
      check reading property values
Change-Id: I1825a304c4fe40e3ef9f54e1e8fef05b1f9a2e8f
Merged-In: I1825a304c4fe40e3ef9f54e1e8fef05b1f9a2e8f
(cherry picked from commit e6e7d44e71)
2020-04-27 10:40:40 +09:00
TreeHugger Robot
b6ddea2951 Merge changes I977507a8,I3f2670c7 into rvc-dev
* changes:
  SurfaceFlinger: fix buffer usage bits of RefreshRateOverlay
  SurfaceFlinger: expected present time directly from VSyncReactor
2020-04-23 20:45:10 +00:00