Commit Graph

7513 Commits

Author SHA1 Message Date
Chong Zhang
d153c4f6f0 Fix flicker when releasing drag of divider
bug: 25564523
Change-Id: I9c19f40f27cc80b8e6e0e98a0d6455941bd624e7
2015-11-09 10:34:14 -08:00
Winson
13d30660ef Fixing issue with canceling the thumbnail in addition to the app window.
Bug: 25392381
Change-Id: Ib507f53bcd2aad4771c2546f5e8bfe771769e9a2
2015-11-06 15:30:29 -08:00
Jorim Jaggi
a7262a8956 Immediately start resizing when touching docked divider
Before, the surface was made full-screen only after
a certain amount of time. Now, immediately make the surface
full-screen, as soon as the divider is touched, to make
resizing much snappier.

Bug: 24507122
Change-Id: I9425785fca4e62964a959a432c80a81d346602c5
2015-11-06 16:17:42 +01:00
Jorim Jaggi
253a20fad8 Fix black holes and flickering in docked resizing
When we start a resize with the docked stack divider,
set the surface background to be full-screen, and use
the traditional surface clipping/positioning in window
manager to adjust the size. This ensures that we don't
have any black holes because of asynchronicity (except
at the very beginning, but this can be worked around
later), and the position of the right/bottom activity
is always in sync with the position of the divider.

Also fix a bug in NonClientDecorView where the first
request to draw was dropped (because the thread hasn't
started up yet), and the main thread was waiting for it
indefinitily.

Bug: 24507122
Change-Id: I623bd48d5be64fac2fba45241b84f265944d200d
2015-11-06 16:17:14 +01:00
Jorim Jaggi
61f39a7b98 Migrate docked divider drawing to SysUI
Move docked divider drawing to SysUI. This let's us have real
time shadows in the future. Keep DockedStackDividerController
for placing/visibility in window manager.

Change-Id: I82c10add626d30f2ba180ee2a21cdbe6ddfe0371
2015-11-06 16:13:11 +01:00
Jorim Jaggi
2f7d292596 Supply app transition specs with a future
Because we retain activity surfaces now, the app transition specs
which were calculated/generated after the onPause() call when going
from recents -> app were too slow. Instead, supply a cross-process
future, which gets fetched when the window manager is about to be
ready to execute the app transition. In practice, this still gets
executed immediately after the onPause call.

If we have a retained surface, this adds some latency, but since we
absolutely need the specs to execute the transition, we have that
latency no matter where exactly we generate the specs.

If we don't have a retained surface, the specs are not calculated on
the critical path, so it's faster.

Bug: 19940527
Change-Id: I80d2c6f6b3a6568a70339619ecefbc3bd8409bd8
2015-11-06 16:12:59 +01:00
Bart Sears
8382f98f62 Merge "Revert "Clarify geometry management for SurfaceView"" 2015-11-06 09:08:46 +00:00
Bart Sears
7d73643f7a Revert "Clarify geometry management for SurfaceView"
This reverts commit 78a45f2bd8.

Change-Id: I782f688f52a85df84d9facef2fbf88c28f4a7082
2015-11-06 09:07:58 +00:00
Rob Carr
b9765b4c15 Merge "Clarify geometry management for SurfaceView" 2015-11-06 02:09:35 +00:00
Filip Gruszczynski
63a35e2343 Fix minor problems when resizing/maximizing docked window.
When maximizing the transition should originate from visible bounds, so
the first frame matches what is visible to the user. When switching to
the big surface, we only need to increase the layer by one, instead of
having artificially large value. If we use the large value, it will
cause a flicker over system windows.

Also includes some cleanup, like static imports and necessary logging.

Bug: 24913915

Change-Id: I84d7594622aa639e2008c662f941edf9c20b3202
2015-11-05 16:16:19 -08:00
Robert Carr
78a45f2bd8 Clarify geometry management for SurfaceView
In the hardware accelerated case, RenderThread needs
to be the authority of information on the geometry of
the SurfaceView (this will occur via moving the
repositionWindow call to RenderThread). In order
to support this we have to enable calling relayoutWindow
without geometry (so that it will not fight with
repositionWindow). Add such a mode to relayoutWindow
and use it from SurfaceView. Add size to repositionChild
while we are here.

Change-Id: I12f85f586a38bf86367f3d964cb49f19003d441f
2015-11-05 15:37:42 -08:00
Filip Gruszczynski
14b4e57c1b Remove blink during the freeform -> recents transition.
We achieve the desired result by prolonging the last frame of the
animation until recents tells that it drew its content. The CL also
includes cleanup that moves code that depends heavily on WindowState
fields into that class.

Bug: 24913782
Change-Id: I5ee5b18504dd4a86c24033d17eca21cd31936bca
2015-11-04 09:53:22 -08:00
Alan Viverette
78a8df4919 Merge "Always call legacy performLongClick()" 2015-11-04 15:09:27 +00:00
Alan Viverette
7611a6de6c Always call legacy performLongClick()
Adding performLongClick(x,y) broke compatibility for widgets that
overrode the no-arg performLongClick() and expected to receive a call.
This CL ensures that the no-arg method is called and the (x,y) data is
preserved for use in the default implementation.

