Commit Graph

8038 Commits

Author SHA1 Message Date
John Reck
9110429f0d Merge "Don't reuse LOST_SURFACE for stopped" into nyc-dev 2016-04-19 14:45:16 +00:00
TreeHugger Robot
3eefb4c313 Merge "Use right starting window resource in multi-window mode." into nyc-dev 2016-04-19 00:04:00 +00:00
Wale Ogunwale
dfc18623ed Use right starting window resource in multi-window mode.
Use the override configuration for the task the app is contained
in to generate resources for the starting window.

Bug: 28220001
Change-Id: I6fdf39a6d6de41287b44b25861a76f58fe58dd53
2016-04-18 15:09:34 -07:00
Michael Wright
c348fa319d Merge "Add new, hidden MotionEvent flag for partially obscured windows." into mnc-dev am: 224582e am: c6629bd am: a8064c2
am: bc57aae

* commit 'bc57aaed0e9ac88a63fa989dba145dc35d048c48':
  Add new, hidden MotionEvent flag for partially obscured windows.

Change-Id: I7663785a6877f61eaec121303dbdcedcbd242ec6
2016-04-18 19:03:25 +00:00
Michael Wright
bc57aaed0e Merge "Add new, hidden MotionEvent flag for partially obscured windows." into mnc-dev am: 224582e am: c6629bd
am: a8064c2

* commit 'a8064c2a8b54881bceade03a9d2f6c1223e055f3':
  Add new, hidden MotionEvent flag for partially obscured windows.

Change-Id: I4e8d2bff82a3308c5966a0b0c154209b727db669
2016-04-18 18:57:54 +00:00
Michael Wright
a8064c2a8b Merge "Add new, hidden MotionEvent flag for partially obscured windows." into mnc-dev am: 224582e
am: c6629bd

* commit 'c6629bd5dff622a26683269f9201b8d7871c6ef1':
  Add new, hidden MotionEvent flag for partially obscured windows.

Change-Id: I0d602765de707548ede0b1c0a6a38790626e7da1
2016-04-18 18:52:13 +00:00
Michael Wright
c6629bd5df Merge "Add new, hidden MotionEvent flag for partially obscured windows." into mnc-dev
am: 224582e

* commit '224582e0403bb123da49d80af21f108900185769':
  Add new, hidden MotionEvent flag for partially obscured windows.

Change-Id: I24f2bf328c91bbc05f1b76ed464d962c71e92245
2016-04-18 18:46:44 +00:00
John Reck
9a17da8125 Don't reuse LOST_SURFACE for stopped
Fixes: 28218991

If a draw() happens while we are stopped, don't report
that the surface is lost because this will prompt
a tear-down of the surface which isn't desired. It can
result in ViewRootImpl ending up in an internally-bad state
in this case.

Change-Id: If3eb8c6bc8702299e5330bc0917952624dce3b7e
2016-04-18 11:29:35 -07:00
John Reck
4afbed15f3 Fix NPE checkjni
Fixes: 28240259

releasedCallback can be null, which we need to check for

Change-Id: Ib218e1c624be8734db5722fc625ebbd72fa099ec
2016-04-18 10:35:08 -07:00
John Reck
736a52538a Merge "Fix sw legacy compat path in SurfaceView" into nyc-dev 2016-04-15 22:22:41 +00:00
Svetoslav Ganov
286c5b7741 Merge "Properly notify magnification listener" into nyc-dev 2016-04-15 21:32:05 +00:00
Svetoslav Ganov
7d477d4845 Properly notify magnification listener
bug:28088856

Change-Id: Iffd848082f035319aab3af177921bb3085844ab0
2016-04-15 14:30:47 -07:00
TreeHugger Robot
b3e26a9b41 Merge "Fix wrong transition when dock minimized and docked app launched" into nyc-dev 2016-04-15 20:46:40 +00:00
John Reck
f057fb56f6 Fix sw legacy compat path in SurfaceView
Fixes: 28074239

