Commit graph

32548 commits

Author SHA1 Message Date
Jean Chalard
a2928484f6 Add new attributes to our notification
Bug: 17167221
Bug: 17128331
Change-Id: I6a045fd2398f40dbdc10c9d20993f7513e1f2cff
2014-08-28 07:47:07 +00:00
Yohei Yukawa
acce1aa59e Make sure to obtain the IC before requesting CursorAnchorInfo
RichInputConnection#requestUpdateCursorAnchorInfo must make
sure to obtain the input connection before calling methods
of it.

BUG: 17299587
Change-Id: I8e0cd473a4cc32583cd47634c227d702f7c69c6c
2014-08-27 15:59:52 -07:00
Tadashi G. Takaoka
37beaf1529 Simplify onComputeInsets of LatinIME
This CL expands SoftInputWindow to the entire screen. Thus a key
review backing view is eliminated and onComputeInsets() gets
simplified too.

Bug: 17212702
Bug: 10841052
Bug: 10541453
Change-Id: I2d859f4e4698c64cabe399000821f13bab729996
2014-08-27 19:20:38 +09:00
Yohei Yukawa
97681ebdf1 Set highlight color along with the commit indicator
With this CL, the text highlight color is applied
when the commit indicator is displayed.

Note that the underline is not rendered when the
background color is enabled. This is a known issue.

Change-Id: Ia19355e1303e3a10e8a7d69bc47c779feb70248a
2014-08-27 01:41:16 -07:00
Yohei Yukawa
29200b0abe Set the text bgcolor only when CursorAnchorInfo is available
When CursorAnchorInfo is unavailable, we shouldn't try to show
the commit indicator and set the text highlight color.

With this CL, RichInputConnection can be used to track if the
application responded that it does support CursorAnchorInfo or
not.  This result will be taken into consideration when
InputLogic needs to determine whether the commit indicator
should be displayed or not.

Change-Id: I945d70eeb02a7a5f3d9b22459b23d7028508910f
2014-08-27 01:30:45 -07:00
Yohei Yukawa
a475c85480 Introduce a mechanism to hide the indicator speculatively
This is an optional optimization to reduce the UI latency.

Imagine that the commit indicator is now displayed and the
composing text is being updated, it is highly likely that
the commit indicator will disappear unless the application
rejects the setComposingText request.

If we assume that the application will accept the new
composing text without any modifications, we can hide the
indicator without waiting for the arrival of new
CursorAnchorInfo event.

This optimization isn't dangerous because we can show the
indicator again when we receive new CursorAnchorInfo event
and the assumption is turned out to be invalid.

Change-Id: Id59c6607a1029782410611e768791af9984f14ac
2014-08-26 23:42:53 -07:00
Yohei Yukawa
bea17c49ec Introduce commit/add-to-dictionary indicators
This CL introduces commit/add-to-dictionary indicators.

Note that the text is not yet highlighted when the commit
indicator is displayed. It will be addressed in subsequent
CLs.

Change-Id: I7e9b0fcfdc0776a50a1d8cfb41ee0add813317dd
2014-08-26 21:20:27 -07:00
Jean Chalard
8380f921f7 Fix a bug where the top prediction would disappear.
This is because prediction can't be easily distinguished in
style. This fixes the bug by simulating the right members,
but some refactoring should be done to remove useless
booleans.

Bug: 17271923
Change-Id: Ib88f3fb95678021624e59535492926dd315d26fb
2014-08-26 20:35:59 +09:00
Yohei Yukawa
fdfe73ff1f Merge "Use more descriptive names for some internal fields" into lmp-dev 2014-08-25 09:50:59 +00:00
Yohei Yukawa
a61b7245b0 Use more descriptive names for some internal fields
This CL clarifies that delay parameters are specified with
milliseconds.

