getSpans was called too many times in handleRun. Pre-compute the
subset of intersected spans and iterate over a subset of it instead.
Moving the instanceof test in getSpans after the other tests also
speeds things up a lot.
On a text with ~300 words, all with a span attached, getSpans went down
from 78% to 14% of the CPU usage.
Change-Id: I59bc44f610e9a548e0dcec68b180934da9e5c559
Bug 5313754: SpellCheckSession is released when the window loses focus.
When an EditText is initialized with text, a new spell check is initiated
and previous spell check spans are removed.
Requires a new flag to prevent this from happening when the window focus
change comes from the suggestion popup window being shown.
Also fixes bug 5329588: handle spell check language change.
This change has been reverted. This amended change defers the creation
of the SpellChecker, so that it is only created for editable TextView.
Patch 3: Bug 5332065, the spell check session is closed in onDetachedFromWindow, which is
called when the window is destroyed (like on rotation), which was not the case with
onWindowFocusChanged.
Patch 5: Fixed life cycle. A view can be created and never attached to the hierarchy. As
a result, the spellCheck session would not be closed. Moved spell check to onAttach and
perform a spell check when text is changed by setText only if the view has previously
been attached (and the spellChecker has been created).
Change-Id: Ic2cfbfc0d3f23c589dd9e37f02e4afc1d625615d
Fixed several regressions in automated audio effect tests due
to changes in effect framework and visualizer FFT output range.
- Do not suspend Volume effect on session 0 when effects are
enabled on specific sessions.
- Adapt energy detection thresholds to new visualizer FFT range.
- Leave more time for BassBoost and Virtualizer effects to ramp up
before measuring the effect.
- Removed second insert reverb left by mistake on the player session
in preset reverb test.
Change-Id: I7a1ad1372d783fa7900eb9dd1d3b47f54d8d766f
The message when something is not an APK that is submitted for dexopt is
not extremely helpful. Make it more precise and remove the useless
traceback.
Change-Id: Ibb34b2b2c10ee28ea98662c3f6fd070529cf8c4f
when areas of the FB are undefined (transparent windows on top of
nothing), we clear those areas before composition.
however, it makes no sense to do this when the FB is not in use
(case where hwc handles all layers)
Bug: 5360529
Change-Id: If51bb669307e8419bbe1f3a89d1c88e0ec1f216c
Scroll events are used to report position change and should not
contain the text content of the view that fires them because it
is usiually a containter for many other views and the text will
be long and not informative for accessibility purposes. Also
such evens are fired relatively frequently. If a client wants
to fetch some textual content for a scroll event he can use
the interrogation APIs.
bug:5352059
Change-Id: I43e02aca895c8ab16ba82ebe1cee3aea8ce7711a
The implementation of the method View#setTag(int, Object) stored tag
objects as entries in a static WeakHashMap associated with the View as
a key. This was problematic for any tag object that stored a hard
reference back to the View the tag was placed on, as it would cause
the WeakReference key to never be collected and the entry to persist
forever.
This was particularly nasty if an app used a keyed tag to store a
ViewHolder object referencing child views for use in the Adapter
implementaion for an AdapterView, since child views will always have
hard references leading back to the parent.
Change-Id: Ia17840a301ba0e0c928861405388fb2f625dac2c
Theme.Holo.Light.DarkActionBar gets black text
Make sure that menus generated for use in action bars get themed correctly.
Change-Id: I14ba676d296c785514425d40d89e62dc4ff1da1a
If the app had activities still finishing, when we checked whether it was
now stopped we would get told no. Also some other improvements:
- Schedule an idle as part of the force stop, to get any finishing
activities out of the stack soon rather than waiting for some activity
to idle.
- Don't filter out stopped system apps. This is dangerous because
system apps may have no way for the user to explicitly launch them,
so they could get put into a stopped state for which there is no way
to get them out. Also if the user really wants a system app to not
run, the new disabling mechanism is more appropriate.
Change-Id: I34003f21dac29e2ca0f66a23b88c710de41bab99
In SurfaceMediaSource::read, if disconnect has already been called, then
ERROR_END_OF_STREAM should be returned rather that NO_INIT. Else, it
sometimes leads to a crash in mediarecorder stop() call.
Related to FactoryROM bug: 5332812
Change-Id: I22132538ab2501d084e0283876817b1ec3f64a1d
Stop guessing based on the connectivity of the default route and use the correct
v4/v6 proto for your pid.
bug:5284168
Change-Id: Ife82a8d8e54c0ace2bc9e8a624b11d29a4e285e2
Watch for changes to telephony network subtype, and update iface
mapping to persist stats under correct type. Update network stats
before removing tethering NAT rules.
Skip recording that would create empty historical buckets. Query UID
stats before iface stats to always skew positive when counters are
actively rolling forward.
Bug: 5360042, 5359860, 5335674, 5334448
Change-Id: I8aa37b568e8ffb70647218aa1aff5195d3e44d5a