Need to convert from scaled window to screen before
updating position of the SurfaceView

Change-Id: I75dec23408c32ec01e88193ea38b1fb253b3fd6f
2016-04-15 13:46:29 -07:00
Jorim Jaggi
681fc7b267 Fix wrong transition when dock minimized and docked app launched
When having an app docked and then going home, and then launching
the app from the homescreen, we had a wrong transition because
getTopMost task was already set to the launched app, because
getRunningTasks doesn't exclude the docked stack. Instead of adding
flags for getRunningTasks, which sounds risky, we just pass a "force"
value when we launch recents in this state.

Bug: 27154882
Change-Id: Iee4512fed13115dbbe8b74413ff1fa9b87afa0ef
2016-04-15 19:23:05 +00:00
John Reck
cd1c3eba69 Add a callback for when a gl functor is released
Bug: 27709981

Change-Id: Id5be3e8f88d6d84a9c59c7ed23e7e8862feefbe8
2016-04-15 10:56:53 -07:00
Jorim Jaggi
698e7634aa Disable resize when IME is adjusted
Bug: 28175599
Change-Id: I338dd230443973d912f17946ed722789b0f545a2
2016-04-14 20:45:56 -07:00
John Reck
d6a25c2b3e Merge "Revert "Revert "Make stopped state a first-class thing""" into nyc-dev 2016-04-14 17:40:52 +00:00
John Reck
8afcc76920 Revert "Revert "Make stopped state a first-class thing""
This reverts commit eab3f2658a.

Fixes first-frame issue, mReportNextDraw needs to override
mStopped

Fixes: 28118961
Fixes: 27286867

Change-Id: I5c811759637d08ba9f3b342016d1b3006986d5a2
2016-04-14 10:39:03 -07:00
Chris Craik
2344c6a2ae Merge "Destroy drawing cache when switching layer type" into nyc-dev 2016-04-14 17:07:35 +00:00
Rob Carr
b33daec8c2 Merge "Add WindowManager side timeout for toasts." into nyc-dev 2016-04-14 16:23:24 +00:00
Yuki Awano
0697c7a877 Do not update accessibilityTitle in
LayoutParams.setTitle

Bug: 28126629
Change-Id: Idfd8c0210d32e1a0e9c16272cfbb35ef6065e805
2016-04-14 04:16:18 +00:00
TreeHugger Robot
c1699a9f4c Merge "Populate RangeInfo correctly when acquiring from pool" into nyc-dev 2016-04-14 00:28:28 +00:00
Steven Dao
24142819b8 Populate RangeInfo correctly when acquiring from pool
Bug: 27136599
Change-Id: I836b2ae3bf9b2ed5fc4afeb744e2cf3a500cc4a4
2016-04-13 15:30:00 -07:00
Chris Craik
68be3529e4 Destroy drawing cache when switching layer type
bug:27099358

Change-Id: Ia308dd817799b6d64a802df211c39efc25c99e7e
2016-04-13 14:46:56 -07:00
Robert Carr
70f0d229c0 Add WindowManager side timeout for toasts.
If the thread a toast is shown on is shut down,
the attempt to post the hide message to it's handler
will fail and it will never request removal. If this was
only some application background thread we will also not
receive a death notification. It seems best to use a timeout
to ensure we don't need the clients cooperation, espescially
as toasts can keep the screen on.

Bug: 21693547
Change-Id: I1d6e54ded5b9e2050daedc4d263e2e21fbe69862
2016-04-13 13:32:58 -07:00
Wale Ogunwale
3fb1c81394 Merge changes Ieefeb843,Ic2a94b09 into nyc-dev
* changes:
  Update surface insets on window elevation changes.
  Fixed bug with cropping out drop shadow for pinned stack.
