Commit Graph

7480 Commits

Author SHA1 Message Date
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
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
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
Rob Carr
7e1d861a9a Revert "Sync SurfaceView position changes to parent render."
This reverts commit 6104dc9560.

Change-Id: If9d709bc65e7a817bd2c1b5768c7c33a9317638f
2015-10-15 22:53:30 +00:00
Rob Carr
70b7073fea Merge "Sync SurfaceView position changes to parent render." 2015-10-15 22:53:15 +00:00
Robert Carr
6104dc9560 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.

Change-Id: Ic33915043380ab8cd9eb4920e224b35234ed867d
2015-10-15 22:35:48 +00:00
Chris Craik
d25c9018fb Merge "Throw IndexOutOfBoundsException for invalid start/count values" 2015-10-15 16:02:53 +00:00
Jun Mukai
1db5397d88 Allow changing mouse pointer icon for the current context.
Right now, it only supports I-beam on EditText, but further
rules will come in the future.

The png files for the icons are from chromium.

Bug: 24180385
Change-Id: I8de4ec8a5412b4830c08aa232c5083841c5c751c
2015-10-15 01:47:29 -07:00
Chris Craik
18a759df06 Throw IndexOutOfBoundsException for invalid start/count values
bug:24878587

Change-Id: I2f1a68ebbc546a2d7fc3a3eacfaf1333371b2a0c
2015-10-14 18:52:11 -07:00
Filip Gruszczynski
b3a54f91fd Merge "Change WindowState.mShownFrame to WindowState.mShownPosition." 2015-10-14 19:18:11 +00:00
Filip Gruszczynski
2a6a2c2de8 Change WindowState.mShownFrame to WindowState.mShownPosition.
We never use this field as a rectangle, we only depend on its left-top
corner. Using a frame is only confusing about the purpose of this field.

Change-Id: I5d6e6321db4fa3203bb7e0f1975ae6ddd1ec09bb
2015-10-14 12:17:11 -07:00
Seigo Nonaka
e95ce0fdb7 Merge "Dump mSupportsSwitchingToNextInputMethod value" 2015-10-14 17:38:43 +00:00
Doris Liu
d1bf9f0054 Merge "New public API for calculating the total duration of an animation" 2015-10-14 17:18:37 +00:00
Seigo Nonaka
d742bfda06 Dump mSupportsSwitchingToNextInputMethod value
Bug: 24280547
Change-Id: Ibfdf09a0a2b3e907ae3e900ee541437725650463
2015-10-14 19:52:32 +09:00
Alan Viverette
0cfe7638a3 am bbd8315d: am ff953294: am d9635e60: am c83a6121: Merge "Move ASSIST_BLOCKED flag to avoid collision with SCROLL_INDICATOR" into mnc-dr-dev
* commit 'bbd8315daa82f9761c21d72ed22a3f001c28a6ca':
  Move ASSIST_BLOCKED flag to avoid collision with SCROLL_INDICATOR
2015-10-13 01:59:02 +00:00
Doris Liu
8b7c99cca2 New public API for calculating the total duration of an animation
Total duration is the total amount of time an animation takes from
start to finish. It include start delay (if any), child animation
sequence, accounting for repeat.

Change-Id: Id5b36a63c02e25586aefd38612aa5867492e1adb
2015-10-12 18:24:40 -07:00
Alan Viverette
bbd8315daa am ff953294: am d9635e60: am c83a6121: Merge "Move ASSIST_BLOCKED flag to avoid collision with SCROLL_INDICATOR" into mnc-dr-dev
* commit 'ff9532940084a89b4cfe89bc954e7d8af1c695f0':
  Move ASSIST_BLOCKED flag to avoid collision with SCROLL_INDICATOR
2015-10-13 00:19:30 +00:00
Alan Viverette
d9635e60f0 am c83a6121: Merge "Move ASSIST_BLOCKED flag to avoid collision with SCROLL_INDICATOR" into mnc-dr-dev
* commit 'c83a6121d214631c0a52be5b2c5c8ce2f6470ed0':
  Move ASSIST_BLOCKED flag to avoid collision with SCROLL_INDICATOR
2015-10-12 19:46:31 +00:00
Alan Viverette
c83a6121d2 Merge "Move ASSIST_BLOCKED flag to avoid collision with SCROLL_INDICATOR" into mnc-dr-dev 2015-10-12 19:41:10 +00:00
Chong Zhang
8dbd9ad682 Fix missing frame or wrong frame position when resize starts
When multi-thread renderer is used, delay the report to draw to the
first doFrame in ResizeFrameThread. Otherwise we could unfreeze the
window before the frame is drawn.

Also when content draw bounds is updated for the first frame, let
content draw before ResizeFrameThread so that the bounds get applied.

bug: 24715185

Change-Id: I5485dc0be3eae24c555bcc31ee8f71523b68ca8d
2015-10-12 11:01:14 -07:00
Wale Ogunwale
6e94a9eb87 Added rules for status/nav bar customization when in multi-window mode
Status & nav bars are always visible and opaque when freeform or docked
stack is visible

We still need to refactor the code to allow force opaque to be updated
independently for the status bar and nav. bar. Once that is done, the
status bar should be transcluent if freeform stack is visible and
docked stack isn't and the status bar should be opaque if freeform
& docked stack are both visible.

