Commit Graph

2337 Commits

Author SHA1 Message Date
Gilles Debunne
93fdebb5ff Merge "No threading issues in SpellChecker." 2011-10-31 17:25:08 -07:00
Michael Jurka
69cde42890 am b4529b0a: Merge "HorizontalScrollView should delay child presses" into ics-mr1
* commit 'b4529b0adca243644f601c9fe5d419c283bf57c1':
  HorizontalScrollView should delay child presses
2011-10-31 22:13:16 +00:00
Gilles Debunne
e9b82808d4 No threading issues in SpellChecker.
SpellChecker is exclusively called from the main UI thread and
there are no concurrency issues. As a result, the TextView's
wordIterator can safely be re-used in the parse() method.

Also reset the pool of SpellParsers on language change.

Change-Id: I1cc8a2750f21233754f006e40a81622730030ec8
2011-10-31 11:38:40 -07:00
Joe Fernandez
eba186448f am 74b2b954: am 09848bc8: Merge "docs: add developer guide cross references, Project ACRE, round 3" into ics-mr0
* commit '74b2b9547329a0b05e0bd5701057696007b854bb':
  docs: add developer guide cross references, Project ACRE, round 3
2011-10-31 12:26:31 +00:00
Michael Jurka
b4529b0adc Merge "HorizontalScrollView should delay child presses" into ics-mr1 2011-10-30 19:41:24 -07:00
Joe Fernandez
74b2b95473 am 09848bc8: Merge "docs: add developer guide cross references, Project ACRE, round 3" into ics-mr0
* commit '09848bc89de999416e2de82a7693b2deec6bf802':
  docs: add developer guide cross references, Project ACRE, round 3
2011-10-29 02:16:10 +00:00
Michael Jurka
9edd58e950 HorizontalScrollView should delay child presses
In Recents in landscape, we were seeing blue flashes when scrolling; generally, almost every scrolling container should be delaying child presses to prevent this problem
2011-10-28 16:40:07 -07:00
Joe Fernandez
09848bc89d Merge "docs: add developer guide cross references, Project ACRE, round 3" into ics-mr0 2011-10-28 15:40:11 -07:00
Gilles Debunne
4e13ebed6b Merge changes I2082e3d0,Ibf8e9827
* changes:
  Scroll performance improved in multiline TextEdit
  Performance improvements for long text edition.
2011-10-28 15:26:07 -07:00
Mark Wagner
73563ca81b Merge "bugfix 5513340 Insertion pointer (vertical beam) behaves oddly in Talk's message composition field" 2011-10-28 15:16:37 -07:00
Mark Wagner
f818511dda bugfix 5513340 Insertion pointer (vertical beam) behaves oddly in Talk's message composition field
Seems like we should be calling makeBlink from setEnabled

Change-Id: I5b0433ba438a693f53d29e8ff7d4d853acc96bba
2011-10-28 14:50:36 -07:00
Joe Fernandez
61fd1e8d8c docs: add developer guide cross references, Project ACRE, round 3
Change-Id: I6125315ecdf0f78dd947c514a9944729d723e95d
2011-10-28 14:23:23 -07:00
Gilles Debunne
a068e2f1d9 am 4eec98ed: Merge "Text handles do not handle scroll correctly" into ics-mr0
* commit '4eec98edee3d6eb516e30a7151da13fd726f93a9':
  Text handles do not handle scroll correctly
2011-10-28 20:44:17 +00:00
Gilles Debunne
93347c24a7 Text handles do not handle scroll correctly
A recent patch taking scroll into account was applied at the wrong
level. isVisible() expects positions that already take scroll into
account. isOffsetVisible() is where the initial bug was.

Cherry pick of 144415 from master.

Change-Id: I06ceebfb3d7b24aa4adba886c24fcf9d8dd39d2e
2011-10-28 11:08:56 -07:00
Gilles Debunne
28f81dede5 Revert "Potential thread concurrency issue with WordIterators."
This reverts commit d224c88c48.

Based on Dianne's comments, this small optimization seems uncessarily
risky. I'll submit a new change where each SpellParser has its own
WordIterator to make this thread-safe.

Change-Id: Ic09fa656b00d284536e58f4cc7d26d5e26c3f3cf
2011-10-27 15:02:00 -07:00
Gilles Debunne
e9c98bdf99 Merge "Potential thread concurrency issue with WordIterators." 2011-10-27 14:04:03 -07:00
Gilles Debunne
f2a02018e2 Scroll performance improved in multiline TextEdit
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.

Change-Id: I2082e3d0eedace1a86122a03e4b21f90f3bc8522
2011-10-27 14:00:56 -07:00
Gilles Debunne
35199f5ce7 Performance improvements for long text edition.
Limit each parse to batches of a few words, to keep the UI thread
responsive.

