Commit Graph

709 Commits

Author SHA1 Message Date
Jeff Brown
b86b1027a3 am 9777fdb7: am b0a7f84b: am 63bf04d8: Merge "Fix NullException in QwertyKeyListener.KeyDown"
* commit '9777fdb7af696ca15906d03ad8aa7a3d8d51e4b3':
  Fix NullException in QwertyKeyListener.KeyDown
2014-05-20 20:47:29 +00:00
Jeff Brown
9777fdb7af am b0a7f84b: am 63bf04d8: Merge "Fix NullException in QwertyKeyListener.KeyDown"
* commit 'b0a7f84b6de20edc6337163a4a07e3c524991ddb':
  Fix NullException in QwertyKeyListener.KeyDown
2014-05-20 20:44:21 +00:00
Jeff Brown
b0a7f84b6d am 63bf04d8: Merge "Fix NullException in QwertyKeyListener.KeyDown"
* commit '63bf04d88bcc00876c30c9f2848da8c44b42185b':
  Fix NullException in QwertyKeyListener.KeyDown
2014-05-20 20:40:20 +00:00
Jeff Brown
63bf04d88b Merge "Fix NullException in QwertyKeyListener.KeyDown" 2014-05-20 20:37:44 +00:00
Dianne Hackborn
1de6b101e5 Merge "Implement better computing of battery drain time, actual charge time." 2014-04-29 18:30:08 +00:00
Dianne Hackborn
260c5020ae Implement better computing of battery drain time, actual charge time.
Also move time formatter in to framework for use elsewhere.

Change-Id: I42b6a44414b68754af65c522bef5591da5643909
2014-04-29 11:23:16 -07:00
Yuling Liang
54dacbe7ca am 3914a33c: am 26a5c2dd: Merge "Followon fix for 14276128 Clipping at bottom of TextView" into klp-modular-dev
* commit '3914a33c01102f5de51e33d006c0aeedf2693af0':
  Followon fix for 14276128 Clipping at bottom of TextView
2014-04-28 23:22:54 +00:00
Raph Levien
d97b097a5b Followon fix for 14276128 Clipping at bottom of TextView
The previous fix did not work when the text was ellipsized, because the
test for whether the line was the last line was incorrect. The new test
handles both the end of the buffer and the case where it is the last
line because of ellipsizing.

So this should be the proper fix for bug 14276128 Clipping at bottom of
TextView when lineSpacingMultiplier < 1

This version of the patch also handles the single-line case (which is
computed in BoringLayout rather than StaticLayout).

Change-Id: I88791acc2aa493cc8c599b374f4d213571260b4b
2014-04-28 18:02:27 +00:00
Yuling Liang
2be1f8c3f4 am 69a9d925: am eea94f06: Merge "Revert "Followon fix for 14276128 Clipping at bottom of TextView"" into klp-modular-dev
* commit '69a9d92502428a4cf6eb6b5bf6577d9e525796a2':
  Revert "Followon fix for 14276128 Clipping at bottom of TextView"
2014-04-25 17:38:00 +00:00
Yuling Liang
10973c7776 Revert "Followon fix for 14276128 Clipping at bottom of TextView"
This reverts commit a10e19845c.

Change-Id: I6d40451c9eb6285859e16d251b55947663a3553a
2014-04-25 17:32:08 +00:00
Yuling Liang
ec2b7d6dd7 am 60f8349b: am 243e551a: Merge "Followon fix for 14276128 Clipping at bottom of TextView" into klp-modular-dev
* commit '60f8349b9819130e81e28106a35bf3362d337045':
  Followon fix for 14276128 Clipping at bottom of TextView
2014-04-25 16:41:07 +00:00
Raph Levien
a10e19845c Followon fix for 14276128 Clipping at bottom of TextView
The previous fix did not work when the text was ellipsized, because the
test for whether the line was the last line was incorrect. The new test
handles both the end of the buffer and the case where it is the last
line because of ellipsizing.

So this should be the proper fix for bug 14276128 Clipping at bottom of
TextView when lineSpacingMultiplier < 1