Change-Id: I401a60b8c09c2a04201af5b74babcdb091c07f4a
2014-08-25 02:28:01 -07:00
Tadashi G. Takaoka
c500700fae am 19dd34a0: Show view even when IME is explicitly shown with physical keyboard
* commit '19dd34a02320b7a368c4ad65398248ceca41b69e':
  Show view even when IME is explicitly shown with physical keyboard
2014-08-25 09:26:15 +00:00
Tadashi G. Takaoka
19dd34a023 Show view even when IME is explicitly shown with physical keyboard
Bug: 17242477
Bug: 13988700
Change-Id: I519c0481760a9aa93a5d9bee68e0f6a3a8fc4d9d
2014-08-25 16:28:44 +09:00
Tadashi G. Takaoka
4a782da382 am f145fff0: Merge "Fix NPE when pressing ALT key" into lmp-dev
* commit 'f145fff0855cedb83551021c7682e05e1783f5b2':
  Fix NPE when pressing ALT key
2014-08-25 07:11:12 +00:00
Tadashi G. Takaoka
f145fff085 Merge "Fix NPE when pressing ALT key" into lmp-dev 2014-08-25 06:52:36 +00:00
Tadashi G. Takaoka
ad1f880811 Fix NPE when pressing ALT key
Bug: 17203708
Change-Id: I4f203603496e9401dacba4db21372e3353916418
2014-08-25 15:08:27 +09:00
Yohei Yukawa
2d508203c6 am 8681287c: Fix build due to an illegal character
* commit '8681287cd65f9d96187aab0703121881c8eba6c6':
  Fix build due to an illegal character
2014-08-25 04:41:35 +00:00
Yohei Yukawa
0271608315 am 5eebaddc: Merge "Dismiss "Add to dictionary" hint with non-special char event" into lmp-dev
* commit '5eebaddccbdbd59669d658245eea6e8aca560fc6':
  Dismiss "Add to dictionary" hint with non-special char event
2014-08-25 04:25:01 +00:00
Yohei Yukawa
b65a1e46ce am 2c4cce8d: Merge "Introduce #shouldShowAddToDictionaryHint" into lmp-dev
* commit '2c4cce8d6c92dc4492e4376a2b3973d76a016fdd':
  Introduce #shouldShowAddToDictionaryHint
2014-08-25 04:25:00 +00:00
Yohei Yukawa
8681287cd6 Fix build due to an illegal character
Change-Id: I597ab26db70387b80ddcd7d51de6ae751380030d
2014-08-24 21:14:41 -07:00
Yohei Yukawa
5eebaddccb Merge "Dismiss "Add to dictionary" hint with non-special char event" into lmp-dev 2014-08-25 04:08:56 +00:00
Yohei Yukawa
2c4cce8d6c Merge "Introduce #shouldShowAddToDictionaryHint" into lmp-dev 2014-08-25 04:05:56 +00:00
Tadashi G. Takaoka
129af92713 am 5e7a6fe0: Merge "Fix the bottom row of tablet keyboard layout" into lmp-dev
* commit '5e7a6fe09824a5d1ba875bc5aaed183cb1a0bc27':
  Fix the bottom row of tablet keyboard layout
2014-08-25 04:02:07 +00:00
Yohei Yukawa
ebc1509039 Introduce #shouldShowAddToDictionaryHint
This is a groundwork for subsequent CLs where we need to
call this method from multiple places. This CL does not
change any existing behaviors.

Change-Id: Id8fa0360305d7383571edffab6752b2240367cf9
2014-08-24 20:59:30 -07:00
Yohei Yukawa
e0d0080308 am 4a71d2c4: Allow to add/remove background color to/from the committed text
* commit '4a71d2c48021351e10bd61d5ee007533651da627':
  Allow to add/remove background color to/from the committed text
2014-08-25 03:53:28 +00:00
Tadashi G. Takaoka
5e7a6fe098 Merge "Fix the bottom row of tablet keyboard layout" into lmp-dev 2014-08-25 03:45:35 +00:00
Tadashi G. Takaoka
c9aa1beb6d Fix the bottom row of tablet keyboard layout
This CL eliminates "_" and "/" keys from the bottom row of tablet
keyboard.  This CL also reorganizes the bottom row of tablet Dvorak
keyboard.

