Commit graph

80036 commits

Author SHA1 Message Date
Ady Abraham
ca3c11f80d Merge "SurfaceFlinger: only focused layers can use appRequestRange" into rvc-dev am: 18c692ccd1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/12011138

Change-Id: Ifd094ac5b50863738fd7fcb1cd2ce8f5239b5b25
2020-06-26 23:36:43 +00:00
Ady Abraham
18c692ccd1 Merge "SurfaceFlinger: only focused layers can use appRequestRange" into rvc-dev 2020-06-26 23:18:40 +00:00
Vishnu Nair
bd1688f27d [automerger skipped] Merge "Call Layer::getLayerDebugInfo from the main thread" into qt-dev am: f3f2130ec1 am: f403598e61 -s ours am: 175ed63abf -s ours
am skip reason: Change-Id I5537c53e8214e2785473839d71fd483d1a3219b6 with SHA-1 43bccf8321 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11973468

Change-Id: Id0a1fe91d16e3a75628273fc21df07862d5a1a66
2020-06-26 22:40:08 +00:00
Vishnu Nair
175ed63abf [automerger skipped] Merge "Call Layer::getLayerDebugInfo from the main thread" into qt-dev am: f3f2130ec1 am: f403598e61 -s ours
am skip reason: Change-Id I5537c53e8214e2785473839d71fd483d1a3219b6 with SHA-1 43bccf8321 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11973468

Change-Id: Ibb7ee588ffa7c168e6c6fb235214f1d70f465407
2020-06-26 22:27:27 +00:00
Vishnu Nair
f403598e61 Merge "Call Layer::getLayerDebugInfo from the main thread" into qt-dev am: f3f2130ec1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11973468

Change-Id: I17c0038e40757656834779531635d315104cabc5
2020-06-26 22:14:35 +00:00
Vishnu Nair
f3f2130ec1 Merge "Call Layer::getLayerDebugInfo from the main thread" into qt-dev 2020-06-26 21:59:58 +00:00
Ady Abraham
aae5ed5b7a SurfaceFlinger: only focused layers can use appRequestRange
When DisplayManager sets the DisplayConfigsSpecs with a policy
that the appRequestRange is broader than the primaryRange,
it means that an app can choose a refresh rate from the
appRequestRange and not from the primaryRange only if that app
explicitly specified a frame rate using setFrameRate API. However,
to avoid cases where we switch the refresh rate back and forth from
the two ranges, we are allowing only applications that their window
is focused from WindowManager's perspective to select refresh rate out
the primaryRange. This matches the behavior of an application that sets
the preferredDisplayModeId.

Bug: 144307188
Bug: 159940172
Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest
Test: YouTube in PIP mode while device is restricted by primaryRange

Change-Id: I26a9690210bb5771bd8aae2bff301031617f7c8f
2020-06-26 12:56:02 -07:00
Yiwei Zhang
c5679c6391 GPU Memory: update fs permissions for gpu_mem/gpu_mem_total tracepoint am: b9adcf3bf4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11997234

Change-Id: I09f8564ef513802b17523e461986c655dbf39801
2020-06-26 11:09:50 +00:00
Yiwei Zhang
b9adcf3bf4 GPU Memory: update fs permissions for gpu_mem/gpu_mem_total tracepoint
Bug: 158431662
Test: enable the tracepoint on user build
Change-Id: I0808d8fe6a8416534fbec5a273d668700f0f7129
Merged-In: I0808d8fe6a8416534fbec5a273d668700f0f7129
2020-06-26 09:57:07 +00:00
TreeHugger Robot
4b79a3fbb9 Merge "adbd_auth: don't abort on unexpected response." into rvc-dev am: b78000ae52
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11992395

Change-Id: I81f2d65420c94c1a8036ccd4f9b0089d21f9b39e
2020-06-26 02:26:09 +00:00
TreeHugger Robot
b78000ae52 Merge "adbd_auth: don't abort on unexpected response." into rvc-dev 2020-06-26 02:08:28 +00:00
Josh Gao
33bfa7ead3 Merge changes from topic "adbd_auth_dump" into rvc-dev am: f4facf2614
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11992394

Change-Id: I11910a60653e020725a95560292f13017bc1b090
2020-06-25 23:10:12 +00:00
Josh Gao
f4facf2614 Merge changes from topic "adbd_auth_dump" into rvc-dev
* changes:
  adbd_auth: return auth id when requesting a prompt.
  adbd_auth: improve logging.
