Bug #5678369
Caching drawables directly in a static map was responsible for runtime
restarts. If two different UI threads requested the same drawable, the
first thread to issue the request would be given a drawable callback
belonging to the second thread. This would cause an exception in
ViewRootImpl on invalidate.
The solution is to store the drawable states and to create a new
drawable instance every time a drawable is requested from the
cache. This is similar to how preloaded resources are handled.
Change-Id: I47e24e2a168cf67a3589185c6cd77b70f9a1c7cf
When stop() is called twice or after done().This relates
to bug 5662598 because users using the old deprecated API
will see two calls to onUtteranceCompleted.
bug:5662598
Change-Id: I5d59cf66b4f4c8650d3f8f9e503ac3f33132c0d0
1. AccessibilityInteractionConnections were removed from the
AccessiiblityManagerService but their DeathRecipents were
not unregistered, thus every removed interaction connection
was essentially leaking. Such connection is registered in
the system for every ViewRootImpl when accessiiblity is
enabled and inregistered when disabled.
2. Every AccessibilityEvent and AccessiilbityEventInfo obtained
from a widnow content querying accessibility service had a
handle to a binder proxy over which to make queries. Hoewever,
holding a proxy to a remote binder prevents the latter from
being garbage collected. Therefore, now the events and infos
have a connection id insteand and the hindden singleton
AccessiiblityInteaction client via which queries are made
has a registry with the connections. This class looks up
the connection given its id before making an IPC. Now the
connection is stored in one place and when an accessibility
service is disconnected the system sets the connection to
null so the binder object in the system process can be GCed.
Note that before this change a bad implemented accessibility
service could cache events or infos causing a leak in the
system process. This should never happen.
3. SparseArray was not clearing the reference to the last moved
element while garbage collecting thus causing a leak.
bug:5664337
Change-Id: Id397f614b026d43bd7b57bb7f8186bca5cdfcff9
1. NumberPicker is trying to greedily grow to its max size
but if the max size is not specified the default value
was the max integer which makes the widget get quite
tall in some cases. Now the widget tries to reach the
max size only if it has been specified.
2. NumberPicker was not computing its min width when the array
of display values is set.
3. DatePicker' layout for the old Theme was adding a margin on
the right of the group of spinners and if the calendar view
is not shown the spinners were not centered. Added the spinners
right margin to the left margin of the calendar view.
4. TimePickerDialog was using the wrong conext and was not dismissable
on an outside touch. Same for the DatePickerDialog context.
bug:5646161
Change-Id: Ic15f9b3e6291b76493604230ceb4f783a04d4ac7
New invalidateRegion method, with better horizontal invalidate
bounds in case the region is on one line.
Use by SpellChecker when a new SuggestionSpan is added.
Change-Id: Ide11f1d3d2b1350032b475db0641018a49c08d13
Using a SpanSet to minimize the number the calls to getSpans.
This is a cherry pick of 145653 in ICS-MR1
Change-Id: I0a6e1fc7bd7a89325c2925bf98d59626d5e12995
Measuring line widths, glyph by glyph slows down the scrolling
process for long text (for some reason, width measure efficiency
is affectedi by text length, maybe because the whole text has to
be passed to JNI layers).
This optimization avoids this computation in the case where there
is no possible horizontal scroll.
This is a cherry pick of 145957 into ICS-MR1
Change-Id: I2082e3d0eedace1a86122a03e4b21f90f3bc8522
This change adds a compile-time option for SurfaceTexture to use the
EGL_KHR_fence_sync extension to synchronize access to Gralloc buffers.
Bug: 5122031
Change-Id: I7e973a358631fff5308acf377581b811911fe790
Bug #5525888
Uses only 25% of the original amount of OpenGL API calls
Fillrate usage is now 1x the screen size instead of 5x
Change-Id: Icc7d2793f276fb7ce23c7f652079e54e3d4779d5
We could sometimes allow a process to be killed while still waiting for
an activity in it to finish stopping.
Change-Id: Ibf89665c4ad6da6be22de04a82b19ef778a7fda0
We now generate a stack-trace looking thing at the top of the report.
Also fix a bug I hit where the phone window manager was sending a
broadcast before the boot had completed.
Change-Id: I0cee16180e4d05c9bd3fe715212a28f504ec91ac
Improved quick launch bookmarks to support category-based shortcuts
instead of hardcoding package and class names for all apps.
Added a set of Intent categories for typical applications on the
platform.
Added support for some of the HID application launch usages to
reduce reliance on quick launch for special purpose keys. Some
keyboard vendors have hardcoded launch keys that synthesize
"Search + X" type key combos. The goal is to encourage them
to stop doing this by implementing more of HID.
Bug: 5674723
Change-Id: I79f1147c65a208efc3f67228c9f0fa5cd050c593
You can run tests for exactly N iterations regardless of duration now,
in addition to the previous time-limited behavior.
(Clean cherry-pick to break a dependency on a previous patch that
needs work before being committed.)
Change-Id: I2e6cf511bbe968a6f95391567658722e87dfa1fe
Turning animations back on exposed this. The problem is that when the
screen brightness changes, it initiates a brightness animation. When
we force the screen to black as we wait for it to be ready to display,
it sees that an animation is running so stops it and thinks this means
it should now turn the display off.
To fix this, don't modify the screen brightness while we are waiting
to show the screen. This is good anyway because the whole point is to
avoid showing the screen until ready, and modifying the brightness at
that point would turn it on prematurely.
Change-Id: I84b296f8ca5705c2d237ea7741cdeb95c5521df9