Commit graph

80042 commits

Author SHA1 Message Date
Jiyong Park
e3668e11d8 dalvik sysprop settings are optional
dalvik sysprop settings in these mk files are changed to optional ones
using the new 'a ?= b' syntax, to better express the intent that these
provides safe default values which will be used when they are set in
a product-specific mk file.

This is also in preparation for
I9c073a21c8257987cf2378012cadaeeeb698a4fb, which when lands will
prohibit duplicated sysprop assignments.

Bug: 117892318
Bug: 158735147
Test: m

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

Merged-In: Ia3528c0c2f9715ff10b85b549d739c9263ab6a7e
(cherry picked from commit 04f86d1cff)
Change-Id: Ia3528c0c2f9715ff10b85b549d739c9263ab6a7e
2020-06-30 14:31:22 +09:00
Vishnu Nair
a97e47b2ef [automerger skipped] Call Layer::getLayerDebugInfo from the main thread am: 927b3b1208 -s ours am: bf6f3dec9f -s ours am: 1e4cccab8d -s ours am: f4beceb1e8 -s ours
am skip reason: Change-Id I04daedcb9a890083cc710bab30b295e14b9872ae with SHA-1 b123f47bbd is in history

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

Change-Id: Ideeb34bfcc2f94f9a5cc5692aeb11511baa2fdf0
2020-06-27 00:28:14 +00:00
Vishnu Nair
f4beceb1e8 [automerger skipped] Call Layer::getLayerDebugInfo from the main thread am: 927b3b1208 -s ours am: bf6f3dec9f -s ours am: 1e4cccab8d -s ours
am skip reason: Change-Id I04daedcb9a890083cc710bab30b295e14b9872ae with SHA-1 b123f47bbd is in history

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

Change-Id: I6dedd9fe0db79fdbb6b0438e826bb79f268c4f51
2020-06-27 00:13:09 +00:00
Vishnu Nair
1e4cccab8d [automerger skipped] Call Layer::getLayerDebugInfo from the main thread am: 927b3b1208 -s ours am: bf6f3dec9f -s ours
am skip reason: Change-Id I04daedcb9a890083cc710bab30b295e14b9872ae with SHA-1 b123f47bbd is in history

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

Change-Id: I54d812d033e70db7c894d86478dbe9590d3c68bf
2020-06-26 23:59:55 +00:00
Vishnu Nair
bf6f3dec9f [automerger skipped] Call Layer::getLayerDebugInfo from the main thread am: 927b3b1208 -s ours
am skip reason: Change-Id I04daedcb9a890083cc710bab30b295e14b9872ae with SHA-1 b123f47bbd is in history

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

Change-Id: I53cac8a7d2fc4efacab81cdee53cee592c59312c
2020-06-26 23:41:45 +00:00
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
927b3b1208 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: I04daedcb9a890083cc710bab30b295e14b9872ae
Change-Id: I04daedcb9a890083cc710bab30b295e14b9872ae
2020-06-23 18:32:02 +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