2020-06-25 22:45:47 +00:00
John Reck
636e2d2544 Merge "Update BufferQueue owners" am: 794dc13775 am: c2a36a59c2
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1350602

Change-Id: I1d1a447a5136f7846990a214fe32d29d83557462
2020-06-25 22:28:45 +00:00
John Reck
c2a36a59c2 Merge "Update BufferQueue owners" am: 794dc13775
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1350602

Change-Id: Ifef0511914105100a7555f7428043739d87b1330
2020-06-25 22:15:01 +00:00
John Reck
794dc13775 Merge "Update BufferQueue owners" 2020-06-25 21:59:24 +00:00
Abhijeet Kaur
c4c70f31ac [automerger skipped] Copy Screenshot to fd if and only if user consent approved am: 90f8249030 am: d1a1d6486c -s ours am: c8fbf80edd -s ours
am skip reason: Change-Id I0ede8bc8cf5333ea586218a37fd6456f782a50c7 with SHA-1 9ce94670ce is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11950659

Change-Id: I21d58db372247e452ebf0bf24bf332d0b912c7dc
2020-06-25 19:26:42 +00:00
Abhijeet Kaur
c8fbf80edd [automerger skipped] Copy Screenshot to fd if and only if user consent approved am: 90f8249030 am: d1a1d6486c -s ours
am skip reason: Change-Id I0ede8bc8cf5333ea586218a37fd6456f782a50c7 with SHA-1 9ce94670ce is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11950659

Change-Id: I363b2bd6b06ccf0a241f56ef75f0ec267dc4bd79
2020-06-25 19:25:07 +00:00
Abhijeet Kaur
d1a1d6486c Copy Screenshot to fd if and only if user consent approved am: 90f8249030
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11950659

Change-Id: I7e9e6f0ee94857d1846bf4dec63ecc211a068af3
2020-06-25 19:13:28 +00:00
TreeHugger Robot
b729c43291 Merge "Clear spam log for INPUT_FEATURE_NO_INPUT_CHANNEL window" into rvc-dev am: 31e7a17eff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11970055

Change-Id: I6d78734ba19c8204dc1e64f65699f4050509c806
2020-06-25 18:37:27 +00:00
John Reck
ecee4da321 Update BufferQueue owners
Reflect team ownership change + feature freeze

Test: none
Change-Id: I6ab80e11b914afaaf01f5a3544f356a9106c152f
2020-06-25 11:27:56 -07:00
TreeHugger Robot
31e7a17eff Merge "Clear spam log for INPUT_FEATURE_NO_INPUT_CHANNEL window" into rvc-dev 2020-06-25 18:26:17 +00:00
Rob Carr
1ff2009bd1 Merge "SurfaceFlinger: Force runHandleTransaction" into rvc-dev am: de435229e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11991929

Change-Id: I969aba02d76504aca3625193cb6a1928282679b2
2020-06-25 14:32:02 +00:00
Rob Carr
de435229e3 Merge "SurfaceFlinger: Force runHandleTransaction" into rvc-dev 2020-06-25 14:22:53 +00:00
Orion Hodson
7d070e7632 [automerger skipped] Merge "Update to use nativehelper/JNIPlatformHelp.h" am: fb07ccbe9d am: 1ce011e220 -s ours
am skip reason: Change-Id Ic174c63462da4613857c30e92739b5781dcda753 with SHA-1 a56e2dda96 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1348765

Change-Id: I4c9eea0912de6eba33b6407de27b66fb4b661959
2020-06-25 08:13:25 +00:00
Orion Hodson
1ce011e220 Merge "Update to use nativehelper/JNIPlatformHelp.h" am: fb07ccbe9d
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1348765

Change-Id: I7f2846f9c10c9601e269a34c2a7392d987fa17ae
2020-06-25 07:58:09 +00:00
Orion Hodson
fb07ccbe9d Merge "Update to use nativehelper/JNIPlatformHelp.h" 2020-06-25 07:36:05 +00:00
Josh Gao
9653c9cf61 adbd_auth: don't abort on unexpected response.
There seems to be an additional underlying bug that causes the framework
to send a spurious authentication denial, but this is still an
improvement.

Bug: http://b/159061108
Test: treehugger
Change-Id: I7028292fbde157f02cc35c3a37ab5c49d68eaae6
2020-06-24 17:01:34 -07:00
Josh Gao
9e933c5479 adbd_auth: return auth id when requesting a prompt.
When multiple auth requests come in (e.g. if someone connects over TCP
and USB, or if we send a USB request, and then kill adb and try again),
we need to know the ID assigned to the request to disambiguate.