Bug: 16603887
Change-Id: Ic1570836dea1a475bed5d43aeb6a351507bf5428
2014-08-25 12:34:58 +09:00
Yohei Yukawa
034c326078 Dismiss "Add to dictionary" hint with non-special char event
This CL slightly extends the condition when "Add to dictionary"
hint is dismissed.

With this CL, "Add to dictionary hint" will be dismissed by any
non-special char event. This is more comfortable especially if
we start using more intrusive UIs such as indicator and/or
background color with the text hint in the suggestion strip.

Change-Id: I2ea0fa40d9c6663ebf5d5439be3eca2a2cbd5166
2014-08-24 20:32:22 -07:00
Yohei Yukawa
4a71d2c480 Allow to add/remove background color to/from the committed text
This is a groundwork for subsequent CLs where we need to
add/remove background color to/from the commited text.

In this CL, we use Spanned#SPAN_COMPOSING so that we can easily
remove such a background color by calling
InputConnection#finishComposingText. To make this operation easy
and realiable, we need to track whether we have specified the
background color to the commited text or not at one place. Here
we use RichInputConnection for this purpose.

Change-Id: I5f9bc4425c5d1b80a719a20e5baf336729ec08d2
2014-08-24 20:28:24 -07:00
Yohei Yukawa
7d146cdbe8 am cd6ef9a8: Indroduce SuggestedWords#getTypedWordInfoOrNull
* commit 'cd6ef9a8b117b82623251510fac72ee108ec1a2a':
  Indroduce SuggestedWords#getTypedWordInfoOrNull
2014-08-24 23:52:49 +00:00
Yohei Yukawa
cd6ef9a8b1 Indroduce SuggestedWords#getTypedWordInfoOrNull
This is a groundwork for subsequent CLs whith need to
do certain things for and only for the typed word.

Change-Id: I374b79cbc79470f57f523c996010301ea5701a61
2014-08-24 16:32:17 -07:00
Tadashi G. Takaoka
cc4d21df7b am 2637be27: Support Accept typed word UI
* commit '2637be27c51be03e39b0db1c66312c4cc55bc7de':
  Support Accept typed word UI
2014-08-22 14:17:23 +00:00
Tadashi G. Takaoka
2637be27c5 Support Accept typed word UI
Change-Id: I58e95b2791a45afdc7dae8e26dcfc200b3b4b854
2014-08-22 21:25:35 +09:00
Yohei Yukawa
96db9222c2 am cabb66e9: follow-up to API change in I4a577bfd02b37b
* commit 'cabb66e9bc2d5c13d83ccae6ce2d2e673b6ebf0e':
  follow-up to API change in I4a577bfd02b37b
2014-08-22 09:17:34 +00:00
Yohei Yukawa
cabb66e9bc follow-up to API change in I4a577bfd02b37b
BUG: 17182367
BUG: 17185263
Change-Id: Id54ca29c191b9752fa82ffe5a960113b2e97e5c1
2014-08-21 21:39:15 -07:00
Yohei Yukawa
8cbc37f2c8 am 8e2fcaa3: Merge "Use FrameLayout for the backing view" into lmp-dev
* commit '8e2fcaa33411e7cf12bc66ff8171e5466b804950':
  Use FrameLayout for the backing view
2014-08-21 18:29:41 +00:00
Yohei Yukawa
8e2fcaa334 Merge "Use FrameLayout for the backing view" into lmp-dev 2014-08-21 18:06:07 +00:00
Yohei Yukawa
2834ddf1a0 am b9768702: Merge "Use #onStartInputInternal to initialize cursor rect retrieval" into lmp-dev
* commit 'b9768702faf2bd36ddff4b4c59daa90db0a92d50':
  Use #onStartInputInternal to initialize cursor rect retrieval
