Commit Graph

60 Commits (bd1f59bda5ad0b7028ec06c2de078f1623e76cdd)

Author SHA1 Message Date
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Jean Chalard 483650fd1c Increase the DB version for the next release.
Bug: 15065819

Change-Id: Ie43660109002fdb25ce68d7e64506ada0e15e621
2014-05-22 18:01:37 +09:00
Jean Chalard 9087d19fc0 Check the md5 checksum of the copied file.
If it doesn't match, mark it broken. It means the dictionary pack
will try to install it again next time it updates. We may want to
rethink this.

Bug: 13125743
Change-Id: I0eb547aa7066bed8cb00c009debbafe9181c37ad
2014-05-22 14:19:46 +09:00
Jean Chalard 267e528253 Arrange to send the rawChecksum to LatinIME.
Bug: 13125743
Change-Id: I5d111336e6a0f5ab4e93ff333654a7a1f8f46480
2014-05-22 11:01:04 +09:00
Jean Chalard e077c01461 Add the rawChecksum column to the database.
Bug: 13125743
Change-Id: I082aa9df1dd4a10cdb3f97ee0692f2d72f6c8e7e
2014-05-22 11:00:46 +09:00
Jean Chalard 2e5e74d367 Reset the client database on version upgrade.
Bug: 13632164
Change-Id: Iba333db63558254d760fc80244b3c9753c26b069
2014-04-03 23:20:20 +09: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 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
Jean Chalard d91cd9919e Merge "Catch exceptions we can't do anything about." 2014-02-17 11:33:39 +00:00
Jean Chalard a149731a67 Catch exceptions we can't do anything about.
This also abstracts away the "package deactivated" case for
simpler and safer code.

Bug: 11072561
Change-Id: Idaaf2ae8d8d5b2c4a15de641bbf2f8c5c7cc9410
2014-02-17 18:49:31 +09:00
Jean Chalard a7e3e74ddd Fix a view-related crash
Bug: 12788164
Change-Id: If0d815518824a8e57b15e80111c5e6e08e93ba7e
2014-02-14 18:03:34 +09:00
Jean Chalard b11339b3ab Remove some warnings
Change-Id: I5cfa0d2fccc139bd6c45c5590a68c3e0c90534b8
2014-01-09 14:04:34 +09:00
Satoshi Kataoka 64f64bdf58 Fix the security related API change for PreferenceActivity
Bug: 10118761
Change-Id: I63501d6c2b5f561d7ab8b7362498665d805d5e1e
2013-10-09 14:34:06 +09:00
Satoshi Kataoka c5182c9a4a Correspond to the security related API change for PreferenceActivity
Bug: 10118761
Change-Id: Ia7d1c6c526dae849f447c26387e96a4fb4d6042f
2013-10-02 16:25:07 +09:00
Jean Chalard 93445b4821 Fix some warnings
Change-Id: I7290cd1fb675a1b85b9b6ac2d464c932b5bca1dd
2013-07-31 16:17:01 +09:00
Jean Chalard 2bc980ee28 Merge "Serialize commands sent to a separate threads" 2013-07-16 07:21:07 +00:00
Jean Chalard 6a7a569831 Serialize commands sent to a separate threads
Bug: 9715797
Change-Id: I1eda4d2f0056f70cfb8a92d658e0875706efc170
2013-07-16 15:54:39 +09:00
Jean Chalard 988a1f3132 Merge "Fix a bug with bad view reuse." 2013-07-16 05:43:15 +00:00
Jean Chalard 6912342a48 Fix a bug with bad view reuse.
There are many ways to fix this problem but this is the most
direct way. Removing a view from the cache when any animation
is started will ensure it won't be used again, and will be garbage
collected when it's possible. Since views are created on demand
anyway, a new one will just get created when needed, and that's
it.

Bug: 9400128
Change-Id: I4945d2859d642e79694d51ae90cf4f5bde9a5f1d
2013-07-16 14:12:55 +09:00
Jean Chalard faa729c47c Fix a wrong call to cancel downloads
This resulted in downloads not being correctly canceled.

