Commit Graph

12878 Commits

Author SHA1 Message Date
Issei Suzuki
927fe872b2 DO NOT MERGE: Support alpha value in SurfaceView.
For backward compatibility, SurfaceView ignores alpha value by
default. In order to reflect alpha value set on the SurfaceView
to its underlying surface, setUseAlpha() needs to be called.

Translucent alpha only works when the surface is placed z-above.
Otherwise only fully opaque and transparent status are supported.

Bug: 130442248
Test: Manual, use BubblesTest app and checks if alpha is set.
Change-Id: I86847de59109b2adf12a2c7c50c988c2cbcf0450
2019-07-10 17:17:36 +02:00
Issei Suzuki
03c2c10230 DO NOT MERGE: Clean up SurfaceView.
Bug: 136538998
Test: no-op refactoring CL. Existing unit tests still pass.
Change-Id: Idd6c5871ed34880a053f3a43ab4f7aa3a466b548
2019-07-10 17:17:36 +02:00
Issei Suzuki
33727a0e81 DO NOT MERGE: Clean up SurfaceView
Bug: 136538998
Test: no-op refactoring CL. Existing unit tests still pass.
Change-Id: Ibd0310a87ed38aa48215be9cba54f1c7a2a8a9fa
2019-07-10 17:17:36 +02:00
chaviw
dd5bde0a3c DO NOT MERGE: Deleted SurfaceControl.remove method
Updated all callers of SC.remove to use Transaction.remove(sc) and apply
immediately since that's the equivalent. Eventually, the transactions
that contain remove could combine with other transactions if it makes
sense to avoid duplicate applies.

Test: SurfaceControlTest
Change-Id: I13c6ec86de6a6d60f142c2269337557510dd006d
Exempt-From-Owner-Approval: Already approved and merged in master.
2019-07-10 10:02:08 +00:00
Issei Suzuki
9127d3cf43 DO NOT MERGE: Extend ViewRootImpl to support multiple FrameDrawingCallback
Bug: 136150954
Bug: 130442248
Test: Manual, Bubble test app to check if the callback is triggered.
Change-Id: I690005fece924c38a5269cb35309061d0ccb6f1e
(cherry picked from commit 935935660c)
2019-07-01 14:05:49 +00:00
Mathew Inwood
f405e83cdc Merge "Restore some greylist entries." into qt-dev
am: f4535c8d51

Change-Id: I9349026a5f99cb2ebac1d9fadd3c716e8a06aaa3
2019-06-28 13:18:28 -07:00
Mathew Inwood
a5531fa161 Restore some greylist entries.
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
  information added

So they are being moved back to the greylist for Q.

Test: Treehugger
Bug: 136102585
Change-Id: Ie3dd15c8e17d530d853473a013717e6175383080
2019-06-28 09:23:06 +00:00
Peiyong Lin
964fcdbebd Merge "Attach color space information when attach and queue buffer." into qt-r1-dev 2019-06-27 16:14:02 +00:00
Peiyong Lin
ccc06b6f51 Attach color space information when attach and queue buffer.
Currently when calling attachAndQueueBuffer, the color space information is
lost. This results in color shift if the color space doesn't match the color
space of the surface.

BUG: b/135002842, b/131928312
Test: boot. Manually verified on P19
Change-Id: I95ec73c24942f79197d25ee85f139b2aaf805677
2019-06-26 11:40:08 -07:00
Winson Chung
abe1a94072 Merge "Catch all exceptions in onFrameDraw" into qt-dev
am: cff24b878d

Change-Id: If3aef1ccbba89a4b0964749ee3184a83f88185be
2019-06-25 15:43:48 -07:00
Winson Chung
cff24b878d Merge "Catch all exceptions in onFrameDraw" into qt-dev 2019-06-25 22:07:44 +00:00
Jorim Jaggi
b0bb2f778f Catch all exceptions in onFrameDraw
... as throwing an exception in there somehow will mess up the
hwui task queue.