Possible optimizations for the future:
- SpellCheck in a thread, but that requires some locking mecanism
- Only spell check what is visible on screen. Will require additional
  spans to tag the pieces of text.

Change-Id: Ibf8e98274bda84b7176aac181ff267fc1f1fa4cb
2011-10-26 16:45:40 -07:00
Svetoslav Ganov
872d11cbc4 am 8c807076: Merge "NumberPicker does not not fit on Crespo in landscape." into ics-mr1
* commit '8c8070763971b72aa012e23585fe844b4b956282':
  NumberPicker does not not fit on Crespo in landscape.
2011-10-26 22:35:22 +00:00
Svetoslav Ganov
e0c8ab5aaa NumberPicker does not not fit on Crespo in landscape.
1. Now the NumberPicker has a max height and width for which is looks
   good but can still shrink if there is not enough available space.

bug:5512787

Change-Id: Ieea88cafa8408e1d4160bab4bfe2b771bd79f7f8
2011-10-26 14:06:26 -07:00
Philip Milne
fec2aa51d6 Merge " Update to fix for bug 5393156" 2011-10-26 10:18:30 -07:00
Gilles Debunne
dc37203c95 Merge "Text handles do not handle scroll correctly" 2011-10-25 15:54:51 -07:00
Philip Milne
ecab117864 Update to fix for bug 5393156
Tweak to the logic to take account of margins when gravity = FILL is used and
    there is a measurement dependency between the axes (as in mulit-line text).

Change-Id: I91b9143c2d5db41cb67dd641d5c7ea0b56cae7ff
2011-10-25 15:07:19 -07:00
Adam Cohen
bd12e41ba5 am e3bb0ecb: Merge "Removing fades on last item in StackView for major FPS improvement on Prime" into ics-mr0
* commit 'e3bb0ecb2b36964cb3b02bc0d575e9366818ee00':
  Removing fades on last item in StackView for major FPS improvement on Prime
2011-10-21 14:38:41 -07:00
Gilles Debunne
fec22c6be6 Text handles do not handle scroll correctly
A recent patch taking scroll into account was applied at the wrong
level. isVisible() expects positions that already take scroll into
account. isOffsetVisible() is where the initial bug was.

Change-Id: If2a5349555ec9e86e4295e819d5d9086f0adcdbd
2011-10-21 13:48:20 -07:00
Adam Cohen
c798b6688a Removing fades on last item in StackView for major FPS improvement on Prime
Change-Id: I479eb129e80a6087ab55d1de7eed0222d6dacdf6
2011-10-21 12:44:13 -07:00
Gilles Debunne
d224c88c48 Potential thread concurrency issue with WordIterators.
parse() is called from the UI thread when text is changed, and in
that case it is safe to re-use the TextView's WordIterator.

It can also be called from the SpellCheckSession thread though
onGetSuggestions: use a local WordIterator in that case.

Change-Id: I596bff15cc8f997b9dc49598724450ac5c582101
2011-10-20 16:57:11 -07:00
Gilles Debunne
592ddaa34f Bug 5428541: Check that span is still in text before deleting
This is a cherry-pick in MR0 of CL 141388 from master.

Bug 5488537

In case the span has been removed from the text since the popup
was showed, the delete action is a no-op.

Change-Id: Iec2aeaf03becd82ad44715d5c08bfaa8f62aa3fe
2011-10-20 16:03:04 -07:00
Gilles Debunne
c5d6fe0152 Merge "Renaming of a hidden API: ShowSoftInputOnFocus" 2011-10-20 15:35:34 -07:00
Svetoslav Ganov
c8c2e17ecd Merge "Add content description setter to RemoteViews" 2011-10-20 14:29:18 -07:00
Svetoslav Ganov
c397df7754 am 5dc30a77: Merge "DatePicker crashes when going from 2036 to 2035 via ▼" into ics-mr0
* commit '5dc30a770ab1b4f07ff10502f9de9ec39daac41d':
  DatePicker crashes when going from 2036 to 2035 via ▼
2011-10-19 21:17:14 -07:00
Svetoslav Ganov
5dc30a770a Merge "DatePicker crashes when going from 2036 to 2035 via ▼" into ics-mr0 2011-10-19 21:15:30 -07:00
Svetoslav Ganov
6304b0d58e DatePicker crashes when going from 2036 to 2035 via ▼
1. Some obsolte logic was placing invalid index in the array of
   scroll wheel items which was resulting in failure to look its
   string representation from the cache causing a NPE.

2. While editing the current value via the IME the middle item
   of the scroll wheel was partially visible i.e. the user was
   able to see a dimmed version of the old value intermixed with
   the new one.

3. The logic for hiding the IME while poking a button i.e. starting
   to use another way of changing the current value, was incorrect.

bug:5480205