Bug: 9715797
Change-Id: I786d869977df225f85cb69ec7ea9c96b039258fe
2013-07-11 17:15:45 +09:00
Tadashi G. Takaoka 4be6198cb7 Reorganize Utils class
Change-Id: I7294d1547def5dcfcae9d1d53b277cb3cc9f2d18
2013-07-05 19:24:40 +09:00
Tadashi G. Takaoka 72c2feb573 Use TimeUnit instead of DateUtils for readability
Bug: 9550800
Change-Id: I087205530a5dbcff4bf08f48f4aa7068aae93215
2013-07-05 17:57:01 +09:00
Jean Chalard 3f0858eb2b Fix a bug where no URL means refresh never ends
This patch does two things:
- If there is no URL to download new data from, then the
Refresh button is not shown.
- Even if for some reason refresh starts for a client for
which there is no URL, loading correctly finishes.

Bug: 9388602
Change-Id: I3fd9214da50faa4b59d0bd3e775293dd34f07547
2013-07-01 14:47:30 +09:00
Ken Wakasa 03118a2760 Cleanup under the utils package
Change-Id: If2f7bd1346cc5085bf57645830f0faac44d017e4
2013-06-25 17:09:12 +09:00
Ken Wakasa e28eba5074 Move util classes to the latin/utils directory
Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
2013-06-24 17:04:40 +09:00
Kurt Partridge 2c1796c226 Make intents unique to AOSP
This is to avoid confusion if multiple IMEs are installed with
dictionary pack components

Change-Id: Ibc91951e4fdd5db13f681e4cb06197da98527bbc
2013-06-11 15:04:00 -07:00
Jean Chalard 0ad1489625 Fix an illegal argument exception
This is a bit of a shot in the dark, as I really don't see how this
can happen, but this should fix it in the correct way no matter
how it's actually happening.

Bug: 9301836
Change-Id: I472865b7a78883942c9fd46773238c23788674f8
2013-06-07 18:23:00 +09:00
Jean Chalard 26f489493e Fix the displayed status after download
Bug: 9166225
Change-Id: I7490593d88a5854b9e675b9ead89d2ea9b49315c
2013-05-31 20:28:15 +09:00
Jean Chalard e90d039e0c Fix two strict mode warnings.
Bug: 9052555
Change-Id: I86e90488679a78a9f6e901b640025619293765a0
2013-05-30 20:12:05 +09:00
Jean Chalard 8eb214d7e1 Merge "Fix dictionary pack preference order." 2013-05-30 06:38:27 +00:00
Jean Chalard b3d150aa13 Fix dictionary pack preference order.
It turns out giving them in the right order is not enough, you
also have to actually give them a numeric priority.

Bug: 9165928
Change-Id: I2ecff38f65b70746feeeeb0ed2cc86a586a35363
2013-05-30 12:33:06 +09:00
Jean Chalard 2b34b4eab6 Rub some butter on dictionary list scrolling.
The default implementation for preferences refuses to
cache the views for custom preferences at all. We can
do it, but the system won't do it for us, so this does it.
This makes the screen scrolling smooth again.

Incidentally it also fixes the bug where the button may
not animate on the first element.

Bug: 8882722
Bug: 8883108
Change-Id: I9b2306ac4bf93761a808ebfee3477a65f017cddf
2013-05-29 11:52:04 +09:00
Tadashi G. Takaoka 94027c7201 Use Locale.ROOT for locale neutral operations
Bug: 9112465
Change-Id: I6cd63007287b5a1a57cfbabff35d53f66fc5620e
2013-05-24 12:07:30 -07:00
Jean Chalard a2ec5e8338 Reuse old preferences if possible.
This is an optimization. It also happens to work around what
seems to be a framework bug in JB MR1 / MR1.1.

Bug: 8771179
Change-Id: I62cc7acdc8656d75f8a50c068c4e9d8c6ceb74a0
2013-05-10 14:41:36 +09:00
Jean Chalard 7eff677c29 [PB14] Cosmetic fixes to the progress bar
Bug: 7600384
Change-Id: I33ea155c0c97c7ead07686c4d2a9e0d98be9929c
2013-04-30 17:54:09 +09:00
Jean Chalard 01170ffebe [PB13] Actually update the progress bar
Bug: 7600384
Change-Id: Iaa8f3a59243a15d2a01aaf6017ed85c52b6482a6
2013-04-30 15:48:26 +09:00
Jean Chalard d282ebfb71 [PB12] Implement the progress bar update lifecycle
This ensures the thread does not run uselessly (it is even terminated when
the progress bar exits the screen).