Bug: http://b/159061108
Test: manual
Change-Id: I68cf2335c5958decf29e58ed9132735577a7e074
2020-06-24 16:14:34 -07:00
Josh Gao
975cee7270 adbd_auth: improve logging.
Bug: http://b/159061108
Test: treehugger
Change-Id: I4aa83e71ea99752dd819a5a5a9d7a050f49c1dae
2020-06-24 16:14:26 -07:00
Robert Carr
6417d2e504 SurfaceFlinger: Force runHandleTransaction
In the linked bug, there are traces documenting cases where
the user observes jank while deferred transactions are in play.
We can see several cases where the client gets stuck for a long
time on dequeueBuffer. Around these times we can also see cases where
latchBuffer aborts early due to the !allTransactionsSignaled condition.
We expect all the transactions to be signalled at this point, because
before handlePageFlip we expect to reach handleTransactionLocked,
which should call notifyAvailableFrames, marking the sync points
available based on the head frame number. However if we study the trace
we also see there is an onMessageInvalidate, which contains
a handlePageFlip but does NOT contain the handleTransaction before it
which we would expect. However we know if onMessageInvalidate calls
handlePageFlip (via handleMessageInvalidate) then it must have called
handleMessageTransaction, as these two lines are right next to
eachother. We can thus conclude that we see the problem because
handleMessageTransaction didn't call handleTransaction due to
runHandleTransaction evaluating to false. This makes sense in the
context of recent changes. Previously deferred transactions would set
the transaction flags continuously while they were pending, so the
server would always perform transactions when waking up, and we wouldn't
get in this condition. However, setting the transaction flags
always triggers a wake up! But we don't actually want to wake up until
the frame actually arrives, so first we tried setting the transaction
flags without triggering a wake up. But we found this could prevent
other people from triggering wakeups, so a recent CL modified it to
set mForceTraversal instead. Intending to force that we call
doTransaction from handleMessageInvalidate regardless of whether a
new transaction has arrived (because we need to check if an old
transaction is now ready). However, it didn't quite work because of this
early abort due to runHandleTransaction.

Bug: 159677043
Test: Existing tests pass
Change-Id: I84f2a9cca2ebb3f59d30924efdb39c917f47111b
2020-06-24 15:26:32 -07:00
Orion Hodson
87d4d35624 Merge "Update to use nativehelper/JNIPlatformHelp.h" into rvc-dev-plus-aosp 2020-06-24 21:02:37 +00:00
Luke Huang
b79d7dafcf [automerger skipped] Merge "Update the documentation of ANDROID_RESOLV_NO_CACHE_STORE" am: 99f85854bc am: a664380e81 -s ours
am skip reason: Change-Id Ia1402a18d6d466ffbb0357127d7d45cf6c722550 with SHA-1 f1cf6a632d is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1348585

Change-Id: Ic22cf07014bfb174a45c34fc69aaf97a0f22938e
2020-06-24 19:01:26 +00:00
Luke Huang
a664380e81 Merge "Update the documentation of ANDROID_RESOLV_NO_CACHE_STORE" am: 99f85854bc
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1348585

Change-Id: Icf66ce1f1a5c607e42f6bec194c26d3d77bff02a
2020-06-24 18:49:38 +00:00
Luke Huang
99f85854bc Merge "Update the documentation of ANDROID_RESOLV_NO_CACHE_STORE" 2020-06-24 18:39:36 +00:00
Orion Hodson
9eca06b38c Update to use nativehelper/JNIPlatformHelp.h
Reflects refactoring of JNI helper code that depends on private
methods within libnativehelper.

Bug: 151443957
Test: Treehugger
Change-Id: Ic174c63462da4613857c30e92739b5781dcda753
Merged-In: Ic174c63462da4613857c30e92739b5781dcda753
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit aa614cc747)
2020-06-24 14:15:32 +01:00
Orion Hodson
a56e2dda96 Update to use nativehelper/JNIPlatformHelp.h
Reflects refactoring of JNI helper code that depends on private
methods within libnativehelper.

Bug: 151443957
Test: Treehugger
Change-Id: Ic174c63462da4613857c30e92739b5781dcda753
Merged-In: Ic174c63462da4613857c30e92739b5781dcda753
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit aa614cc747)
2020-06-24 12:47:35 +00:00
Luke Huang
8aba999b13 Update the documentation of ANDROID_RESOLV_NO_CACHE_STORE
Make it up-to-date.

