Commit Graph

13396 Commits

Author SHA1 Message Date
TreeHugger Robot
963754df14 Merge "Replace client token with a new token in InputWindowHandle" 2019-10-11 15:32:19 +00:00
Issei Suzuki
b4b372550e Merge "Removed dead code around TRANSIT_TASK_IN_PLACE" 2019-10-11 12:16:41 +00:00
Vishnu Nair
1878216520 Replace client token with a new token in InputWindowHandle
The tokens are used to map input data to its window and its channel. Currently InputWindowHandle
tokens uses the client IWindow binder token if the input is associated with a client window or a
newly generated token for temporary surfaces (drag input surface), and windowless surfaces.

These tokens are also used to send policy related events. From the token, it is not obvious what
the token represents for which component. This is a cleanup cl that removes the use of client before adding an explicit token for handling policy related events.
One use case of client token was to support pointer capture but this will move to using
the input channel socket.

Removing the client token allows windows to share its input token with other processes to enable
features like transfer focus without leaking the client token.

Bug: 134365580
Test: go/wm-smoke
Test: atest PointerCaptureTest WindowFocusTests

Change-Id: I49e4c54d977f98e855af9e7ed54443588fdb66c9
2019-10-10 18:35:55 -07:00
TreeHugger Robot
9319ea66be Merge "Update Ember's email" 2019-10-10 20:15:39 +00:00
Nader Jawad
5830fc9836 Merge "Do not parse angle if it is negative" 2019-10-10 20:02:14 +00:00
Rob Carr
093f80de20 Merge "ViewRootImpl: Add USE_BLAST flag." 2019-10-10 19:43:49 +00:00
Issei Suzuki
d196637f9f Removed dead code around TRANSIT_TASK_IN_PLACE
Test: All existing tests still pass.
Change-Id: I881677c3a1737e4d0eca0a651216679819584179
2019-10-10 15:13:33 +02:00
TreeHugger Robot
a36ebded5c Merge "Improve dumping of display list memory usage" 2019-10-10 01:21:01 +00:00
Nader Jawad
5baa087037 Do not parse angle if it is negative
If the Gradient angle is negative after
modding by 360, maintain the previous platform
behavior of TOP_BOTTOM oreintation instead of
attempting to wrap it

Test: Added CTS test to verify various negative
angle measurements
Bug: 142111195

Change-Id: Id9c050a9e15717bfaff331c6a37cb34cbce0f060
2019-10-09 17:03:17 -07:00
Chavi Weingarten
ca80d5b65b Merge "Replace SurfaceControl call points with Transaction calls (1/n)" 2019-10-09 20:59:48 +00:00
chaviw
619da69f9e Replace SurfaceControl call points with Transaction calls (1/n)
Removed calls to SurfaceControl methods that use the sGlobalTransaction
and changed to use the Transaction methods. Removed from all classes
except from WindowSurfaceController and deleted all unused methods from
SurfaceControl.

Test: go/wm-smoke
Change-Id: I69228214bdece20ea481c6d8041321f8385a446a
Exempt-From-Owner-Approval: Santos already +1'ed
2019-10-09 20:55:47 +00:00
John Reck
183e1380ce Improve dumping of display list memory usage
The first step of improving is measuring. So measure better.

Bug: 138856108
Test: dump
Change-Id: I076b904a1f0dfb209622c76bcb8778a10cd2b7db
2019-10-09 13:42:43 -07:00
Ember Rose
93fc45b1a7 Update Ember's email
Test: N/A
Bug: 141939605
Change-Id: Icd9ae23a74175a98f8495f71c85b69891d387df0
2019-10-09 19:38:32 +00:00
TreeHugger Robot
e37dab0efc Merge changes I679a0a38,I1c125029
* changes:
  Dispatch mouse events to the view under cursor.
  Stop splitting for mouse events.
2019-10-08 22:50:49 +00:00
Robert Carr
48ec4e0b5c ViewRootImpl: Add USE_BLAST flag.
Add support for ViewRootImpl submitting buffers using
BLAST and put this support behind a disabled-by-default
FLAG.

Bug: 135786080
Change-Id: Ia3f205e34db9f9aa574c9c2e2c499dd3046af220
2019-10-08 14:36:38 -07:00
Kevin Chang
143000b23f Merge "Create new API for ImageSpan" 2019-10-08 06:09:44 +00:00
Rhed Jao
c2653261c5 Merge "Accessibility shortcut improvement (3/n)" 2019-10-07 02:00:40 +00:00
Jacky Kao
61178c5f13 Merge "Implementing new API : getWindowsOnAllDisplays()" 2019-10-05 00:07:04 +00:00
Garfield Tan
63e6a35508 Dispatch mouse events to the view under cursor.
Events from touchpads may have multiple fingers on them, and the down
event may be active with a finger which coordinate isn't in the view
where the mouse cursor is. Need to make sure it's dispatched to the view
under the mouse cursor.

Bug: 140312476
Test: Two-finger scroll on DualShock 4 always happen in the view under
the cursor, regardless of the order of finger put on the touch pad.
Test: atest FrameworksCoreTests:ViewGroupTest