Change-Id: Iac5c96f2273142031c18a27f504f7d6d5fcf823e
2014-04-24 20:00:05 +00:00
Raph Levien
79cb5505a9 am 07bed492: am e4ee0e31: Merge "Fix bug 14276128 Clipping at bottom of TextView" into klp-modular-dev
* commit '07bed4921a05e717a4b7f10a25e3830e346426b7':
  Fix bug 14276128 Clipping at bottom of TextView
2014-04-24 16:25:21 +00:00
Raph Levien
936df68016 Fix bug 14276128 Clipping at bottom of TextView
Avoid applying "extra" linespacing to the last line of a layout, because
when that is negative, it causes clipping.

Change-Id: I4cc8792fd3444e4118604cc3d0f816d59dfc1e74
2014-04-23 23:17:12 +00:00
Raph Levien
63b3d8c62e Fix extra text appearing after ellipsis
This is a fix for bug 7615701 TextView: calling setText with long
strings causes ellipsize to not work correctly. The problem is that the
"break" when the last line was ellipsized did not fully break out of
both loops of the processing logic, but only the inner loop. This
caused the outer loop to restart at the next span, causing the next span
boundary to overwrite the line end of the last visible line.

The fix simply returns from the function in that case, as there is no
further processing needing to be done.

Change-Id: I5b34233ffba6f0f6f1c12b9565b4fc53e83a4892
2014-04-03 15:52:08 -07:00
Adam Lesinski
776abc24cd Uses VMRuntime.newUnpaddedArray for ideal array sizes
Bug:13028925

Change-Id: I0a9301248b10a339afbdc5e4ffe3310ac4fa1fb7
2014-03-27 11:42:10 -07:00
John Spurlock
8a985d24ce Tabs -> spaces in frameworks/base.
Change-Id: I5a84e8e93ac99b5ed0212b37bf66efa5e53864be
2014-02-25 09:49:29 -05:00
Jean Chalard
84a3320507 Fix a crash where user data was not validated.
ExtractedText#partialStartOffset and #partialEndOffset are
from the app, that sets it as it sees fit. We need to
validate them so that we don't crash.
Still emit a warning if this is the case, as this is
not expected.

Bug: 9570771
Change-Id: Id9d6babd1620da39bf0e454b14d7ce716bd9d9d3
2014-02-13 19:14:24 +09:00
Alan Viverette
8eea3ea559 Add APIs for obtaining themed Drawable from Theme, Context
BUG: 12611005
Change-Id: Ic0057be4e4c2d0c61ce02a019b3f7d0625e3a016
2014-02-03 18:42:24 -08:00
Scott Main
418312f44c am 991ba3b7: am 74e9e698: am 7d1f8e65: am efe10233: am 5dcb75e6: Merge "fix typos bug: 11693951 bug: 12118617" into klp-docs
* commit '991ba3b7f2d7164fab956b54c711d5ea523b2ba5':
  fix typos bug: 11693951 bug: 12118617
2013-12-18 00:53:57 +00:00
Scott Main
7d1f8e6570 am efe10233: am 5dcb75e6: Merge "fix typos bug: 11693951 bug: 12118617" into klp-docs
* commit 'efe102332861bd05f0cba60e729661607546de34':
  fix typos bug: 11693951 bug: 12118617
2013-12-17 16:44:31 -08:00
Scott Main
efe1023328 am 5dcb75e6: Merge "fix typos bug: 11693951 bug: 12118617" into klp-docs
* commit '5dcb75e67b7a3401aa501126bc8401f78c181a68':
  fix typos bug: 11693951 bug: 12118617
2013-12-18 00:41:23 +00:00
Scott Main
688342f98c fix typos
bug: 11693951
bug: 12118617

Change-Id: I7a3ab4c6d7bc124ff9ed8779700e77c87409569d
2013-12-17 13:55:02 -08:00
John Spurlock
6090995951 Remove unused imports from frameworks/base.
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
2013-11-20 11:31:47 -05:00
Jean Chalard
e1ce53209a am 9ea18d49: am d952ac4c: am 218ecd43: Fix the docs build
* commit '9ea18d495c4c3d47d279f3f63cb4a24641544f89':
  Fix the docs build
2013-11-12 22:35:28 -08:00
Jean Chalard
9ea18d495c am d952ac4c: am 218ecd43: Fix the docs build
* commit 'd952ac4c171780da78a157de73702d60d4737916':
  Fix the docs build