Test: Have a crashy app, swipe up while the app is crashing
Fixes: 134583193
Change-Id: Ie3ba5f991759f807b154f55f9fc816e7efe2fdfe
2019-06-25 15:37:53 +02:00
Issei Suzuki
0ca1dbcb25 Merge "Added subtle animation for unlocking screen." into qt-r1-dev 2019-06-25 11:22:26 +00:00
TreeHugger Robot
e6930c4aa1 Merge "Fixed event flushing to handle when mDirectServiceInterface is not ready yet." into qt-r1-dev 2019-06-24 18:42:45 +00:00
Issei Suzuki
5609ccbf95 Added subtle animation for unlocking screen.
Change-Id: Id691fec4f2e492682a53d6855090524f000ddc6c
Bug: 134965724
Bug: 134952761
Test: N/A
2019-06-24 14:25:04 +00:00
Robert Carr
9e4b7a3f8d Merge "ViewRootImpl: Ensure layout when configuration changes." into qt-dev
am: 6397ab05f9

Change-Id: I17feac89670b328f88878ce57636cf4954e0c6f3
2019-06-21 17:30:57 -07:00
John Reck
5866a0c6ab Revert SurfaceView back to Q's version
Revert API behavior changes to SurfaceView, snapping
back to Q's version.

Bug: 133378280
Test: none
Change-Id: I3a47f9bfdfab2d16707f952a9af672551736e681
2019-06-19 11:39:20 -07:00
Adam He
d93ed17d5e Fixed event flushing to handle when mDirectServiceInterface is not ready
yet.

Fixes: 135474027
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I5bc12cd5f48138650c82b052c785a505fc8f4773
2019-06-18 16:51:57 -07:00
Robert Carr
437c0e4c15 ViewRootImpl: Ensure layout when configuration changes.
When the configuration changes between landscape and reverse
landscape, the app will not receive onConfigurationChanged as
orientation is not part of the public portion of the configuration.
However, when the ViewRootImpl receives such a configuration back from
relayout, it will force a layout of the client views
(see updatedConfiguration in performTraversals), this is because
Configuration#equals compares the non public part of the configuration
as well. This CL changes MSG_REPORT_RESIZED to handle the configuration
changing the same way performTraversals does, so that the app consistently
receives a configuration change.

Bug: 134643273
Test: Manual
Change-Id: If016bcd9a5b8d2a7efc5e1ab3c82a88a608caf8b
2019-06-18 16:12:29 -07:00
lumark
c0ecccca16 Merge "Make InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable." into qt-dev
am: b7abebde5b

Change-Id: I7459ec72287ffa36bcc11e9cce87d9a4258705d5
2019-06-18 05:32:28 -07:00
TreeHugger Robot
b7abebde5b Merge "Make InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable." into qt-dev 2019-06-18 12:27:15 +00:00
lumark
ca442d5d9f Make InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable.
Annotates InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED as @TestApi
to let cts can verify if multi-client IME enabled.

Bug: 135217809
Test: build and passes
Change-Id: Id7b4dceb2dbfaf3d7ed1084957dd14b04cad0cdf
2019-06-17 16:09:42 +08:00
Tim Murray
a277618a1c Merge "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows"" into qt-dev
am: 2ea2a58d97

Change-Id: I08d6b4a6f39bcc0c8982e51922f215ce729fa9c9
2019-06-14 13:24:01 -07:00
Tim Murray
2ea2a58d97 Merge "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows"" into qt-dev 2019-06-14 19:50:20 +00:00
Tim Murray
4f6b8ec056 Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows"
This reverts commit c18c6da441.

Reason for revert: major memory increase

Change-Id: Iffb9cd14343cd678849e487bfa163b5f23608ffd
Test: presubmit
Bug: 134695730
2019-06-14 17:16:17 +00:00
Qasid Ahmad Sadiq
0721d488ce Merge "AccessibilityNodeIdManager should hold onto weak references of Views." into qt-dev
am: c0d808a274

Change-Id: I7b64f0c078bccba4cd65c28ac09267b392dd8e18
2019-06-10 22:27:47 -07:00
Qasid Ahmad Sadiq
2e6efdefa6 AccessibilityNodeIdManager should hold onto weak references of Views.
... as opposed to strong references.
In case the calls between register and unregister aren't matched, we don't want to be leaking views.
I haven't seen any real eveidence of there being leaks, just a report. But this is preventative.