Test: N/A
Bug: 150371903
(clean cherry-pick from internal branch)
Merged-In: Ia1402a18d6d466ffbb0357127d7d45cf6c722550
Change-Id: Ia1402a18d6d466ffbb0357127d7d45cf6c722550
2020-06-24 11:46:39 +00:00
arthurhung
be737674af Clear spam log for INPUT_FEATURE_NO_INPUT_CHANNEL window
Currently, in order to detect occlusion input, all buffered layers
would update input info into InputFlinger, so the window may contain
null token, we should check if id is also identical to prevent get the
wrong result

Bug: 159349058
Test: Enable show tap, open bubble and watch logs.
Change-Id: I8412812e9b100988ab380ad64366f2548e50d9e5
2020-06-24 04:33:05 +00:00
Mady Mellor
c8d91977ab Revert "Clear spam log for INPUT_FEATURE_NO_INPUT_CHANNEL window" am: 017bcd179d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11974384

Change-Id: I1e14a8ee30375bc5b156076d044289b7f6b47236
2020-06-23 23:26:20 +00:00
Mady Mellor
017bcd179d Revert "Clear spam log for INPUT_FEATURE_NO_INPUT_CHANNEL window"
This reverts commit 80d685aef1.

Reason for revert: seeing if maybe caused regression (b/159719013)
Bug: 159719013
Bug: 159349058
Change-Id: Iac21f799822bab5c26b9753ed78617e0087810bf
2020-06-23 23:10:48 +00:00
Vishnu Nair
b123f47bbd Call Layer::getLayerDebugInfo from the main thread
Fixes an issue where drawing state could be accessed from a binder
thread. The function also mixed current state with drawing state
incorrectly. The function now only retrieves drawing state.

Bug: 150226608
Test: Steps in bug doesn't repro
Test: atest sffakehwc_test
Merged-In: I5537c53e8214e2785473839d71fd483d1a3219b6
Change-Id: I04daedcb9a890083cc710bab30b295e14b9872ae
2020-06-23 18:26:00 +00:00
arthurhung
192841f0d2 Clear spam log for INPUT_FEATURE_NO_INPUT_CHANNEL window am: 80d685aef1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11931262

Change-Id: Iec89556b3a5a98157cba0ab91377dcda10de830d
2020-06-23 13:44:28 +00:00
arthurhung
80d685aef1 Clear spam log for INPUT_FEATURE_NO_INPUT_CHANNEL window
Currently, in order to detect occlusion input, all buffered layers
would update input info into InputFlinger, so the window may contain
null token, we should check if id is also identical to prevent get the
wrong result.

Bug: 159349058
Test: Enable show tap, open bubble and watch logs.
Change-Id: Ia1841ba51bce00fc9901fdf7324e8e31d9737082
2020-06-23 02:20:54 +00:00
TreeHugger Robot
260e3e793e Merge "Ensure connection is non-null" into rvc-dev am: 402bbb4a57
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11902845

Change-Id: Ia9309066df1666bc0f122af929f2707d0b125ef7
2020-06-23 00:42:32 +00:00
TreeHugger Robot
402bbb4a57 Merge "Ensure connection is non-null" into rvc-dev 2020-06-23 00:27:39 +00:00
Siarhei Vishniakou
34ed4d4d74 Ensure connection is non-null
The function getConnectionLocked can return null. We must check the
result for null to prevent dereferencing null.

Bug: 143459140
Test: none
Change-Id: I43991ea2ac9e23b5d5fc198a0ac8622d83696d31
2020-06-22 16:00:37 -07:00
TreeHugger Robot
440cf9ffe5 Merge "libgui: align the Surface default mMaxBufferCount value with BufferQueue" into rvc-dev am: 4524ce5189
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11931585

Change-Id: Ie2f8b07fe259fe9afcd0094ea8006084133e83db
2020-06-22 18:50:21 +00:00
TreeHugger Robot
4524ce5189 Merge "libgui: align the Surface default mMaxBufferCount value with BufferQueue" into rvc-dev 2020-06-22 18:41:12 +00:00
Yiwei Zhang
74c9cc3112 libgui: align the Surface default mMaxBufferCount value with BufferQueue
Bug: 159213110
Bug: 159505775
Test: atest libgui_test:SurfaceTest#DefaultMaxBufferCountSetAndUpdated
Change-Id: Ia4f781e0715b3a4e55c598595746bc0d5c76e3ef
2020-06-22 18:40:13 +00:00