Use the override configuration for the task the app is contained
in to generate resources for the starting window.
Bug: 28220001
Change-Id: I6fdf39a6d6de41287b44b25861a76f58fe58dd53
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
Fixes: 28074239
Need to convert from scaled window to screen before
updating position of the SurfaceView
Change-Id: I75dec23408c32ec01e88193ea38b1fb253b3fd6f
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
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
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
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
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
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
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
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
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
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
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