Bug: 7600384
Change-Id: I09117a6f763b574b9b3266f36ba3da4720dc9224
2013-04-30 14:55:10 +09:00
Jean Chalard fc26033c37 [PB11] Add a skeleton class for a self-updating progress bar
Bug: 7600384
Change-Id: I55b51152dd9968a359af091bf309f0d406f63ec4
2013-04-26 20:51:42 +09:00
Jean Chalard ab0c66b9d1 [PB10] Add a progress bar to display file download progress
The progress bar is showing but doesn't show progress yet.

Bug: 7600384
Change-Id: I80debd3f4368e82e4184a6c638bdcc8e48ed2305
2013-04-26 20:34:56 +09:00
Jean Chalard d4fc13d261 [PB9] Make buttons that animate-out unclickable
Clicking on a button that is animating-out is only done by
mistake. Better make them unclickable.
Also, interrupt an out-in animation if it has been preempted.

Bug: 7600384
Change-Id: Ic4700cda46a894ea580bc67ee7bef885ecf1d3bc
2013-04-26 19:06:29 +09:00
Jean Chalard e8ed5d8876 Delete obsolete dictionaries
Bug: 7980985
Change-Id: I4c9165e6102cb12fa1249074297e94013439ea3b
2013-04-26 17:31:55 +09:00
Jean Chalard fb34869f5a Merge "[PB8] Add an animation upon status change." 2013-04-25 11:04:58 +00:00
Jean Chalard 43590149a5 Work around a bug in older DownloadManager versions.
This adds a number to the extension.

Note that for DownloadManager to keep this, the server
needs to send it a mime type it does not recognize. Right
now, it does not recognize application/json so it's okay,
but we'd do well to remove the content/type header from
the server to prevent problems.

Bug: 8467516
Change-Id: Ic484f66ac3f67c36f59f2c0bcb8c7fdeb6e8590d
2013-04-25 18:52:39 +09:00
Jean Chalard 513c63e877 [PB8] Add an animation upon status change.
Bug: 7600384
Change-Id: If5efb9357075193d10255187008e870e2933bdb8
2013-04-25 18:37:03 +09:00
Jean Chalard 2d72590ced [PB7] Export animation code out of the preference
Bug: 7600384
Change-Id: I8009b31d96646acd667db410b94e969daea91d52
2013-04-25 18:37:01 +09:00
Jean Chalard 2cf450f482 [PB6] Encapsulate the buttons into a view
Handling buttons directly in the preference causes large
problems of code readability and interface.  It's better to
have a class to manage the buttons and their animations
separately. This is feature-equivalent, and mostly
delegates stuff for now.

Bug: 7600384
Change-Id: Ia8da0ec68ffac84fc1d65e1760539a87a73fa776
2013-04-25 12:25:25 +09:00
Jean Chalard cadea5d2fc [PB5] Store state in a more convenient manner
This is more readable and will help with animations going forward.

Bug: 7600384
Change-Id: I255598d860d1e451fef106b00da63c282fe95f95
2013-04-24 22:49:50 +09:00
Jean Chalard c017f18a59 [PB4] Make a memory non-static
The life span of this object is actually the life span of the interface.
It should not be static.
Also, we'll have a few other things to store in there soon.

Bug: 7600384
Change-Id: I708019e9ee53653e83a1e52c8e76326c3e39bcf3
2013-04-24 20:46:28 +09:00
Jean Chalard 43e8639e4e [PB3] Simplify storage
By looping through children, there is no need to remember the
last index.

Bug: 7600384
Change-Id: I8b42b0aa38874ee494c6c4ecc09194a1d3c16922
2013-04-24 20:46:26 +09:00
Jean Chalard d98f406dd3 [PB2] Small bugfix
The button would not display after it got hidden once.

Bug: 7600384
Change-Id: I57f9f1191be3b8fff55dde7a2781dbef68a2df62
2013-04-24 20:45:53 +09:00