Change-Id: I1c2c96402bd38bac1dec64ccc6b550410332b9d7
2011-10-19 20:43:35 -07:00
Svetoslav Ganov
4a41cb3147 am 018cb119: Merge "AdapterView does not check for null adapter when initializing accessibility event." into ics-mr0
* commit '018cb119bca7a3a08dd59843e1fec9a3027a8133':
  AdapterView does not check for null adapter when initializing accessibility event.
2011-10-19 15:53:28 -07:00
Svetoslav Ganov
0e6fa8b60d AdapterView does not check for null adapter when initializing accessibility event.
The code that initializes accessibility events was assuming the AdapterView
always has an adapter and this caused NPE. Now the right method of the view
is called to get the item count.

bug:5474162

Change-Id: I6c330dc2894477df9447a4ecfddc7bd62c575d59
2011-10-19 12:38:08 -07:00
Gilles Debunne
0f4109e4ef Renaming of a hidden API: ShowSoftInputOnFocus
Change-Id: Ib0384815f5ed677547a42d456ee190d5ac2ef7bd
2011-10-19 11:26:21 -07:00
Svetoslav Ganov
e261e283ea Add content description setter to RemoteViews
bug:5480389

Change-Id: I66616f379a244ba7f3552d766f3aaa77f207550a
2011-10-18 18:01:47 -07:00
Chet Haase
5b2dfbde53 am 1aad3b5e: Merge "Issue 5432115: Speed up notification scrolling" into ics-mr0
* commit '1aad3b5e336a04ed612c091d8002569f959e1722':
  Issue 5432115: Speed up notification scrolling
2011-10-17 11:32:45 -07:00
Chet Haase
ba1fe8e3cf Issue 5432115: Speed up notification scrolling
The NotificationPanel was using views that had non-1 alpha
values set on them (permanently). This is costly in the GL
implementation and caused more rendering overhead, and worse
performance, than simple opaque views would.

The fix is to set the text color and ImageView drawable alpha
directly, without setting the View alpha property.

Change-Id: I381e0bd45bf45784b8e364a27a339e6583189a43
2011-10-17 08:54:53 -07:00
satok
69db986cf0 am e6fee18d: Merge "Invalidate SuggestionSpan with FLAG_AUTO_CORRECTION when it\'s removed." into ics-mr0
* commit 'e6fee18d16a86c266afef48f7705268435a99111':
  Invalidate SuggestionSpan with FLAG_AUTO_CORRECTION when it's removed.
2011-10-14 11:16:57 -07:00
satok
e6fee18d16 Merge "Invalidate SuggestionSpan with FLAG_AUTO_CORRECTION when it's removed." into ics-mr0 2011-10-14 11:15:05 -07:00
Gilles Debunne
ae245d59b3 Merge "Bug 5420741: exception when rotating device while suggestion popup is visible" 2011-10-14 11:09:59 -07:00
Gilles Debunne
b9e78d96b7 Merge "Spell checher's language synced with keyboard." 2011-10-14 11:09:44 -07:00
Joe Fernandez
5a401ddbc8 am 471fa9d1: Merge "docs: add developer guide cross-references, Project ACRE, Round 2" into ics-mr0
* commit '471fa9d10b4fa4da070c0ffb5fa5ea1354c8e6b8':
  docs: add developer guide cross-references, Project ACRE, Round 2
2011-10-14 10:54:29 -07:00
Joe Fernandez
471fa9d10b Merge "docs: add developer guide cross-references, Project ACRE, Round 2" into ics-mr0 2011-10-14 10:52:33 -07:00
Joe Fernandez
558459fe85 docs: add developer guide cross-references, Project ACRE, Round 2
Change-Id: I39a534ae3a2a34b4dabc333a09961012ef911d3e
2011-10-14 10:18:33 -07:00
satok
75e126f2df Invalidate SuggestionSpan with FLAG_AUTO_CORRECTION when it's removed.
Bug: 5460262

Change-Id: I4ca71020a6d4b7057f60ca99944c479775cca8b7
2011-10-15 01:24:44 +09:00
Gilles Debunne
19f4b66ddc Merge "Bug 5228934: added a flag to disable the display of the soft input on focus" 2011-10-13 16:54:23 -07:00
Gilles Debunne
9d8d3f1539 Spell checher's language synced with keyboard.
Bug 5379440. The spell check is now using the IME's language to
do the spell checking. Changing the input language triggers a
new spell check of the entire text.

Optimizations: ArrowKeyMovementMethod re-uses the TextView's
wordIterator, already set to the correct language.

One wordIterator shared by all SpellParsers in SpellChecker.
Cannot re-use TextView's because of concurrency issues.

With the current implementation, one has to type a new character
to see the new spell checking take place.

Change-Id: I0e460c0a6777548f89d03d6b68f3deea6606c17f
2011-10-13 16:52:42 -07:00
Gilles Debunne
cbdd245793 Merge "Bug 5428541: Check that span is still in text before deleting" 2011-10-13 14:23:37 -07:00