Change-Id: I679a0a38c830bd418bb412bc6f0d78ba5c93224a
2019-10-04 15:20:28 -07:00
Garfield Tan
f90c2775d6 Stop splitting for mouse events.
Events from multi-touch touchpads have mouse source and can have
multiple pointers. This is a whole gesture and shouldn't be split into
multiple views.

Bug: 140312476
Test: Attached a touchpad to crosshatch (in my case I used the touch pad
on DualShock 4). Moved the cursor around the edge of two scrollable
views and perform 2-finger scroll. Only one of the view responds to the
scroll. Note it may not be the view under the cursor that responds to
it, which is another bug that needs to be fixed.
Test: Multi-finger touches on touchscreen can still be split.

Change-Id: I1c1250291fa8a88b33f84ca3f80c8b7ac3a61e48
2019-10-04 15:20:16 -07:00
Rhed Jao
0090ad7fd4 Accessibility shortcut improvement (3/n)
- New class AccessibilityShortcutInfo to describe accessibility
  shortcut.
- New Intent category for the target of accessibility shortcut

Bug: 136293963
Test: atest AccessibilityShortcutInfoTest
Change-Id: Id47d397a03f3f710368550e551097214c7839943
2019-10-04 16:50:30 +08:00
Jacky Kao
c7be7b52a2 Implementing new API : getWindowsOnAllDisplays()
1. Implementing the new API for supporting multi-display.
SparseArray<List<AccessibilityWindowInfo>> getWindowsOnAllDisplays()
2. Modifying the documents of this API and its function is to get the window lists of
default display.
List<AccessibilityWindowInfo> getWindows()

Bug: 133279356
Test: a11y CTS & unit tests
Change-Id: Id4e874f43390bdf4196d106a44bbca18bf9fd1d6
2019-10-04 08:31:14 +08:00
Chavi Weingarten
6b44087b1a Merge "Added API to mirror display and added sample app." 2019-10-03 16:45:06 +00:00
Taran Singh
c0263d94a1 Merge "Add showInsets method in IWindow" 2019-10-03 11:10:02 +00:00
chaviw
a51724fc71 Added API to mirror display and added sample app.
Added the WMS.mirrorDisplay API to mirror a specified displayId. The
request requires the ACCESS_SURFACE_FLINGER permission.

Added a sample app to demonstrate the useablility of this API and
different ways the mirror SurfaceControl can be used.

Test: mmma tests/MirrorSurfaceTest and install apk
Bug: 131622422
Change-Id: Ic86115786d37473650b3c7ed39cba0bd4c65b281
2019-10-02 14:09:30 -07:00
Rob Carr
d3da95fd13 Merge "Improve WindowlessWM relayout support" 2019-10-02 21:03:07 +00:00
Mark Renouf
817d014bf0 Merge "Support frame-synchronized clipping on SurfaceView" 2019-10-02 15:03:15 +00:00
Kevin Chang
78840ec064 Create new API for ImageSpan
Create new API for adding content description into ImageSpan.

Bug: 135497450
Test: Adding CTS tests for new API in linked CL
Change-Id: I6cc58657c1dfbbddf00186aeea1faa0ce876f996
2019-10-02 09:26:39 +08:00
Robert Carr
650e718efb Improve WindowlessWM relayout support
The client may pass null layout params in the case
that nothing has changed. To handle this we should
cache the previous values.

Bug: 134365580
Test: WindowlessWmTests
Change-Id: I3192b84d1550f16dcca108bd9746176a4e5ffe42
2019-10-01 13:43:36 -07:00
Tarandeep Singh
0bedd94994 Add showInsets method in IWindow
Add showInsets(types, fromIme) in IWindow in order for WM to be able to request
show for any of the InsetTypes.
Note: This will be used in followup CLs.

Bug: 139487540
Bug: 118118435
Test: Build passing

Change-Id: Ie988d0a234befa530ca236a3bb32c77d8a4dce21
2019-10-01 13:22:55 -07:00
Rob Carr
1d8b5401c2 Merge "Add relayout support to WindowlessWindowManager" 2019-10-01 19:29:19 +00:00
Adam He
725f1e8f60 Merge "Changed notifySessionLifecycle() API to notifySessionResumed() and notifySessionPaused()." 2019-10-01 18:30:59 +00:00
Robert Carr
df2894647e Add relayout support to WindowlessWindowManager
We add support for resizing, and also add test API so we can get
some end-to-end tests going

Bug: 134365580
Test: WindowlessWmTests
Change-Id: I2f61fa15962523b9736f796c60ce799e4f9c9c18
2019-09-30 17:16:02 -07:00
TreeHugger Robot
4c23a59805 Merge "Use DataClass annotation for InputMonitor" 2019-10-01 00:09:26 +00:00
Adam He
42ec1d868f Changed notifySessionLifecycle() API to notifySessionResumed() and
notifySessionPaused().