Created a "WeakSparseArray", which wraps SparseArray, and passes in a kind of WeakReference that has an id.
The references become unreachable, we use the id to remove the the entry from the SparseArray.

Test: Used the device for a bit with talkback on. CTSAccessibility*
Change-Id: I8d11727428f56fc06007232ae341d1409a11991f
Fix: 134506015
2019-06-10 19:47:34 -07:00
TreeHugger Robot
691fa971ec Merge "Only send text update for TextView after VIEW_ADDED is notified" into qt-r1-dev 2019-06-08 17:58:59 +00:00
TreeHugger Robot
619946fdc4 Merge "DisplayEventDispatcher: use eConfigChangedDispatch" into qt-r1-dev 2019-06-08 01:29:23 +00:00
Feng Cao
9e4ca44e28 Only send text update for TextView after VIEW_ADDED is notified
Test: atest CtsContentCaptureServiceTestCases (sanity check)
Fixes: 134309443

Change-Id: Ia94194576db0a1679bbb2a9b76c84a871b965435
2019-06-08 00:56:43 +00:00
Ady Abraham
9c501aad4b DisplayEventDispatcher: use eConfigChangedDispatch
In order to get DISPLAY_EVENT_CONFIG_CHANGED, eConfigChangedDispatch needs
to be used when creating DisplayEventDispatcher.

Bug: 131688378
Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest
Test: trigger config change and observe logcat
Change-Id: I0de8037ee5b024b7d9729750f582be919087be41
2019-06-07 10:26:47 -07:00
Tony Mak
01ac3d3a7b Merge "Fix an issue that clicking on a smart action chip on keyguard ... failed to launch app resolver when there are more than one app handlers." into qt-dev
am: 78a48f5512

Change-Id: Ic7dd0c9f952e905c8f42001276f3def6e1797b70
2019-06-06 02:39:33 -07:00
Tony Mak
82e60027f4 Fix an issue that clicking on a smart action chip on keyguard ...
failed to launch app resolver when there are more than one app handlers.

What happened:
1. TextClassifier constructs an implicit intent to fulfill a task
like opening a link, making a phone call, etc.
2. TextClassifier calls resolveActivity against the implicit intent to
resolve the intent. The resolve component name will be used to create
an explicit intent. In this case, the intent is resolved to the
app resolver activity.
3. wouldLaunchResolverActivity in SysUI returns false for an explicit
intent with component name android/ResolverActivity.
4. SysUI does not trigger the "start the activity after the keyguard
is gone" logic because wouldLaunchResolverActivity returns false.
5. When user clicks on the action on keyguard, ResolveActivity.onStop
is triggered because it is shown (and thus moved to the background)
under the keyguard. So, finish() is called in onStop, and thus the bug.

IMHO, wouldLaunchResolverActivity should not return false
for an explicit intent with component name android/ResolverActivity.
But since we are late at this point, the safest option is to not setting
component name when the intent is resolved to package "android". Note that
this is what we are doing for P, so it should be pretty safe.

Test: 1. Install two browsers. Send myself a link. Tap on the Open Link
chip on keyguard. App resolver is shown.
2. atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/

BUG: 129220155

Change-Id: I6d4d67c2233a2fec950887ea274825bf1cbc1ae2
2019-06-05 12:52:22 +01:00
Adrian Roos
09ed7c9762 Merge "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows" into qt-dev
am: 952bcb8ffe

Change-Id: Id02b19a73bc5b19a67cd93ac394c8ec356602096
2019-06-03 16:02:26 -07:00
TreeHugger Robot
952bcb8ffe Merge "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows" into qt-dev 2019-06-03 22:52:59 +00:00
Chavi Weingarten
96af8617b0 Merge "Only updateBoundsSurface when surface size has changed." into qt-dev
am: fd979ca3d2

Change-Id: I58a77f02333c717b32f3facc83fe4d684ecb3010
2019-06-03 10:10:29 -07:00
Riddle Hsu
9b7699939e Merge "Invoke setWindowStopped on the thread that created the view" into qt-dev
am: 3bc96f9113

