Commit Graph

9915 Commits (6ddefc567ee7de2f85e77f1d3d58b377caa2a2f6)

Author SHA1 Message Date
Baligh Uddin 6ddefc567e Import translations. DO NOT MERGE
Change-Id: Id288919148957318b18962b09e61ebe76a10c2b7
Auto-generated-cl: translation import
2014-02-21 02:13:34 -08:00
Jean Chalard 1b3a142cac Merge "Fix a bug where suggestions would not be updated." 2014-02-20 14:46:35 +00:00
Jean Chalard 6f50c95887 Fix a bug where suggestions would not be updated.
Also fix a small cosmetic bug where the suggestion strip
would flash.

Bug: 12951777
Change-Id: I68b7bb9175571de9c718f737eebd9f67ea04a931
2014-02-20 23:32:04 +09:00
Jean Chalard a118d19f6c Merge "Don't distrust the cursor pos so much as to bug on IPC delay" 2014-02-20 14:22:48 +00:00
Jean Chalard 3c84eb8822 Don't distrust the cursor pos so much as to bug on IPC delay
When the cursor is moved by the user, the RichInputConnection
is told about it. However, to work around a framework bug, it
also looks at how many characters are in the buffer before the
cursor, and if that's more than the value it's been passed, it
deduces that's a framework bug and there are at least as many
characters as seen before the cursor, so it puts the expected
cursor position there.

When you move the cursor, TextView calls onUpdateSelection,
and when you move it fast, you'll get rapid-fire calls to
onUpdateSelection. This is fine, the RIC is equipped to
deal with that.

However, these calls take some time to make it to the IME. In
this instance, when the first call gets through and the IME
calls TextView (synchronously) for text before the cursor, the
cursor has already moved in the app, and TextView returns more
characters than the cursor position was declared to be in this
instance, so the RIC sets that as the expected cursor position.
Sure enough, a split second later, the second call to
onUpdateSelection arrives, with the new cursor position set
where the RIC had found it too early. The RIC takes that as an
"expected" cursor move, and the input does not get reset.

Luckily, we have a way out. As far as we know, the framework bug
only manifests itself upon rotation, which means we should only
have to adjust for it in onStartInputView. Doing it in
onUpdateSelection is too zealous (and probably too distrustful of
the app to send the correct cursor positions).

So we should just take care of the rotation case (by calling
tryFixLyingCursorPosition in onStartInputView) and remove the
compensating code in resetCachesUponCursorMoves.

Bug: 12982502
Change-Id: Ic3c1408a1ec45deaea63b01d98376a79ae567d77
2014-02-20 23:13:14 +09:00
Keisuke Kuroyanagi d36328cecf Add test only methods to test personalized dicts.
Bug: 11122480
Change-Id: I79a4a73ff09a2d34d4ca094d705e901fb4bc855c
2014-02-20 22:20:43 +09:00
Keisuke Kuroyanagi 485c1ec685 Merge "Add final and volatile for members of InputLogic." 2014-02-20 10:12:45 +00:00
Keisuke Kuroyanagi afdb6f011b Merge "Add user history dictionary decaying test." 2014-02-20 10:05:20 +00:00
Keisuke Kuroyanagi b063377e77 Add final and volatile for members of InputLogic.
Bug: 13107471
Change-Id: I47df79bc6f015c212d1b6d2f63b2efc5da24294e
2014-02-20 18:55:19 +09:00
Keisuke Kuroyanagi 0bc66daae3 Add user history dictionary decaying test.
Bug: 10667710

Change-Id: Ib2be57d8c4cbbb34f64555d84ea6fd571cfdd247
2014-02-20 18:36:46 +09:00
Keisuke Kuroyanagi a514ea7e1b Merge "Check all enabled IME's subtypes to enable personalization." 2014-02-20 09:33:21 +00:00
Keisuke Kuroyanagi d10e2d85af Merge "Throw IOException when dict header cannot be read." 2014-02-20 09:33:08 +00:00
Keisuke Kuroyanagi afd9b62f00 Throw IOException when dict header cannot be read.
Bug: 13106638
Change-Id: Ib48ef0a191a436552c49b6e817dfa13fe1567ae8
2014-02-20 18:11:17 +09:00
Jean Chalard 475f9f35b6 Merge "Comments improvements" 2014-02-20 08:22:39 +00:00
Tadashi G. Takaoka 1672ccbbb6 Change important notice version preference file
This CL also reset the notice version to 1.
This CL must be checked in together with Iea8d9ff038.