2016-04-13 16:59:36 +00:00
Michael Wright
52546e4635 Merge "Crash early when requesting a keyboard shortcut helper..." into nyc-dev 2016-04-13 13:58:16 +00:00
Yohei Yukawa
d0fae0d61d Merge "Improve captalization in InputMethodSubtype#getDisplayName()." into nyc-dev 2016-04-13 06:51:34 +00:00
Yohei Yukawa
e489baf96d Improve captalization in InputMethodSubtype#getDisplayName().
The goal of this CL is to enable
InputMethodSubtype#getLocaleDisplayName() to return more natural locale
display name in terms of capitalization rules.

The key idea here is to use LocaleDisplayNames#localeDisplayName() with
an appropriate DisplayContext.CAPITALIZATION_FOR_* parameter rather than
relying on Locale#getDisplayName().

Bug: 22845728
Change-Id: If105082ce703db7a86738455db7e9fb37f3c6fe8
2016-04-13 05:30:23 +00:00
Jorim Jaggi
2917dc4918 Add shadow for minimized dock
Bug: 27972642
Change-Id: Ic4c8145f61694ff2bb0e237da1142093c6a4d965
2016-04-12 19:17:24 -07:00
Michael Wright
53b854ad7d Crash early when requesting a keyboard shortcut helper...
with a null IResultReceiver.

We're seeing Dialer crashes in this code path but they happen in the
main Handler loop so we can't see where the request with the null
request is coming from. Crashing earlier will hopefully give us a
stack trace that we can use to diagnose the issue.

Bug: 27963013
Change-Id: I60e4ef2ef328fa69790bbcaa4f196c02f7443296
2016-04-12 19:39:03 -04:00
Adam Powell
fa58a8daa6 Dispatch View#onVisibilityAggregated to views becoming invisible
When a view becomes newly invisible/gone via setFlags, its visibility
state will have already changed by the time we
dispatchVisibilityAggregated. Since we already do visibility filtering
in the ViewGroup override when we traverse to child views, permit the
normal View implementation to dispatch onVisibilityAggregated if we're
not visible and dispatching visibility false.

Bug 28123146

Change-Id: I528dffe95d2057ef938508b9fb4219c5338b060c
2016-04-12 11:18:57 -07:00
John Reck
d2eec0efb2 Merge "Framework-side of SurfaceView#getBitmap" into nyc-dev 2016-04-12 14:36:11 +00:00
John Reck
10dd0585c1 Framework-side of SurfaceView#getBitmap
Bug: 27708453

Change-Id: Ie6fd7eca522d3e6549d8af587c975fd7e6053649
2016-04-11 16:00:22 -07:00
John Reck
825fa4d5ae Merge "Revert "Make stopped state a first-class thing"" into nyc-dev 2016-04-11 20:54:36 +00:00
John Reck
eab3f2658a Revert "Make stopped state a first-class thing"
This reverts commit 945961f78a.

Change-Id: Iebc1d49fac33380233f8785fc39bec6c30a5e714
2016-04-11 20:49:28 +00:00
Yohei Yukawa
063fe652be Merge "Make additional IME Subtype ID persistent." into nyc-dev 2016-04-11 15:46:12 +00:00
Yohei Yukawa
66baf69042 Make additional IME Subtype ID persistent.
It turns out that IME subtypes specified to
InputMethodManager#setAdditionalInputMethodSubtypes() are stored in the
presistent storate without subtype IDs.  As a result, when the system is
rebooted, the system would no longer consider those additional subtypes
as enabled due to subtype ID mismatch, until the IME re-adds those
additional subtypes again with the original subtype IDs.

Bug: 28104337
Change-Id: I1445213e0b83d76631a839b974ec1ab9b28ad7d2
2016-04-11 02:29:35 -07:00
Yohei Yukawa
b7edebc8ad Fix inefficient CursorAnchorInfo#hashCode().
It turns out that the current CursorAnchorInfo#equals() is quite
inefficient because our CursorAnchorInfo#hashCode() tries to use almost
all the fields.  Even worse, as Matrix#hashCode() is hard-coded to 44,
we get the same hashCode() when comparing two CursorAnchorInfo objects
that are different only in transformation Matrix after such a complex
hash calculation.

