diff options
author | 2013-05-15 11:05:07 -0700 | |
---|---|---|
committer | 2013-05-15 11:05:07 -0700 | |
commit | e7c5c8f6fddbef8ffcef06b71856c224292b23f1 (patch) | |
tree | 550b1e64b7e498eb6e8727ab95ecb152959322c7 | |
parent | 926abffaaa122b96962e24f9f10c10c43d7c4114 (diff) | |
parent | 55d80e4f0ce89aa9dab2ba5ce2320e32de91f40e (diff) | |
download | latinime-e7c5c8f6fddbef8ffcef06b71856c224292b23f1.tar.gz latinime-e7c5c8f6fddbef8ffcef06b71856c224292b23f1.tar.xz latinime-e7c5c8f6fddbef8ffcef06b71856c224292b23f1.zip |
am 55d80e4f: am e8ed5d88: Delete obsolete dictionaries
* commit '55d80e4f0ce89aa9dab2ba5ce2320e32de91f40e':
Delete obsolete dictionaries
-rw-r--r-- | java/src/com/android/inputmethod/dictionarypack/ActionBatch.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/dictionarypack/ActionBatch.java b/java/src/com/android/inputmethod/dictionarypack/ActionBatch.java index a9d799218..bf2230553 100644 --- a/java/src/com/android/inputmethod/dictionarypack/ActionBatch.java +++ b/java/src/com/android/inputmethod/dictionarypack/ActionBatch.java @@ -483,13 +483,14 @@ public final class ActionBatch { if (MetadataDbHelper.STATUS_INSTALLED == status || MetadataDbHelper.STATUS_DISABLED == status || MetadataDbHelper.STATUS_DELETING == status) { - // If it is installed or disabled, then we cannot remove the entry lest the user - // lose the ability to delete the file or otherwise administrate it. We will thus - // leave it as is, but remove the URI from the database since it is not supposed to - // be accessible any more. + // If it is installed or disabled, we need to mark it as deleted so that LatinIME + // will remove it next time it enquires for dictionaries. // If it is deleting and we don't have a new version, then we have to wait until - // Android Keyboard actually has deleted it before we can remove its metadata. + // LatinIME actually has deleted it before we can remove its metadata. + // In both cases, remove the URI from the database since it is not supposed to + // be accessible any more. values.put(MetadataDbHelper.REMOTE_FILENAME_COLUMN, ""); + values.put(MetadataDbHelper.STATUS_COLUMN, MetadataDbHelper.STATUS_DELETING); db.update(MetadataDbHelper.METADATA_TABLE_NAME, values, MetadataDbHelper.WORDLISTID_COLUMN + " = ? AND " + MetadataDbHelper.VERSION_COLUMN + " = ?", |