2013-11-12 22:31:34 -08:00
Jean Chalard
f86e81c4ff [DO NOT MERGE] Improve documentation for InputType and EditorInfo.
Bug: 11245912
Change-Id: If00bb540f25b176da803af0e02fc1ce1b46537e1
2013-11-13 15:29:16 +09:00
Jean Chalard
218ecd4394 Fix the docs build
Change-Id: I05f1f39aaa9d72201a7fd06377799246039cd505
2013-11-13 15:20:58 +09:00
Jean Chalard
cfafb5059d am 45637283: am 383ef79d: am 7d57b7a3: Merge "Improve documentation for InputType and EditorInfo." into klp-dev
* commit '4563728371520de38445d5758edd3da7538a1934':
  Improve documentation for InputType and EditorInfo.
2013-11-12 21:27:34 -08:00
Jean Chalard
4563728371 am 383ef79d: am 7d57b7a3: Merge "Improve documentation for InputType and EditorInfo." into klp-dev
* commit '383ef79d14a64b335d94353e87e824ea2f37ee65':
  Improve documentation for InputType and EditorInfo.
2013-11-12 21:25:26 -08:00
Jean Chalard
c1a11f17a2 Improve documentation for InputType and EditorInfo.
Bug: 11245912
Change-Id: Ie92ba20079461f7f0e30d969ba3692fec3a3b97f
2013-11-12 14:13:55 +09:00
Victoria Lease
6eb3a0e9ba am 24aecc3f: am 24a24b27: am ee4c8464: Merge "Handle surrogate pairs in Html.toHtml()" into klp-dev
* commit '24aecc3fb609ce999a7fef7a610891d5a32eb92c':
  Handle surrogate pairs in Html.toHtml()
2013-11-01 13:34:10 -07:00
Victoria Lease
24aecc3fb6 am 24a24b27: am ee4c8464: Merge "Handle surrogate pairs in Html.toHtml()" into klp-dev
* commit '24a24b27903785dedb507b11583b70975fe9f8e4':
  Handle surrogate pairs in Html.toHtml()
2013-11-01 13:30:51 -07:00
Victoria Lease
3d4764159c Handle surrogate pairs in Html.toHtml()
Bug: 11338711
Change-Id: Ia44187cbfe3db82d6bc11c1ae3a0fb59c0a6d371
2013-10-29 15:34:51 -07:00
Chet Haase
e986ffa887 am 280d250c: am 956b23f4: am a0364e23: Merge "Fix infinite recursion in hashcode of Spannables" into klp-dev
* commit '280d250c70db2c096f3639307235a4d62f0ca38f':
  Fix infinite recursion in hashcode of Spannables
2013-10-04 17:36:25 -07:00
Raph Levien
d0607035e3 am a488c796: am 2a32771a: am 24871f63: Merge "Fix Text appears on top of existing text when composing in gmail." into klp-dev
* commit 'a488c79605d0629986bb636bc2a2bc86f4947686':
  Fix Text appears on top of existing text when composing in gmail.
2013-10-04 17:36:08 -07:00
Chet Haase
280d250c70 am 956b23f4: am a0364e23: Merge "Fix infinite recursion in hashcode of Spannables" into klp-dev
* commit '956b23f4e3b9cac88ea4627bbe4783b165beec03':
  Fix infinite recursion in hashcode of Spannables
2013-10-04 15:18:56 -07:00
Chet Haase
a0364e2360 Merge "Fix infinite recursion in hashcode of Spannables" into klp-dev 2013-10-04 22:12:09 +00:00
Raph Levien
a488c79605 am 2a32771a: am 24871f63: Merge "Fix Text appears on top of existing text when composing in gmail." into klp-dev
* commit '2a32771ace5250ec919a08da688e2d6c91e5c132':
  Fix Text appears on top of existing text when composing in gmail.
2013-10-04 15:10:13 -07:00
Chet Haase
1d3c4b396a Fix infinite recursion in hashcode of Spannables
An app created a SpannableStringBuilder, one of which's spans was the
instance of the string builder itself (that is, the builder contained a span
that was the builder). This caused infinite recursion in the hashcode()
method because it computes a hash from its fields, including all of its spans.