2014-08-20 15:42:26 +00:00
Ken Wakasa
4396f662f6 am c37205f5: Merge "DO NOT MERGE: Abolish source code overlay and introduce overridable src dir" into lmp-dev
* commit 'c37205f5ab68b151ef26975df6485dcfd2dfcd52':
  DO NOT MERGE: Abolish source code overlay and introduce overridable src dir
2014-08-20 10:31:40 +00:00
Yohei Yukawa
17aeaa7578 am fa39ffcf: Support more methods in the wrapper of CursorAnchorInfo
* commit 'fa39ffcf8461ad6e53a86d8957ab892a3e367d16':
  Support more methods in the wrapper of CursorAnchorInfo
2014-08-20 04:51:21 +00:00
Yohei Yukawa
b9768702fa Merge "Use #onStartInputInternal to initialize cursor rect retrieval" into lmp-dev 2014-08-20 01:43:56 +00:00
Yohei Yukawa
9f4f6681a9 Use #onStartInputInternal to initialize cursor rect retrieval
This CL simply moves the method calls of #requestCursorAnchorInfo
into #onStartInputInternal just to consolidate the logic.

Change-Id: Ia205738b9614e9ae375c1dab767a91d2e1f6d0d3
2014-08-21 00:21:57 +09:00
Yohei Yukawa
fa39ffcf84 Support more methods in the wrapper of CursorAnchorInfo
This CL add more compatibility wrapper methods for
CursorAnchorInfo.

This CL also adds more utility functions and types into
CompatUtils to reduce explict cast operations.

Change-Id: Id50165b552bbf28b832a6da13bf06eedcd2a190e
2014-08-20 09:27:22 +09:00
Yohei Yukawa
907825548b Use FrameLayout for the backing view
If we render our UI around the composing text in the fullscreen
mode, probably we need to have our views under
android.R.id.extractArea, which is implemented as FrameLayout.
Therefore, using FrameLayout for the backing view makes it easy
to simplify the code between normal mode and full screen mode.

Change-Id: I69533b22d9d1368ad906dc5ef7be1a1b674d10b8
2014-08-19 14:04:35 +09:00
Jean Chalard
db818ecd84 am 23f41049: Add the source for the Romanian dictionary
* commit '23f41049d69b17402d91506ef1283d7eb48ba430':
  Add the source for the Romanian dictionary
2014-08-18 04:15:42 +00:00
Jean Chalard
23f41049d6 Add the source for the Romanian dictionary
This is only informational data - it has no functional
impact at all.

Bug: 7645206
Change-Id: I01f0c2b4fba17a37079531c9a5246c796c836d18
2014-08-18 12:49:56 +09:00
Yohei Yukawa
4617bf563f am b7a227b9: Merge "Use RelativeLayout for the backing view" into lmp-dev
* commit 'b7a227b93ba9a0787e70157b4302b6abd15d018a':
  Use RelativeLayout for the backing view
2014-08-16 14:07:15 +00:00
Yohei Yukawa
18ac3c8afd am 16a43d2b: Let the backing view cover the entire content area
* commit '16a43d2bd9c5d80f8e50f5a7682b657ee10621e1':
  Let the backing view cover the entire content area
2014-08-16 13:57:05 +00:00
Yohei Yukawa
b7a227b93b Merge "Use RelativeLayout for the backing view" into lmp-dev 2014-08-16 04:32:18 +00:00
Ken Wakasa
c37205f5ab Merge "DO NOT MERGE: Abolish source code overlay and introduce overridable src dir" into lmp-dev 2014-08-16 04:25:55 +00:00
Ken Wakasa
0b3e48fb50 DO NOT MERGE: Abolish source code overlay and introduce overridable src dir
This should make IDEs happy with appropriate source code directory
selection.

Change-Id: Ic734bd4d20aa050c688a3158b1a382ae0ac18991
(cherry picked from commit fb74ab15c1)
2014-08-20 02:56:09 +00:00