Change-Id: I8a66a0d378b13e7c2f48edf4bff01ae2799e47d5
2019-06-03 10:06:18 -07:00
Chavi Weingarten
fd979ca3d2 Merge "Only updateBoundsSurface when surface size has changed." into qt-dev 2019-06-03 16:08:42 +00:00
TreeHugger Robot
3bc96f9113 Merge "Invoke setWindowStopped on the thread that created the view" into qt-dev 2019-06-03 10:13:18 +00:00
chaviw
c0a8c4edbd Only updateBoundsSurface when surface size has changed.
Currently, updateBoundsSurface was getting called when the surface
changed, not just when the size changed. This meant it could be calling
setWindowCrop and deferTransaction when no size had changed. If size
hadn't changed, there was a high possibility that no new frames would be
submitted by the client, causing the deferTransaction to wait forever.

Since the deferTransaction was still waiting, SurfaceFlinger would wake
up every vsync to check if it should call doTransaction for the deferred
transaction. This caused 60Hz composition even when frames were rendered
slower.

Fixes: 132110524
Test: SF doesn't compose 30fps app at 60Hz
Change-Id: Icf3a99b34c288575438bfcd05e9077ea7919b4ca
2019-06-01 00:12:09 +00:00
Adrian Roos
c18c6da441 RootViewImpl: Fix measure size hint for WRAP_CONTENT windows
Fixes an issue where we would measure WRAP_CONTENT windows inconsistently
in the measure passes before and after relayoutWindow.

Fixes: 119839070
Bug: 73813813
Change-Id: I376e416d648f31a0dedecd6a70b476c3bf82b8b0
Test: Install test case app from 119839070, verify dialog is correctly laid out.
2019-05-31 14:26:35 +02:00
Siarhei Vishniakou
2cd6a8ae5f Merge "Close windows on ACTION_UP when touched outside" into qt-dev
am: 89ebf3f674

Change-Id: I50be8986f4ffef7024300a39a97a788a301487a5
2019-05-29 15:00:43 -07:00
TreeHugger Robot
89ebf3f674 Merge "Close windows on ACTION_UP when touched outside" into qt-dev 2019-05-29 21:51:22 +00:00
Jackal Guo
6d7b49bead Merge "A11y support for windows in a re-parented display" into qt-r1-dev 2019-05-24 01:02:17 +00:00
Abodunrinwa Toki
b1007e962c Merge "Convert TextClassifierEvent to SelectionEvent for logging in the default TC." into qt-dev
am: a578ecce46

Change-Id: Ia6afb8f90784676091d70f81492d9b35721b6ca8
2019-05-23 14:47:38 -07:00
Abodunrinwa Toki
a578ecce46 Merge "Convert TextClassifierEvent to SelectionEvent for logging in the default TC." into qt-dev 2019-05-23 19:35:24 +00:00
Abodunrinwa Toki
5258633e2d Convert TextClassifierEvent to SelectionEvent
for logging in the default TC.

TCEvents for selection and links are not currently being written to
default TC logs. This changelist writes these events as SelEvents.

Bug: 131228248
Test: atest android.view.textclassifier.TextClassifierEventTest
Change-Id: I191f2f9281eab1b8a427ef21717fff283a304a22
2019-05-23 13:37:59 +01:00
Jackal Guo
c43a0a6520 A11y support for windows in a re-parented display
Currently, accessibility only supports windows in default display.
The windows in other displays aren't recongnized by accessibility
even they're re-parented to default display. Besides, we need to
offset the bound after re-parented since the original is from its
own display.

Bug: 129098348
Test: atest WindowStateTests
Test: atest DisplayContentTests
Test: a11y CTS & unit tests
Change-Id: I41a84a4c02e3c1be1dab4bd420d504b85787c4fb
2019-05-23 15:39:52 +08:00
Derek Sollenberger
03f24c0350 Merge "Fix fading edge effect from impacting neighboring pixels" into qt-dev
am: 9fdd35e9aa

Change-Id: I4599c37d6113a254b64b9ad4094dad3899e27b8f
2019-05-22 17:49:10 -07:00
TreeHugger Robot
9fdd35e9aa Merge "Fix fading edge effect from impacting neighboring pixels" into qt-dev 2019-05-22 21:32:59 +00:00