Commit Graph

13108 Commits

Author SHA1 Message Date
Vishnu Nair
bc9beab8fe Remove SurfaceControl#getHandle from JAVA apis 2/2
Holding on to a reference of the handle in Java will keep the server-side surface alive until
the reference is removed by GC. This may cause surfaces to be kept alive longer than necessary.
Instead hold on the surface control and call SurfaceControl#release which will release the local
reference to the server-side surface.

Bug: 136004147
Test: go/wm-smoke

Change-Id: Iff7d48ae1593cea2e188aa07c417f4c5a98887d5
2019-06-25 17:33:44 -07:00
Vishnu Nair
4bcd152a3a Remove SurfaceControl#getHandle from JAVA apis 1/2
Holding on to a reference of the handle in Java will keep the server-side surface alive until
the reference is removed by GC. This may cause surfaces to be kept alive longer than necessary.
Instead hold on the surface control and call SurfaceControl#release which will release the local
reference to the server-side surface.

Bug: 136004147
Test: go/wm-smoke
Test: gesture nav sanity tests
Test: atest CompositionSamplingListenerTest

Change-Id: Iab33680746c8f48c28783e6a2a13c9ac7ae04980
2019-06-25 17:31:11 -07:00
Issei Suzuki
a1a6067f2e Merge "Added subtle animation for unlocking screen." into qt-r1-dev am: 0ca1dbcb25
am: 79071973bf

Change-Id: I4612152ed11bab958d8d172e8620ab29dca5c883
2019-06-25 04:51:33 -07:00
Issei Suzuki
79071973bf Merge "Added subtle animation for unlocking screen." into qt-r1-dev
am: 0ca1dbcb25

Change-Id: I08834a57295530c15d19811cccc72174f9f428ad
2019-06-25 04:37:25 -07: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
00c3a02ac7 Merge "Remove references of the previous surface control in ViewRootImpl" 2019-06-25 01:35:04 +00:00
Adam He
eec9ed5042 Merge "Fixed event flushing to handle when mDirectServiceInterface is not ready yet." into qt-r1-dev am: e6930c4aa1
am: accfaaa416

Change-Id: I37f6e60f3c28347e00bbfc3d4aeb09845ad00e63
2019-06-24 13:00:33 -07:00
Adam He
accfaaa416 Merge "Fixed event flushing to handle when mDirectServiceInterface is not ready yet." into qt-r1-dev
am: e6930c4aa1

Change-Id: I17671a59667ee8990e7f2ea62c7957d4ed90a966
2019-06-24 12:55:00 -07: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
Vishnu Nair
eaab0e5aad Remove references of the previous surface control in ViewRootImpl
Partial revert to fix regression from f7645aa9a9 which
kept a strong ref of the old SC used to detect when the SC changed. This meant that during the lifetime of an app it could keep an additional buffer alive.

Bug: 135762652, 132205507
Test: go/wm-smoke
Test: dumpsys meminfo

Change-Id: I93df8b4ef8ffdded6c46fb44ca4cd110038d75d0
2019-06-24 08:12:32 -07: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
d2076adad2 Merge "ViewRootImpl: Ensure layout when configuration changes." into qt-dev am: 6397ab05f9 am: 641d4f27e3
am: 52277fd25e

Change-Id: I2eda57ef8935733732ed5adc5c9bb2baeeb4ed0c
2019-06-21 18:58:03 -07:00
Robert Carr
52277fd25e Merge "ViewRootImpl: Ensure layout when configuration changes." into qt-dev am: 6397ab05f9
am: 641d4f27e3

Change-Id: Ic3bfad9182f677251742ade7c430b8f1205a9e65
2019-06-21 17:42:23 -07:00
Robert Carr
641d4f27e3 Merge "ViewRootImpl: Ensure layout when configuration changes." into qt-dev
am: 6397ab05f9

Change-Id: I023b06dc785cbf22783a426060aef55714a457d8
2019-06-21 17:32:54 -07: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
14ff220613 Merge "Revert SurfaceView back to Q's version" into qt-r1-dev am: 2f8cae24b9
am: 2562753783

Change-Id: I3c95c3c080b76b9f9f33ddb9e27d84a167cdfcb6
2019-06-19 19:33:20 -07:00
John Reck
2562753783 Merge "Revert SurfaceView back to Q's version" into qt-r1-dev
am: 2f8cae24b9

Change-Id: Iedb5910e225fd2584b6b4342dc7aed9b93747eb0
2019-06-19 16:07:02 -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
Vishnu Nair
f7645aa9a9 Prevent SurfaceView from drawing over parent surface insets
Parent SurfaceView to a bounds layer that enforces a crop preventing it
from drawing over the surface insets. The bounds layer crop is set to the
surface insets and updated when the parent surface size changes or the
parent surface insets change.

If the SurfaceView children are reparented to another client surface
then ensure the SurfaceView relative layer info is updated correctly.

