Commit Graph

12892 Commits

Author SHA1 Message Date
TreeHugger Robot
b85d750900 Merge "Fix regression in updating gesture exclusion rects" into qt-qpr1-dev 2019-09-04 07:17:54 +00:00
TreeHugger Robot
79243ed6c6 Merge "Skip updateCursorAnchorInfo when matrix is null" into qt-qpr1-dev 2019-09-04 01:01:31 +00:00
Winson Chung
05a36465b4 Fix regression in updating gesture exclusion rects
- Use the precalculated aggregate visibility instead of traversing
  hierarchy again in isShown()

Bug: 140157754
Test: atest SystemGestureExclusionRectsTest
Change-Id: Ica58de4ff43da75cfcdac3f359fc915f65608e78
2019-09-03 12:15:08 -07:00
Winson Chung
61cfd71d39 Ignore hidden views when computing exclusion rects
Bug: 138806473
Test: atest SystemGestureExclusionRectsTest
Change-Id: I43629546af641d2b6347889e3ea10bd2cbbe9070
2019-08-22 16:36:18 -07:00
Tarandeep Singh
561a199ac7 Skip updateCursorAnchorInfo when matrix is null
Sometimes, the activityViewToScreenMatrix is null, we should skip
updateing cusor anchor info in such cases.
Fix: 139135335
Test: Manually using the steps in bug.

Change-Id: Ie58ad9a311a8f630b0a6d27d60ca017abc95ef45
2019-08-22 01:24:04 +00:00
Mihir Patel
245fc50ce7 Merge "Fixing a bug where content capture sessions with child sessions could get stuck in a state where no event flushing other than forced flushes would occur" into qt-r1-dev
am: 4aa0aeadff

Change-Id: Iadf1c43fc5b38ab432e4bc2f47d50dd911f725ed
2019-08-19 13:34:24 -07:00
Mihir Patel
52ed9ee038 Fixing a bug where content capture sessions with child sessions could get stuck in a state where no event flushing other than forced flushes would occur
Fixes: 139202268
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I21e9d4db2402fe5210b7d938dac2f12e7557c146
2019-08-09 14:10:30 -07:00
Issei Suzuki
94e8d116ab 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: 137937105
(Orignal bug from b/130442248)
Test: Manual, use BubblesTest app and checks if alpha is set.
Change-Id: I86847de59109b2adf12a2c7c50c988c2cbcf0450
2019-08-09 14:08:03 +00:00
Adrian Roos
5f2c9a14f5 GestureNav: Log exclusion rect heights
Logs the rejected and requested exclusion rect heights.

Test: adb shell device_config put android:window_manager key_system_gesture_exclusion_log_debounce_millis 1000
Bug: 135152789
Change-Id: Ie12640f4bf0a8b40b666e604188a0bedd85e8981
Exempt-From-Owner-Approval: DeviceConfig.java: Adding constant to WindowManager namespace.
2019-08-05 21:19:40 +02:00
Jorim Jaggi
b248a0343f Merge "Fix overlapping remote and recents animations" into qt-r1-dev 2019-08-05 18:12:56 +00:00
Jorim Jaggi
589c5ba0fa Fix overlapping remote and recents animations
Test: Open app and immediately swipe up while opening. Verify
Thread prioties in systrace

Test: WindowProcessControllerTests
Fixes: 137881181
Change-Id: Ic1d7403d2a648e6f1d1b6a3d55b56bf37bc57a2c
2019-08-05 17:10:18 +02:00
Adrian Roos
91ce40fa1a Merge "GestureNav: Clarify javadoc in regards to exclusion limits" into qt-dev
am: c9f4bcae57

Change-Id: I0581305f01ebdaa121ce0e70ab9d44f142c9f99f
2019-08-02 05:42:10 -07:00
Adrian Roos
c9f4bcae57 Merge "GestureNav: Clarify javadoc in regards to exclusion limits" into qt-dev 2019-08-02 12:17:11 +00:00
Adrian Roos
e6feb7d198 GestureNav: Clarify javadoc in regards to exclusion limits
Bug: 124518180
Test: m checkapi
Change-Id: I43b0b890a763e339deb246cabf9adbf011eae088
2019-07-26 14:50:03 +02:00
Vadim Caen
605e74c930 DO NOT MERGE Do not call drawableChanged pre Q
am: 843f9dee8b

Change-Id: I813f41905386da06e6eaebd6b7f85c17a6051456
2019-07-24 16:19:39 -07:00
Vadim Caen
843f9dee8b DO NOT MERGE Do not call drawableChanged pre Q
Some apps rely on not updating the window format when changing the
background of the DecorView. To keep the compatibilty with these app we
add only call DecoreView.drawableChanged() when the window background is
changed on app targetting Q and above.

Test: Manually test by lunching Instagram TV and pressing return twice.
The window should aninate with no flickering.
Bug: 136987724

Change-Id: I3593d30dc6f10519008151974e475f0dad86fc64
2019-07-24 21:29:12 +00:00
Winson Chung
7a545ae9cc Modify deferred recents animation cancel to work without screenshot
- Allow the recents animation runner to request deferring a cancel from
  stack order change until the next app transition start without using
  a screenshot. This allows launcher to set this state, then start an
  activity without a flash due to the animation not finishing immediately
- Always prepare a transition when using the deferred cancel to ensure
  an app transition callback
- Handle app transition canceled as well (if canceled, we continue to
  cancel recents the animation with/without the screenshot as requested)
- Remove internal lock and use the global WM lock when setting the defer
  cancel state
- Renamed a few methods to clarify the deferred cancel flow

Bug: 137196872
Test: atest FrameworksServicesTests:RecentsAnimationControllerTest
Test: atest WmTests:RecentsAnimationTest
Change-Id: Ie8f6f60b6bf6777e36f24749b30f90c8c26ee848
2019-07-23 15:50:33 -07:00
Adrian Roos
7c77af6371 Merge "GestureNav: make reportSystemGestureExclusionChanged oneway" into qt-dev
am: d4a50e6e72

Change-Id: I9f837989727c263517aa0d2f3dfd47a830f6170c
2019-07-16 15:00:35 -07:00
Adrian Roos
e6911497de GestureNav: make reportSystemGestureExclusionChanged oneway
When the WindowManager lock is contended, reportSystemGestureExclusionChanged can cause
jank. Making it oneway avoids this.

Fixes: 137650591
Test: make droid
Change-Id: I5d96b7e2225745b146014ad11cafaf0ad9a1b734
Merged-In: I5d96b7e2225745b146014ad11cafaf0ad9a1b734
2019-07-16 20:29:03 +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