Commit Graph

289 Commits

Author SHA1 Message Date
Conley Owens
f395e3042a am 19653c64: am 425db473: Merge "CHAR_SEQUENCE_CREATOR cannot handle null string"
* commit '19653c6440eaf7328ecbc01c3ca6d7a910906484':
  CHAR_SEQUENCE_CREATOR cannot handle null string
2011-04-29 17:15:39 -07:00
Conley Owens
27e8f1a3a6 am 8b22ef66: am e41d2aed: Merge "Using robust equality check."
* commit '8b22ef66ef1a67333e2f1d4250d2c134b50ef91a':
  Using robust equality check.
2011-04-29 14:56:15 -07:00
Conley Owens
014757eea2 am a9517012: am 1e29552b: Merge "We don\'t need these local references."
* commit 'a95170122619f5442d5efbdf2e37f91dbf455ab9':
  We don't need these local references.
2011-04-29 14:56:05 -07:00
Conley Owens
49df110aeb am d66a92e6: am da882181: Merge "Eliminating dead code with no other effect than consuming battery life."
* commit 'd66a92e6875bfc835adf0b100607afbf4bfc2761':
  Eliminating dead code with no other effect than consuming battery life.
2011-04-29 14:55:55 -07:00
Conley Owens
425db473a0 Merge "CHAR_SEQUENCE_CREATOR cannot handle null string" 2011-04-29 10:00:20 -07:00
Conley Owens
e41d2aed9c Merge "Using robust equality check." 2011-04-28 14:57:08 -07:00
Conley Owens
1e29552bd5 Merge "We don't need these local references." 2011-04-28 14:56:59 -07:00
Conley Owens
da88218124 Merge "Eliminating dead code with no other effect than consuming battery life." 2011-04-28 14:56:55 -07:00
Martin Wallgren
cee2051ada CHAR_SEQUENCE_CREATOR cannot handle null string
TextUtils.writeToParcel can handle null as input CharSequence
but createFromParcel will throw NullPointerException. Transforming
to and from parcel should handle null in the same way.

Change-Id: I707ea9be2091d2655c5f63eaa57c5674befa5ad3
2011-04-07 14:45:43 +02:00
Brad Fitzpatrick
e511fb33d3 am 9b1b6439: am 2ed72048: Merge "Always return a valid index from Rfc822Tokenizer.findTokenEnd()"
* commit '9b1b64399502af0a08beac3014f2294644753602':
  Always return a valid index from Rfc822Tokenizer.findTokenEnd()
2011-04-04 15:25:33 -07:00
Mattias Niklewski
114f98a753 Always return a valid index from Rfc822Tokenizer.findTokenEnd()
If an invalid input string ends with a backslash inside a comment
or quoted string, the returned index would be past the end of the
string. In one case this would lead to a runtime exception being
thrown from MultiAutoCompleteTextView.performValidation.

Change-Id: If629372b429716c25cdc25764f088e95d4812d57
2011-04-04 14:52:35 +02:00
Jozef BABJAK
2fb503f510 Using robust equality check.
Change-Id: Ie30684c472bfa38d0432f855f7075c34709958d5
2011-03-17 09:54:51 +01:00
Jozef BABJAK
97124117e8 We don't need these local references.
Change-Id: I227c88eb4eb5d2842124e1c944cc18d5b28cccc1
2011-03-17 09:43:54 +01:00
Jozef BABJAK
b74378ab35 Eliminating dead code with no other effect than consuming battery life.
Change-Id: I4376902a4e9c301ff16f74137d86eeaff901bbb7
2011-03-17 09:15:43 +01:00
Brad Fitzpatrick
b37f7e59ee Merge changes I81fc2f90,I5e7fd759
* changes:
  Using proper key for removing from map.
  Removing wrong equals method in comparator.
2011-03-15 10:56:16 -07:00
Gilles Debunne
b0b225602c getTextRunCursor gets deprecated in SpannableStringBuilder
Change-Id: I2d408ebff90add7afc242bb01df9ab96c6fc7fa7
2011-03-04 11:19:40 -08:00
Gilles Debunne
616f3835a0 Removed documentation links
Broken build.

Should the Paint fields be made public or should the SpanStringBuilder
method be hidden ???

Change-Id: I8ecea19104357ea53ad53b23d02a707ec422161d
2011-03-02 19:50:20 -08:00
Gilles Debunne
5a39c95c00 Extra @Override removed in SpanStringBuilder
These were added in 99657 by using a misconfigured eclipse
save action that adds @Overirde to interfaces (Java 1.6 only).

Change-Id: I766bbde917b0bb063cb6d588ee276787e2f7db66
2011-03-02 18:06:13 -08:00
Gilles Debunne
f09d510cd1 Added documentation for SpannableStringBuilder.getTextRunCursor
Bug 3370244