Bug: 132205507
Test: go/wm-smoke
Test: test preserve surfaces codepath with split screen and ensure relative z is preserved
Test: test surfaceview apps, youtube, maps & camera.
Test: try to repro maps pip issue described in bug

Change-Id: I14c2f7603345ad89f0af4db48150b05d8ada602a
2019-06-18 12:49:24 -07:00
lumark
171a9eb04b Merge "Merge "Make InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable." into qt-dev am: b7abebde5b am: c0ecccca16" into qt-r1-dev-plus-aosp
am: 6533a69689

Change-Id: Ibea62abfce411333b3eb9b7cc0bf0876c065e67e
2019-06-18 05:53:38 -07:00
lumark
5df8aa8ee8 Merge "Make InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable." into qt-dev am: b7abebde5b
am: c0ecccca16

Change-Id: Iaf173a4f4f1ddd89421ab14f38c44639b1cc2726
2019-06-18 05:45:49 -07:00
lumark
cf48a8e828 Merge "Make InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable." into qt-dev
am: b7abebde5b

Change-Id: I2224102556d110021150ddb6eea90bb0be2c2f36
2019-06-18 05:32:30 -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
55aca40899 Merge "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows"" into qt-dev am: 2ea2a58d97 am: 9adc27c042
am: 4eca767f5e

Change-Id: I14236d9d53ed136a306d9f46af0fc51dc51a4505
2019-06-14 13:50:26 -07:00
Tim Murray
4eca767f5e Merge "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows"" into qt-dev am: 2ea2a58d97
am: 9adc27c042

Change-Id: I10074fc6efd0749da57189eb55f2b8e5e0507fc0
2019-06-14 13:37:00 -07:00
Tim Murray
9adc27c042 Merge "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows"" into qt-dev
am: 2ea2a58d97

Change-Id: I89fe6d0159d74709578515329c0725fc75aa93bc
2019-06-14 13:24:06 -07: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
TreeHugger Robot
5ca06946f4 Merge "Make SurfaceControl Transaction parcelable 1/2" 2019-06-13 17:19:45 +00:00
Ryan Lin
1877e93695 Merge "added getDisplayId for AccessibilityWindowInfo" 2019-06-13 08:14:32 +00:00
TreeHugger Robot
1e96ff75bd Merge "Revert "AccessibilityEvents for visibility changes should be subtree events."" 2019-06-13 06:20:37 +00:00
Vishnu Nair
629df2bb8f Make SurfaceControl Transaction parcelable 1/2
Allow clients to send SurfaceControl Transactions across processes to
enable more advanced synchronization use cases.

Bug: 132205507
Test: go/wm-smoke
Change-Id: I20a33cafc0960e73f9a2c3d740f81319e02b68ff
2019-06-11 16:03:38 -07:00
TreeHugger Robot
3eaf6dfe49 Merge "TC: Ensure ABANDON event has an entity type." 2019-06-11 14:26:44 +00:00
Qasid Ahmad Sadiq
1c9772de4c Merge "AccessibilityNodeIdManager should hold onto weak references of Views." into qt-dev am: c0d808a274 am: 5e2254948d
am: 2e441f5581

Change-Id: Ibe695d8121eb2f69587231aa6306cdd43f9083d6
2019-06-10 22:37:49 -07:00
Qasid Ahmad Sadiq
2e441f5581 Merge "AccessibilityNodeIdManager should hold onto weak references of Views." into qt-dev am: c0d808a274
am: 5e2254948d

Change-Id: I912df6a821035aadcdd47a749d4d8d7ff350e0a1
2019-06-10 22:32:49 -07:00
Qasid Ahmad Sadiq
5e2254948d Merge "AccessibilityNodeIdManager should hold onto weak references of Views." into qt-dev
am: c0d808a274

Change-Id: I44bfdb8beebafd5e1a8ea91da9f30a876b0ddf27
2019-06-10 22:27:47 -07: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
Feng Cao
d57c9734ec Merge "Only send text update for TextView after VIEW_ADDED is notified" into qt-r1-dev am: 691fa971ec
am: a1a275e63c

Change-Id: Ie5e4104e6111c3a5d326e621c2528ece42879ebf
2019-06-08 11:11:54 -07:00
Feng Cao
a1a275e63c Merge "Only send text update for TextView after VIEW_ADDED is notified" into qt-r1-dev
am: 691fa971ec

Change-Id: I7cd136b96fa62c79557768ecd1f75243bb75c670
2019-06-08 11:06:53 -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
Ady Abraham
44c4be7ee5 Merge "DisplayEventDispatcher: use eConfigChangedDispatch" into qt-r1-dev am: 619946fdc4
am: 8c219250c7

Change-Id: I70fd60cd1324ade4f3bc6b88036ec7b9be6d9e01
2019-06-07 18:54:09 -07:00
Ady Abraham
8c219250c7 Merge "DisplayEventDispatcher: use eConfigChangedDispatch" into qt-r1-dev
am: 619946fdc4

Change-Id: I98ecea42a933ed20ddd7b085baa88c277e53e353
2019-06-07 18:36:52 -07: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