The fix detects the case where a span equals the current instance and
noops the computation on that span. A similar adjustment was made to equals()
to avoid the same recursion problem.

Issue #11051658 StackOverflowError in android.text.SpannableStringBuilder.hashCode

Change-Id: I742687ab32d81ac51c4b9135f698cf5e96a1d295
2013-10-04 07:24:19 -07:00
Raph Levien
63b3eb6523 Fix Text appears on top of existing text when composing in gmail.
Fix for bug 6473708. This patch changes from "last update wins" to
merging together the change regions, in the logic of deciding which
blocks need to be updated for painting, so that when there are multiple
changes batched for a draw, they're all taken into account.

Change-Id: I183d453c436125e5efec7031b4d61b43989653f9
2013-10-03 14:28:54 -07:00
Raph Levien
0325fc366a am 12618bf7: am 7c1b1087: Merge "Fix for "Can\'t place cursor after combining accent"" into klp-dev
* commit '12618bf7f58ec7a23c6e25db1eec41332727edf8':
  Fix for "Can't place cursor after combining accent"
2013-09-20 16:34:00 -07:00
Raph Levien
12618bf7f5 am 7c1b1087: Merge "Fix for "Can\'t place cursor after combining accent"" into klp-dev
* commit '7c1b10872f3d57b3afdb0f070fcf602e4d72df37':
  Fix for "Can't place cursor after combining accent"
2013-09-20 16:31:22 -07:00
Raph Levien
7c1b10872f Merge "Fix for "Can't place cursor after combining accent"" into klp-dev 2013-09-20 23:27:57 +00:00
Raph Levien
373b7a8d4e Fix for "Can't place cursor after combining accent"
This patch fixes behavior where attempting to place the cursor at
the end of a string where the last character is a combining accent
actually placed it before that accent. This was especially annoying
for editing Thai text, because it made it difficult to delete a
trailing tone mark.

Fixes bug 8947569 "Can't place cursor after combining accent" and bug
10398332 "[Thailand] Thai Language(IME) -- Can't delete Thai tone mark
while writing message"

Change-Id: Ida1933c8f0ab6cdb0200db39891e9389e4bdba86
2013-09-20 15:21:47 -07:00
Chet Haase
d0bcf4b76b am 6736d380: am bdb61865: Merge "Add equals() and hashcode() to SpannableString" into klp-dev
* commit '6736d380b7d318f3af84294ae38a881e2dc54528':
  Add equals() and hashcode() to SpannableString
2013-09-20 11:29:16 -07:00
Chet Haase
6736d380b7 am bdb61865: Merge "Add equals() and hashcode() to SpannableString" into klp-dev
* commit 'bdb6186580875982dd1a537b6c935922d0e62fe3':
  Add equals() and hashcode() to SpannableString
2013-09-20 11:24:49 -07:00
Chet Haase
9b985721da Add equals() and hashcode() to SpannableString
ActionBar uses a transition to animate text changes. This transition
depends on testing the equality of start/end text values in CharSequence
objects. Without equals(), SpannableString will return false for objects
whose references are different, but whose text is exactly the same.

This CL adds the equals() method, and the accompanying hashcode method,
to ensure that two Spanned implementations will always be equal
if their text and span data are equal.

Issue #10760075 Wrong unread count in actionbar

Change-Id: I5e77d40dd302eca035e8c56d40f3cd0aef8e6424
2013-09-19 17:18:55 -07:00
Raph Levien
0a675ae85a am 954f0d7b: am ba1abbba: Merge "Revert "Revert "Take the input device into account for meta state""" into klp-dev
* commit '954f0d7b775b67c3ceeb7d3f646479fbc420fbd7':
  Revert "Revert "Take the input device into account for meta state""
2013-09-18 14:26:45 -07:00
Raph Levien
954f0d7b77 am ba1abbba: Merge "Revert "Revert "Take the input device into account for meta state""" into klp-dev
* commit 'ba1abbba1f140f4be5956ade8ffd4ef4b3f9ffe0':
  Revert "Revert "Take the input device into account for meta state""
2013-09-18 13:42:41 -07:00