Change-Id: I838f7b5b295388d64d6aba90f50b06654eba16e5
2014-02-20 16:50:34 +09:00
Tadashi G. Takaoka 78db739cdb Fix build due to Ib4c472756f
Change-Id: I27aad91d3f821b5c0d6a3c6405b4a9d03c5bd814
2014-02-20 16:16:57 +09:00
Jean Chalard ad2cf220a9 Merge "Remove a call to a deprecated method" 2014-02-20 06:40:46 +00:00
Tadashi G. Takaoka 251ed3b358 Merge "Revert "Turn off personalization default settings"" 2014-02-20 06:26:48 +00:00
Tadashi G. Takaoka c2ba73ab41 Revert "Turn off personalization default settings"
This reverts commit 0a4ac795d6.

Bug: 10587358
Change-Id: Ib4c472756fb9a6ebba4a66d34a9652f1b5afc714
2014-02-20 06:06:29 +00:00
Keisuke Kuroyanagi 6b23749dec Check all enabled IME's subtypes to enable personalization.
Bug: 13067743

Change-Id: I6fc68b5151430a5ab51777f4c381e20f5a657924
2014-02-20 15:05:37 +09:00
Jean Chalard c44b7312ad Remove a call to a deprecated method
...that would cause a crash

Bug: 13082186
Change-Id: Ie12575c27dfdd2029bc9d5f0647e444f69770afc
2014-02-20 14:40:38 +09:00
Tadashi G. Takaoka f16d63c644 Tweak key popup animation parameters
Key popup show up start scale 98%
Key popup dismiss end scale 94%
Key popup show up duration 17ms
Key popup dismiss duration 53ms

Bug: 11518021
Change-Id: Icfde99969163f05cfaed1050ea074545d44db13b
2014-02-20 14:20:44 +09:00
Jean Chalard be8ad77ebb Comments improvements
Typo fixes and clarifications

Change-Id: I0f7e0b6e665232bb995172fff10521c7f17599eb
2014-02-20 13:29:43 +09:00
Baligh Uddin bb17354041 Merge "Import translations. DO NOT MERGE" 2014-02-19 22:16:21 +00:00
Keisuke Kuroyanagi 34fb962513 Call PersonalizationDictionarySessionRegistrar.init().
Wrongly removed in I1f50cb137b6054dc9.

Bug: 13067743
Change-Id: I27cd221cb7f6e403c3fc128d65d14dbf628b6f55
2014-02-19 23:27:14 +09:00
Keisuke Kuroyanagi d102eb80da Remove personalization dicts for multilingual users.
Bug: 13067743
Change-Id: I1f50cb137b6054dc9442237586b70fc0aa2bf427
2014-02-19 21:00:27 +09:00
Tadashi G. Takaoka 920c40fe45 Use AlertDialog.setOnDismissListener
AlertDialog.Builder.setOnDismissListener is supported from API 17.

Bug: 10587358
Change-Id: Ie8ce8e283b803f7f6bb58ced446e676339f980eb
2014-02-19 19:05:06 +09:00
Tadashi G. Takaoka ed616083dd Merge "Turn personalization on when important notice dialog is displayed" 2014-02-19 09:46:15 +00:00
Tadashi G. Takaoka 6abc852255 Turn personalization on when important notice dialog is displayed
This change must be checked in together with Ifde70b1d3b.