Bug: 25411884
Change-Id: Ib0a3fb02d4c08ef64ce3a7165aa83bf0688aa50e
2015-11-03 13:32:20 -05:00
Rob Carr
31b09bdcdd Merge "Sync SurfaceView position changes to parent render." 2015-11-02 21:30:56 +00:00
Jun Mukai
4c759ca99f Merge "Fix: ToolType() check -> isFromSource()." 2015-11-02 21:27:24 +00:00
Jun Mukai
36a9946b23 Fix: ToolType() check -> isFromSource().
Change-Id: I8e13a179dc076cc44248662e6e8fd60e8cc69a3f
2015-11-02 13:15:00 -08:00
Wale Ogunwale
02a5a6bb9b Merge "Added StackId object for checking what features a stack supports" 2015-11-02 20:38:39 +00:00
Wale Ogunwale
3797c22ea1 Added StackId object for checking what features a stack supports
Helps make the code easier to follow since we are no longer checking
multiple stack ids at various decision points.

Bug: 25282299
Change-Id: Ifa6864a1ef56ce2eca4c94f87a4e0b993de987cd
2015-11-02 11:32:42 -08:00
Winson
c28098f69b Add ability to cancel task window transitions.
Bug: 25392381

Change-Id: I45f48edc21c058df0e4c22ceaf7e9aef5899a29c
2015-11-02 10:16:23 -08:00
Filip Gruszczynski
57311f7617 Merge "Hide recents during freeform to recents animation." 2015-10-30 21:34:57 +00:00
Filip Gruszczynski
1a5203dfd5 Hide recents during freeform to recents animation.
Bug: 24913782
Change-Id: I6a5d3a638640571a902e095c4c0650b88eea0fb6
2015-10-30 14:33:48 -07:00
Rob Carr
64e516f5fa Sync SurfaceView position changes to parent render.
In order to provide pixel perfect movement of SurfaceViews
'within' other views (e.g. scrolling) we need to be able to
synchronize the attached (parent window) painting with the
movement of the SurfaceView (recall, SurfaceViews are positioned
behind their attached windows and the parent must render a
transparent region for the SurfaceView to appear). Provide
a new WindowManager method to reposition an attaching window
(that is to say, a window which has an attached window like
SurfaceView) and defer the transaction until the parent frame.
SurfaceView is hooked up to use this for movement. This is still
'racy' in the hardware accelerated case as the render thread
could be on either side of dequeing the frame we are working on.

Bug: 22802885
Change-Id: I025d2bdcbe15c1c11047cc0dbca2cf2b7d67c632
2015-10-30 21:23:28 +00:00
Rob Carr
b97ba3c09d Merge "Add window setDecorView API." 2015-10-30 20:55:35 +00:00
Vadim Tryshev
02ed4a0e10 Sending drag-start notifications to children added to view group.
Doing this while dragging is really necessary for System UI shelf.

Also, not forgetting to remove the child from the "interested" set when
the child is removed.

Bug: 25231591
Change-Id: I26f5086a0a842868b2d7e9809f7483152098f314
(cherry picked from commit a82c8709f0914064f4b00262f1d411594bab467f)
2015-10-29 19:42:00 +00:00
Robert Carr
b6c2624c8d Add window setDecorView API.
Add a Window API for setting a view which will be placed in
the decoration area (next to the window control buttons).

Change-Id: Ie106cbea653ff95fdba987a2a43506d394600612
2015-10-29 12:31:47 -07:00
Steven Dao
84e7b4f588 Merge "Add missing actions to getActionSymbolicName - This improves the output of AccessibilityAction.toString() for debugging purposes." 2015-10-29 17:43:12 +00:00
Alan Viverette
d8f56833c5 Merge "Show anchored context menu on long press" 2015-10-29 14:24:53 +00:00
Jun Mukai
794469916c Merge "Add setPointerShape() to View for customizable pointer icon shape." 2015-10-29 00:16:33 +00:00
John Reck
9dea0d53f5 Free DisplayListData for Views with GONE parents
Bug: 22565656
Change-Id: I06060e6ae473482ec79feb891f9123c85706237f
2015-10-28 12:20:20 -07:00
Keisuke Kuroyanagi
9a4450ba6c Add null check for MotionEvent#getDevice.
MotionEvent#getDevice can return null when the device is
unknown.

Change-Id: I902a96300307e3b2d3b324a2998e470254388e27
2015-10-27 17:29:53 +09:00
Alan Viverette
35c6d6b08a Show anchored context menu on long press
Also shows anchored menu on D-Pad long press and uses the center of the
view as the anchor point. This is how we already handle hotspot feedback
when there is no explicit center, so there's no visual change there; it's
just more obvious from the View side of things what the result will be.