In the real world scenarios, most likely calculation hash code only from
Matrix and composing text would be good enough for our use case, because
the former can cover UI scrolling scenario and the latter can cover the
text typing scenario.  More complex hash calculation is probably
inefficient.

With this CL, CursorAnchorInfo#hashCode() is pre-calculated only from
those two fields, and carefully reorder comparisons in
CursorAnchorInfo#equals() to improve the likelihood of returning false
with fewer comparisons.

Bug: 28105733
Change-Id: Id896adeab5ffe87ceddb2c2762d6d91475e28ec4
2016-04-11 01:38:23 -07:00
Jorim Jaggi
8f5701bd9f Only force drawing status bar background if target >= N
Since forcing it all the time has the potential of breaking
compatibility with apps, we don't want to do this.

Instead, we only force it if the app targets >= N.

We communicate this to window manager with
PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND.

We introduced this for 2-up split-screen. If we have an app
that doesn't draw the status bar background by itself, we
just force the whole bar to be black.

The same applies for windows that used translucent status
bar - we also force the whole bar to be black

Bug: 27285627
Change-Id: I7f1ceaa364f8a4e851935f77aa5e8d913bf11791
2016-04-08 20:49:20 -07:00
Phil Weaver
af93306a3d Merge "Reduce unnecessary accessibility cache clearing." into nyc-dev 2016-04-08 22:33:33 +00:00
Tenghui Zhu
3cb5ba75b7 Merge "Update the documentation on createCircularReveal" into nyc-dev 2016-04-08 21:24:04 +00:00
Phil Weaver
e37cfab6c6 Reduce unnecessary accessibility cache clearing.
Tracking if accessibility focus is being cleared because it is being
set to another view in the same window. In this case, leave
accessibility focus on the window.

This change greatly reduces the amount of cache re-indexing.
Previously we flushed the cache every time accessibility focus moved.

Bug: 28077283
Change-Id: If80899d36e7f58b22635f844bdd4ea37a55b875e
2016-04-08 13:06:44 -07:00
Phil Weaver
ab4d5ffd12 Merge "Eliminate side effects of a11y window title." into nyc-dev 2016-04-08 18:22:02 +00:00
John Reck
c724dcf23c Merge "Make stopped state a first-class thing" into nyc-dev 2016-04-08 15:09:42 +00:00
Teng-Hui Zhu
9b3be58403 Update the documentation on createCircularReveal
fix:25250431

Change-Id: I9fc76ad69b495c36a03c875a529f755a029fae96
2016-04-07 16:13:27 -07:00
John Reck
4a62effbfe Merge "Fix some edge cases" into nyc-dev 2016-04-07 23:08:10 +00:00
John Reck
945961f78a Make stopped state a first-class thing
Bug: 27286867

WindowManager has committed to stopped state
controlling the lifecycle of the Surface, so
make that a first-class thing in HWUI as well.

This makes it more resistent to things like
a rogue updateSurface() happening while mStopped=true,
leading to bad things down the line. Instead let
the surface be changed/updated as often as desired,
and just block any attempt to draw on that surface.

Also removes some unnecessary makeCurrent()s, as
EglManager ensures that we *always* have a valid
GL context now (using a pbuffer surface if there is
no window surface set)

Change-Id: Iead78ddebc7997e8fdb0c9534836352f5e54b9bd
2016-04-07 16:02:33 -07:00
Wale Ogunwale
246c209e4f Update surface insets on window elevation changes.
Window manager factors in the surface insets when calculating the
right crop for a window surface. Without the surface insets been
updated and new param forwarded to window manager, the window crop
will not be the right size and the window drop shadow might not show.

Bug: 27364161
Change-Id: Ieefeb8435543f3137672a065269cdeefca371111
2016-04-07 15:22:49 -07:00