Bug: 10587358
Change-Id: I9dc48f9d521e0e6f6269e4f184389ba805f3053f
2014-02-19 18:36:32 +09:00
Tadashi G. Takaoka 3a7ed5fdfe Merge "Fix IllegalStateException raied by monkey" 2014-02-19 08:27:37 +00:00
Tadashi G. Takaoka 9fd7447d6c Fix IllegalStateException raied by monkey
Bug: 13082467
Change-Id: I9290974821d22067e7ddd60dce441b11ca533a0f
2014-02-19 16:40:52 +09:00
Keisuke Kuroyanagi 03105290d8 Merge "Throw exception when the header cannot be read." 2014-02-19 04:59:47 +00:00
Tadashi G. Takaoka 776bba098b Merge "Turn off personalization default settings" 2014-02-19 04:25:04 +00:00
Keisuke Kuroyanagi 97a40d030f Throw exception when the header cannot be read.
Bug: 13066902
Change-Id: I8fd0f361a4ca55aaab8a2bd2e11f48f92b87fc93
2014-02-19 12:35:58 +09:00
Keisuke Kuroyanagi e49e007bb2 Fix: Use old suggest after reloading.
Change-Id: Icb2821f61c4203254b7d573cad5ce71fbf0ed841
2014-02-19 12:34:09 +09:00
Tadashi G. Takaoka 0a4ac795d6 Turn off personalization default settings
Because the previous personalization settings default value was on,
this CL changes the preference key of the personalization settings.

Bug: 10587358
Change-Id: I80233e8af4b532d8c67d8fb184c2865862bb35dd
2014-02-19 12:08:50 +09:00
Jean Chalard 80d413caff Merge "Straighten out database cursors behavior." 2014-02-18 11:09:38 +00:00
Jean Chalard 28e0b24965 Merge "Fix a bug where the cache would be out of sync" 2014-02-18 10:58:50 +00:00
Jean Chalard b8ff8ca9d9 Straighten out database cursors behavior.
Some were never closed, other closed twice. This change
makes all Cursor instances behave, having the #close()
call in a finally{} clause, and puts the burden of closing
the cursor squarely on the creator rather than in the
called methods.
There is however one exception that is beyond the scope
of this change: UserDictionarySettings have a Cursor
member, it's never closed, and fixing the problem is not
obvious. This change adds a TODO for now.

It's not very clear if this change actually helps with
bug#12670151, but it may be related and it's a good
think to do anyway.

Bug: 12670151
Change-Id: I87cc44387e7dee3da1488671b93a28d9d73f7dc0
2014-02-18 19:58:23 +09:00
Jean Chalard fe92c174ea Fix a bug where the cache would be out of sync
During recorrection, the cursor position when calling
commitText is not necessarily at the end of the
composing text.
Besides, RichInputConnection assumes the cursor is
always after any composing text. This is not correct,
but in the practice, it seems all code paths work.
We should fix this in the future.

Bug: 13060691
Change-Id: I15f71fff62d36e80cf6e4a022c5e78af634b199d
2014-02-18 19:55:54 +09:00
Jean Chalard 783dabb812 Merge "Cleanup." 2014-02-18 09:54:33 +00:00
Jean Chalard 63be066544 Cleanup.
Less code, less chance of stuff escaping, and a bit of a clarification.
Yay.

Change-Id: I3193fd8ad7ac28195260cbc231c4e498a63a460c
2014-02-18 17:07:46 +09:00
Ken Wakasa 266c8c5b1d Merge "Some cosmetic fixes in LatinIME.java" 2014-02-18 06:08:34 +00:00
Ken Wakasa 12ff7da19d Some cosmetic fixes in LatinIME.java
Change-Id: Ia2d04ab992f5a0cc736150b2691b2f8ae8f0955d
2014-02-18 14:56:50 +09:00
Jean Chalard db21fad18f Merge "Avoid crashing when the Content URL is not found." 2014-02-18 05:35:54 +00:00
Jean Chalard 9967f0a1d0 Avoid crashing when the Content URL is not found.
I'm not sure when this can happen, but it seems it does
at least on older versions of the platform. Let's avoid
crashing.

Bug: 11618402
Change-Id: If730b5bd8f20e0f60b884eab5900099116afc5f0
2014-02-18 14:27:58 +09:00
Baligh Uddin 0f8134dc40 Merge "Import translations. DO NOT MERGE" 2014-02-18 04:58:14 +00:00
Ken Wakasa 0d32643e69 Merge "Cosmetic fixes" 2014-02-18 03:28:04 +00:00
Ken Wakasa 2312c1954f Cosmetic fixes
Change-Id: I6c755565ba7689357d02d26cc0e92a93031953e8
2014-02-18 12:17:24 +09:00
Tadashi G. Takaoka cc05f468ca Merge "Refactor InputAttributes a bit" 2014-02-18 02:25:46 +00:00