Bug: 25215353
Change-Id: I930c3aeffc993b7c553ffb626d1b5103c6cb1267
2015-10-26 20:31:55 +00:00
Maxim Bogatov
699ee64e20 Merge "Prevent AccessibilityInteractionClient.getWindows() returns partially cached windows list." 2015-10-22 23:09:20 +00:00
Maxim Bogatov
c3281200fa Prevent AccessibilityInteractionClient.getWindows()
returns partially cached windows list.

It could happen that AccessibilityWindowInfo cache is
cleared. And after that calling
AccessibilityInteractionClient.getWindow(windowId)
would add that window to cache. And while cache is
not empty after that AccessibilityInteractionClient
returns its content on getWindows() request even
if it does not contain all windows.

Change-Id: I70dc96d50e3368285fd482a98769a93ae2c15f22
2015-10-21 15:51:56 -07:00
Michael Wright
ea84cff8fd Add new Cut / Copy / Paste keys.
Bug: 25120948
Change-Id: I401792b8c88584d8c389fa356186ccea943d5dd4
2015-10-21 18:08:30 +01:00
Jun Mukai
5359893eff Merge "Do not update pointer icon shape for HOVER_EXIT event." 2015-10-20 19:54:47 +00:00
Jun Mukai
8480e34ff8 Add setPointerShape() to View for customizable pointer icon shape.
This will be used for window divider (for multi-window mode).
See I40443356f9151f8a8024f6a62517dd74e68fce41

Bug: 24415739
Change-Id: If1cd34cc5253c9f8a50decba90498001093a9db7
2015-10-19 16:41:34 -07:00
Jun Mukai
76c4a12925 Do not update pointer icon shape for HOVER_EXIT event.
EXIT event does not have to udpate the pointer icon shape, because
when it immediately moves to another window, its HOVER_ENTER will
handle the icon shape.

Also HOVER_EXIT can happen after the HOVER_ENTER of the new window,
and in that case updating pointer icon at HOVER_EXIT will overwrite
the pointer icon for the new window.

Bug: 24415739
Change-Id: I08fc72cc69bbc3a6eef36d501d93e8e9ad36df85
2015-10-19 15:51:28 -07:00
John Reck
ba64d6af95 Merge "Fix trace end in inflate" 2015-10-19 22:00:54 +00:00
John Reck
465e1a3e12 Fix trace end in inflate
Change-Id: I62809d70410a045231c8210ecd94a0bfc5e2d2fb
2015-10-19 12:46:09 -07:00
Chris Craik
78327393ac Merge "Rename DisplayListData to DisplayList" 2015-10-16 18:36:01 +00:00
Chris Craik
003cc3dec8 Rename DisplayListData to DisplayList
Change-Id: I25f6bb88ffdf9baf7e8e4e2a294aa8c9d2a4605b
2015-10-16 10:38:34 -07:00
Jun Mukai
547c346bb3 Merge "Allow changing mouse cursor for the edges of resizable window." 2015-10-16 17:13:25 +00:00
Jun Mukai
41aab00c3e Allow changing mouse cursor for the edges of resizable window.
Bug: 23193951
Change-Id: I38662a61ff829e5b441e1c8b9f472eb0d75904e4
2015-10-16 10:11:32 -07:00
Wale Ogunwale
9b34442568 Use StringBuilder to construct window title string.
Change-Id: I9193b7f5180f165d517cbfe0345f84e161b851d2
2015-10-16 09:07:45 -07:00
Wale Ogunwale
d4f2b641d3 am be02134c: am fceaedda: am 75693994: Merge "Disassociate system windows from apps"
* commit 'be02134cbc7ef98e73f118aba45a92908d818553':
  Disassociate system windows from apps
2015-10-16 14:08:14 +00:00
Wale Ogunwale
be02134cbc am fceaedda: am 75693994: Merge "Disassociate system windows from apps"
* commit 'fceaedda41f9133a4d4213720b15950ef43dd00c':
  Disassociate system windows from apps
2015-10-16 14:00:47 +00:00
Wale Ogunwale
fceaedda41 am 75693994: Merge "Disassociate system windows from apps"
* commit '75693994f60bdec9a10db98ddb8addd2bc3f8bbb':
  Disassociate system windows from apps
2015-10-16 13:54:54 +00:00
tiger_huang
ff58e30aca Disassociate system windows from apps
With the original logic, if an app creates a system window, when the
user goes to home screen, the system window will be still there and
become unable to receive input events, because the system window will
be also changed to the stopped state with the app window, and the
current logic of ViewRootImpl forbid a stopped window receiving input
events.

This change prevents assigning the token of the app window to system
windows created by the app, so that when the app goes to the stopped
state, its system windows won't be affected (can still receive input
events).

This change is related to the following changes:
a5d29971f8
15ed2754a3
c3672cd3f7
41725dedc3

Bug:
https://code.google.com/p/android/issues/detail?id=189710

Change-Id: I515e47bafcf39a2b1bdf92f11f623bef8fb6263c
2015-10-16 12:30:38 +08:00
Rob Carr
cbc4e08fb5 Merge "Revert "Sync SurfaceView position changes to parent render."" 2015-10-15 22:54:11 +00:00