Bug: 24365214
Change-Id: I48ecc6067c9b0f7239c12c98eb46f3fcefacd4f9
2015-10-08 11:15:20 -07:00
Tim Murray
b2387e650b am 6c271b89: am f3acc630: am 01356906: Merge "Ensure SurfaceView requests WM relayout when size changes." into mnc-dr-dev
* commit '6c271b898c080303c24e524022dd6e4552bda5f5':
  Ensure SurfaceView requests WM relayout when size changes.
2015-10-07 23:39:16 +00:00
Tim Murray
f3acc63015 am 01356906: Merge "Ensure SurfaceView requests WM relayout when size changes." into mnc-dr-dev
* commit '0135690688c8285e022a2a8191c8582f2e6ea759':
  Ensure SurfaceView requests WM relayout when size changes.
2015-10-07 23:28:13 +00:00
Robert Carr
57caeb5703 Ensure SurfaceView requests WM relayout when size changes.
In the case of scaled SurfaceViews with a fixed size.
It is possible for the surface layout size to change
without a change to the surface size or position. In this
case we need to inform the window manager so it can update
frames and scaling. This has presented in Camera and required
workarounds such as changing the fixed surface size to trigger
an update (leading to visual artifacts).

Bug:23974105
Change-Id: I195aa0832907c32874b294101b56e198e853dce5
(cherry picked from commit a8fe43f09c)
2015-10-07 20:39:11 +00:00
Robert Carr
a8fe43f09c Ensure SurfaceView requests WM relayout when size changes.
In the case of scaled SurfaceViews with a fixed size.
It is possible for the surface layout size to change
without a change to the surface size or position. In this
case we need to inform the window manager so it can update
frames and scaling. This has presented in Camera and required
workarounds such as changing the fixed surface size to trigger
an update (leading to visual artifacts).

Bug:23974105
Change-Id: I195aa0832907c32874b294101b56e198e853dce5
2015-10-07 11:24:31 -07:00
Skuhne
980ee47ffe Resolving incorrect rendering of content while resize
The staged content bounds need to be set by the content renderer
and not by the resize thread.

Bug: 24671393
Change-Id: I8f84ec01a4ac6c1e783cc6208ca77ca6c01ba838
2015-10-06 13:52:17 -07:00
Chong Zhang
a42521ca0a Merge "Make window callbacks non static member of ViewRootImpl" 2015-10-06 18:56:13 +00:00
Chong Zhang
dcee1dea6b Make window callbacks non static member of ViewRootImpl
Move add/removeWindowCallbacks to onAttachedToWindow/onDetachedFromWindow.

There might be more than one windows in an app process, the window
callbacks need to be per window, not global.

bug: 24679461
Change-Id: I216ff27b2a41ecfe7399a8161df362bebc0ac96a
2015-10-06 10:29:55 -07:00
Chet Haase
4164e6a8da Merge "Enable activity rendering during window animations" 2015-10-05 22:27:02 +00:00
Chet Haase
9c45041105 Enable activity rendering during window animations
A change was made back in ICS that prevents the view hierarchy from rendering
during window animations. Specifically, it allows the hierarchy to render once (to draw
the results of its first layout), but further drawing is suppressed at the
ViewRoot/performTraversals level until the window animation is complete.

This change was introduced to avoid jank problems that were resulting from
thrashing the GPU by issuing drawing commands from multiple processes simultaneously,
and limited the number of rendering processes to mainly the system server (and
possibly the System UI), which allowed window animations to be much smoother.

This fix contributed to another source of jank, however, in which applications
which attempt to animate when they first appear will not render any frames of
animations until the window animation is done, resulting is a snapping to the resulting
state once the window animations are complete.

Meanwhile, hardware has gotten faster and GPUs have gotten better, and it is time to
revisit this logic. This change disables the earlier fix and allows view hierarchies
to draw normally, regardless of whether window animations are taking place.

Issue #22232939 Remove flag that prevents drawing during window animations

Change-Id: I4c960180771ff09a7088abd77b437586e835a991
2015-10-05 14:58:17 -07:00
Filip Gruszczynski
14418daa09 Fix recents crashing during docked stack resize.
Whether acitvity window should be preserved during the relaunch is
controlled by the activity manager and the existence of
non-client-decor should not affect it. For example, docked activities
will not have non-client-decor, but we would like to preserve them
anyway.

Bug: 24573657
Change-Id: I5d4852c3b7c26ac3ec1bbc105639f75b67d1d3ad
2015-10-05 10:56:49 -07:00
Alan Viverette
3b49317977 Move ASSIST_BLOCKED flag to avoid collision with SCROLL_INDICATOR
Bug: 24657825
Change-Id: Ifa61fe934b3e2467e86c71b37b4f3ede40989e96
2015-10-05 11:13:02 -04:00
Toni Barzic
8a20b7021a Merge "[a11y] Add default autoclick delay value to AccessibilityManager" 2015-10-02 19:29:06 +00:00
Skuhne
b816087962 Rendering the window frame with a second thread
Using a multi threaded render node to render the window frame
asynchronously from the application relayout.

Bug: 22527834
Bug: 24400680
Bug: 24459827
Bug: 24409773
Bug: 24537510
Change-Id: I1010fc6a8b6e38424178140afa3ca124433ab7e4
2015-10-02 07:11:45 -07:00
Toni Barzic
f3d78a2fa8 [a11y] Add default autoclick delay value to AccessibilityManager
The goal is to make this value shareable with Settings code (without
adding dependency on com.android.server)

Change-Id: Ic41af575dcf8081de69bdcdb20fba430bcf3257e
2015-10-01 12:26:24 -07:00