Bug 3331706
The temporary buffer starts at index 0 and shifts indexes by contextStart.
offset has to be changed accordingly.
Note that I didn't try to reproduce the monkey bug after this fix, but it
seems like a perfect explanation for the exception.
Change-Id: Ie69adc413670caed283bc46effc69f17a102922c
Bug 3400770
TextUtils#commaEllipsize creates a MeasuredText "mt" object with the
text to be ellipsized. It calls setPara which initializes mt's mPos
member to be 0. It then calls addStyleRun which moves mPos to the end
of the string. The loop back in commaEllipsize then calls mt addStyleRun
again and this causes IndexOutOfBoundsException, because the paint
object is trying to measure text past the text's length.
It seems this was a typo and that the tempMt variable should be used,
because the code is trying to measure the format string...not the
the string to be ellipsized. This makes the saner parts of CTS test
for this method pass now.
Change-Id: Ib6aa6e4bbd6afff4c95ad4c4d51a384cc1389875
When the user is in a phone or VoIP call, the volume keys should
control the STREAM_VOICE_CALL volume. Before MODE_IN_COMMUNICATION
was introduced to cover VoIP use cases, having an active VoIP call
was determined by checking whether there was any track used the
output stream STREAM_VOICE_CALL, which can give false positives.
This CL checks instead against the audio mode to see if
MODE_IN_COMMUNICATION is selected to determine if a VoIP call
is in progress.
This implies that applications that play on STREAM_VOICE_CALL
shouldn't rely on that fact alone to expect the volume keys
to control the STREAM_VOICE_CALL volume, and should instead,
rely on the official mechanism for that:
android.app.Activity.setVolumeControlStream(int)
Change-Id: Ia487951ea1684477aa3d522c9031fad484d8a40d
(Previous behavior: the tap would pass through to the clock,
which would open the shade. Only sometimes it wouldn't,
because you'd have hit the left-hand-side of the ticker
where there's no clock underneath. So this fixes that too.)
Additionally, tapping the ticker will now immediately
dismiss the ticker.
Bug: 3365129
Change-Id: Ic641184c518b18d799a560c8da6b4c5844c912de
These trackers have two copies of the network type: newSS and newNetworkType. I think thats wrong,
but this was the smaller change on code that will hopefully be refactored soon.
On radio_off we were making a new, empty newSS but not clearing newNetworkType so it
still thought we were on 3G and when we reconnect and get 3G state changes new==old and we don't
send the update. In this fix I reset newNetworkType every time we apply it to networkType.
bug:3389886
Change-Id: I294f34259dc6c6f8f445bf2cb5466c8be747e25c
Or at least make it better. Now if we get a failure locking the surface,
we mark to do a full relayout pass later to try to get a new good surface.
Also fix some bugs in how activity manager was classifying processes for
their OOM adjustment to make better choices in what to kill.
Change-Id: I8e4aa86744211ba7693f9828291d8bbf2698274f
Also removed android:detachWallpaper="false" from lock_screen_exit
since it's not guaranteed to do something sane when windows aren't
owned by applications.
Change-Id: I28b5fc6b68d1aef93f092538d1318ce2b2a835ef
Bug 3370191
The documented behavior is to hide the error when the text changes.
However, this should not be the case if the error was reset by a text watcher.
Comparing errorBefore and errorAfter as was done before is not sufficient in the
case where the error is reset to the same value. String pool optimization will re-use
the same Object and it will look like the error has not been modified (hence the
blinking behavior reported in the bug).
For this reason, TextView has a mErrorWasChanged flag. The fix is to export methods
that can use this flag as in done inside TextView when a physical keyboard is used.
These methods are hidden.
Change-Id: Ie3ec59a368f3b1588b81242890b971ac48e8ff7e
Also display placeholders for status/title/action bars depending
on if the app is a tablet and its theme.
Change-Id: I651c1a2e5cfde165e004c11b236e6df056853dec
This is an initial API that will allow the plugin to request to
keep the screen on.
companion change is in external/webkit
bug: 3331493
Change-Id: Ic18787e7ecd705a5b2e31a34ea884fd39ad9d11a
Bug 3381317
Also generalized and uniformized the use of peekInstance. Added null
tests, and isActive tests before hiding.
Change-Id: Ifd1a053fd920841333e0ebab3e2a8d26b469a0f6