Bug: 139811826
Fixes: 141568144
Test: atest CtsAutoFillServiceTestCases
Test: atest android.contentcaptureservice.cts.CustomViewActivityTest#testSessionLifecycleEvents
Change-Id: Id5ed40a538020c5a7087556dccbda26909ffd3c2
2019-09-30 16:46:12 -07:00
Michael Klimushyn
a9427152d2 Downgrade InputMethodManager getFallbackIMM logs
Previously the IMM was logging error and warning logs every single time
it attempted to use an IMM method and ended up with the fallback IMM.
This is both extremely noisy since the IMM is accessed multiple times
per second in the case of the user typing and a little misleading since
this isn't truly an error condition on its own.

Downgrade the log to a VERBOSE log. This will still show up for apps
when in development but is less likely to wander into bug reports for
released apps.

Bug: 141884160
Fixes: 141884160
Test: Manually. Trigerred error condition and verified log level.

Change-Id: If25ef81c6b74679ebfa725f0c98e0bc633399e70
2019-09-30 22:23:46 +00:00
Adam He
e8cdd860c2 Merge "Added documentation on how hintIdEntry was used." 2019-09-30 20:42:31 +00:00
Siarhei Vishniakou
29aea7fa02 Use DataClass annotation for InputMonitor
To test out the new codegen functionality, convert the InputMonitor
class to use the @DataClass annotation.

Test: presubmit
Bug: none
Change-Id: Idcddb410555aba0c45fe4997db8b662548ce1c39
2019-09-30 20:33:25 +01:00
Kevin Hufnagle
38980e0492 Merge "docs: Added link to multi-window drag how-to guide" into qt-dev am: 667b944522 am: 52145e2481 am: 3f80c14817
am: 0befd27389

Change-Id: I51cb2f14553e549b7c0403d26d91016285c5c364
2019-09-30 09:48:17 -07:00
Kevin Hufnagle
0befd27389 Merge "docs: Added link to multi-window drag how-to guide" into qt-dev am: 667b944522 am: 52145e2481
am: 3f80c14817

Change-Id: I8c346d90c38a76802a6f2a0e5289b03dcfb1f814
2019-09-30 09:36:01 -07:00
Kevin Hufnagle
3f80c14817 Merge "docs: Added link to multi-window drag how-to guide" into qt-dev am: 667b944522
am: 52145e2481

Change-Id: Ide5e154813dce831fb117a7d23e85737088b63bb
2019-09-30 09:29:21 -07:00
Kevin Hufnagle
52145e2481 Merge "docs: Added link to multi-window drag how-to guide" into qt-dev
am: 667b944522

Change-Id: Ic5039fb781c73c2e1691c4c32afc7e35a9713683
2019-09-30 09:23:00 -07:00
TreeHugger Robot
08e59efeb6 Merge changes from topic "drag surface stuck"
* changes:
  Fix drag surface would be stuck (1/2)
  Revert "Fix drag and drop (3/3)"
  Revert "Fix drag and drop (2/3)"
  Revert "Fix drag and drop (1/3)"
2019-09-28 00:08:43 +00:00
Kevin Hufnagle
36ef69743c docs: Added link to multi-window drag how-to guide
Test: make ds-docs -j32

Bug: 71008103
Change-Id: Ifcc50920cf3828697add018d1d3a6a827c7c9f98
2019-09-27 23:56:09 +00:00
Adam He
295e6d78fd Added documentation on how hintIdEntry was used.
Bug: 141318055
Test: atest CtsAutoFillServiceTestCases
Change-Id: Ib85638a159404ca29bc2cd97bca73148f87cefae
2019-09-26 15:12:48 -07:00
Rob Carr
05c575ea38 Merge "Continued SurfaceView lifetime fixes." 2019-09-26 21:58:52 +00:00
Robert Carr
9421048a1f Continued SurfaceView lifetime fixes.
More errors in the positionLost refactoring, it turns out positionLost
can be called after we are fully detached and so ViewRootImpl can be null
(which it can't be anywhere else in the SurfaceView code). Guard against this
and guard against ViewRoot.mSurface being released since it seems this intermediate
state would also be possible.

Bug: 141474834
Test: Manual
Change-Id: Id34e667bf319deb6e8b26346225b604a54dc342c
2019-09-26 10:44:16 -07:00
Winson Chung
52d938d31f Fix nav bar leak in SystemUI
- Ensure that the composition sampling listener is destroyed when the nav
  bar is destroyed instead of waiting for the finalize callback. That
  callback would never be made since the sampling listener has a reference
  to the outer class and has a strong ref from SF, and the other class
  has itself a reference to the listener.
- Always unregister the nav bar fragment from the mode change callbacks

Bug: 141473489
Test: Switch navigation modes a couple times, take hprof dump and verify
      there aren't leaking classes

Change-Id: Ic389a559a3d430af495365102854d531f7d1966d
2019-09-26 02:31:27 +00:00
Hongwei Wang
a904e8d208 Merge "Moves shelf offset into SysUI package" 2019-09-25 21:22:59 +00:00
TreeHugger Robot
135906a5b9 Merge "SurfaceView: Release Surfaces where SurfaceControl are released." 2019-09-25 13:59:58 +00:00