Change-Id: I621a1599ff18da928044dd37a0d7cc861cc6f48f
2011-03-02 17:42:36 -08:00
Xavier Ducrohet
7719436342 am b732b7b5: am ce57a7f3: am 6504490c: am dff6b8e7: Merge "Add --non-constant-id to aapt."
* commit 'b732b7b5e8192501360edc15fb8c6399d11fb97d':
  GpsLocationProvider: Clean up HAL initialization/cleanup sequence
  Fixed GSM encoded network initiated position request
  Ensuring thread-safe usage of DateFormat.
  Fixing infinite loop for zero duration.
  Fix for an infinite loop while scrolling lists.
  WAPPushManager, WAP Push over SMS message handler
  Add --non-constant-id to aapt.
2011-02-28 10:15:48 -08:00
Xavier Ducrohet
b732b7b5e8 am ce57a7f3: am 6504490c: am dff6b8e7: Merge "Add --non-constant-id to aapt."
* commit 'ce57a7f35344e76689d30f45964d1e37b78280cb':
  GpsLocationProvider: Clean up HAL initialization/cleanup sequence
  Fixed GSM encoded network initiated position request
  Ensuring thread-safe usage of DateFormat.
  Fixing infinite loop for zero duration.
  Fix for an infinite loop while scrolling lists.
  WAPPushManager, WAP Push over SMS message handler
  Add --non-constant-id to aapt.
2011-02-28 10:10:38 -08:00
Jeff Brown
d17247164b Make SHIFT+Backspace be forward delete.
Bug: 3416383
Change-Id: I8f20a6793abd15741aff222edcfe33f7019b9095
2011-02-26 14:58:04 -08:00
Jeff Brown
8f34567c71 Add scroll wheel support to TextView.
Change-Id: I6e4258c50b0d754dccf07266ff4b2abcbccd733a
2011-02-26 13:35:35 -08:00
Jozef BABJAK
25d8b05fb7 Ensuring thread-safe usage of DateFormat.
DateFormat is inherently unsafe for multithreaded use. This patch adds
proper synchronization. The 'sLock' is re-used. To avoid two consecutive
lockings, locked version of initFormatStrings() method is created and
used where appropriate, i.e. in original method AND in added synchronized
block.

Change-Id: Id3c34613623e743e703aadb2342aa788679dda8a
2011-02-22 09:17:51 +01:00
Jozef BABJAK
b62353ad1d Removing wrong equals method in comparator.
This implementation of equals method has been likely created by
template in an IDE. It is useless, possibly leading to poor performance
and completely violating the contract of equals method as defined in
Object base class.

Change-Id: I5e7fd759b7bd9370b44d9374b57390c4e9feba02
2011-02-21 15:19:00 +01:00
Gilles Debunne
f3fa0cdbae Bugfixes in StaticLayout.
Bug 3422121

With ellipsize, lines starting with a very long word that does not
fit inside the width were simply ignored. Cut the long word instead.

start - widthStart index offset shift in BiDi.

The original ellipsize-end patch that added '...' after the last
word on end-ellipsized lines has been punted in favor of a true
ellipsize support in I.

I believe the StaticLayout calculateEllipsise is a no-op since textwidth <= avail
by construction: fitWidth and okwidth are < outerWidth. The only exception is the
paraEnd != here case in generate (when not a single character fits in width).
This case is exercised by StaticLayoutTest in cts (width of 8 pixels) and revealed
an offset error in widstart.

All in all, it looks like this code was probably never really tested. I tried some
typical text configuration to make sure these changes improved the situation.

Change-Id: Ibee410bd7db453abf93e10e8beb844eae998922c
2011-02-18 16:05:15 -08:00
Fabrice Di Meglio
8761bfaa8d Merge "Code cleaning" 2011-02-16 10:48:12 -08:00
Fabrice Di Meglio
121c82c813 Code cleaning
- remove unused local variables
- add char constants
- some variables renaming to be more understandable

Change-Id: Id54dd671b1449cca6463bf77160dc72c8bf0c805
2011-02-15 17:41:10 -08:00
Fabrice Di Meglio
2fa160840c Merge "Small optimization when getting the spans" 2011-02-15 15:28:50 -08:00
Fabrice Di Meglio
a2a035ef47 Small optimization when getting the spans
- loop earlier if the kind is not the one we want

Change-Id: I5b020f20a144678ad2f7a4bca8fef64eb6ae491f
2011-02-15 14:31:26 -08:00
Gilles Debunne
f75c97e023 Text insertion cursor is now defined by a Drawable.
Bug 3261766

If defined, the drawable is used instead of directly drawing a 1 pixel
line. This makes the cursor more fancy and more visible.

The drawable is currently clipped by the TextView's limits, which is
currently visible on the left when the cursor is at the first position.
To solve this issue properly, we would need to propagate a do-not-clip
up in the hierarchy.

Change-Id: I99f6001048eed14104994acf6bab942dda8eb38e
2011-02-14 18:29:39 -08:00
Paul Eastham
19e70cbbcb am 9a5bda87: am be46d145: Revert "Fix for StaticLayout bug with ellipsized text"
* commit '9a5bda875f86b188b501ce7cf73810dd92288251':
  Revert "Fix for StaticLayout bug with ellipsized text"
2011-02-07 13:50:42 -08:00
Kenny Root
7679365b54 am 6465889e: am c4dfa998: am d2a99617: am c94a9998: Merge "JPtextinput: Dont break emoji characters when cutting strings."
* commit '6465889ecbf4c04bb4bb6f4e8d4306727f7ca837':
  JPtextinput: Dont break emoji characters when cutting strings.
2011-02-07 13:49:08 -08:00
Gilles Debunne
de1285e7ea am 63308bd0: am a324a581: Merge "Fix for StaticLayout bug with ellipsized text" into honeycomb
* commit '63308bd092a0edcea685d9f81b3d6d6d345c663b':
  Fix for StaticLayout bug with ellipsized text
2011-02-07 13:46:21 -08:00
Paul Eastham
9a5bda875f am be46d145: Revert "Fix for StaticLayout bug with ellipsized text"
* commit 'be46d1456beb7e2f3e8b82bda2d0a5023db3debd':
  Revert "Fix for StaticLayout bug with ellipsized text"
2011-02-04 19:23:10 -08:00
Paul Eastham
be46d1456b Revert "Fix for StaticLayout bug with ellipsized text"
This reverts commit bbc910f229.
2011-02-04 19:17:54 -08:00
Kenny Root
6465889ecb am c4dfa998: am d2a99617: am c94a9998: Merge "JPtextinput: Dont break emoji characters when cutting strings."
* commit 'c4dfa998b7660b9afc4d41b0c940d798f2122fc3':
  JPtextinput: Dont break emoji characters when cutting strings.
2011-02-04 16:16:19 -08:00
Gilles Debunne
bbc910f229 Fix for StaticLayout bug with ellipsized text
This fixes the test, but I believe this class still needs a lot of fixing.

Change-Id: Ib6386196908ea8432b175d6994f9299778a322d2
2011-02-03 17:42:18 -08:00
Mike Cleron
fbcba51ab2 am b118bd1c: am ad97c1b1: Merge "Remove MeasuredText debug messages" into honeycomb
* commit 'b118bd1c2bb665eec1a78a6cf5c76a0aa6eba6af':
  Remove MeasuredText debug messages
2011-02-01 13:25:40 -08:00
Gilles Debunne
15f16e3f86 am 65383292: am 8f8aac5e: Merge "Pixel were missing on the last line of text when using MaxLines." into honeycomb
* commit '6538329258ee01b27586d8b0e46e96160d719a68':
  Pixel were missing on the last line of text when using MaxLines.
2011-02-01 10:09:29 -08:00
Mike Cleron
ad97c1b128 Merge "Remove MeasuredText debug messages" into honeycomb 2011-01-31 23:22:36 -08:00
Kenny Root
fbc8630736 Remove MeasuredText debug messages
MeasuredText debug messages were left in the tree. Remove them before
shipping.

Bug: 3408963
Change-Id: Ia220eae5835d1325bb6053de0025d8016a1edcad
2011-01-31 13:54:58 -08:00
Gilles Debunne
0a4db3c527 Pixel were missing on the last line of text when using MaxLines.
Bug 3295544

Only the last line of text includes the bottomPadding (extra line
spacing below the characters' descent. When The text is clipped using
maxLines, the desired height correctly added this value, but getLineTop
and getLineDescent are also used when the layout is drawn.

The fix is to make the layout aware of its clipping so that these
values are correctly updated.

Change-Id: I703656cf45022d34a90f55f0ed8fc5e4b30f80b1
2011-01-30 18:23:13 -08:00
Brian Muramatsu
4f92dd2a4d am 910be3e8: am 9eaefb82: Merge "Fix TextUtils#commaEllipsize" into honeycomb
* commit '910be3e855738eab783f2e280b76dcef90a841ec':
  Fix TextUtils#commaEllipsize
2011-01-28 14:55:31 -08:00
Brian Muramatsu
4c8ad6eb62 Fix TextUtils#commaEllipsize
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
2011-01-27 18:13:39 -08:00
Gilles Debunne
277ae7e3dc am 7a417821: am 47fc854a: Merge "Fix for a call to startActivity from outside of an app." into honeycomb
* commit '7a417821957bac70bfd4cb4a357b143a1a1570e3':
  Fix for a call to startActivity from outside of an app.
2011-01-25 16:18:51 -08:00
Gilles Debunne
47fc854ae9 Merge "Fix for a call to startActivity from outside of an app." into honeycomb 2011-01-25 14:20:09 -08:00
Gilles Debunne
d9ed795ca5 Fix for a call to startActivity from outside of an app.
Bug 3246715

Regression introduced by https://android-git.corp.google.com/g/#change,86174

Change-Id: Icba170746d196386bd9b0309582f724cb076d937
2011-01-25 13:40:06 -08:00
Gilles Debunne
3971b8cd52 am 2b5a62af: am 2a32a39e: Merge "Removed warnings in DynamicLayout" into honeycomb
* commit '2b5a62afdef5efc47e223057de0c867ffafef22d':
  Removed warnings in DynamicLayout
2011-01-25 11:38:33 -08:00
Gilles Debunne
2a32a39e9a Merge "Removed warnings in DynamicLayout" into honeycomb 2011-01-25 11:34:19 -08:00