diff options
author | 2010-08-19 22:46:06 -0700 | |
---|---|---|
committer | 2010-08-19 22:46:06 -0700 | |
commit | d56f8f5c10d6a959c23fda6ba0a588198fe7412b (patch) | |
tree | 9c26f81aa39c45fc0f22ecb2d5337e622b6a4438 /java/src/com/android/inputmethod/latin/AutoDictionary.java | |
parent | b608a93c0f3087b191c88cd75665886b7c52015e (diff) | |
parent | 979f8690967ff5409fe18f5085858ccdb8e0ccf1 (diff) | |
download | latinime-d56f8f5c10d6a959c23fda6ba0a588198fe7412b.tar.gz latinime-d56f8f5c10d6a959c23fda6ba0a588198fe7412b.tar.xz latinime-d56f8f5c10d6a959c23fda6ba0a588198fe7412b.zip |
am 979f8690: DO NOT MERGE. Backport LatinIME from master to Gingerbread
Merge commit '979f8690967ff5409fe18f5085858ccdb8e0ccf1' into gingerbread-plus-aosp
* commit '979f8690967ff5409fe18f5085858ccdb8e0ccf1':
DO NOT MERGE. Backport LatinIME from master to Gingerbread
Diffstat (limited to 'java/src/com/android/inputmethod/latin/AutoDictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/AutoDictionary.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/AutoDictionary.java b/java/src/com/android/inputmethod/latin/AutoDictionary.java index 93f1985ca..4fbb5b012 100644 --- a/java/src/com/android/inputmethod/latin/AutoDictionary.java +++ b/java/src/com/android/inputmethod/latin/AutoDictionary.java @@ -83,14 +83,14 @@ public class AutoDictionary extends ExpandableDictionary { sDictProjectionMap.put(COLUMN_LOCALE, COLUMN_LOCALE); } - private static DatabaseHelper mOpenHelper = null; + private static DatabaseHelper sOpenHelper = null; - public AutoDictionary(Context context, LatinIME ime, String locale) { - super(context); + public AutoDictionary(Context context, LatinIME ime, String locale, int dicTypeId) { + super(context, dicTypeId); mIme = ime; mLocale = locale; - if (mOpenHelper == null) { - mOpenHelper = new DatabaseHelper(getContext()); + if (sOpenHelper == null) { + sOpenHelper = new DatabaseHelper(getContext()); } if (mLocale != null && mLocale.length() > 1) { loadDictionary(); @@ -169,7 +169,7 @@ public class AutoDictionary extends ExpandableDictionary { // Nothing pending? Return if (mPendingWrites.isEmpty()) return; // Create a background thread to write the pending entries - new UpdateDbTask(getContext(), mOpenHelper, mPendingWrites, mLocale).execute(); + new UpdateDbTask(getContext(), sOpenHelper, mPendingWrites, mLocale).execute(); // Create a new map for writing new entries into while the old one is written to db mPendingWrites = new HashMap<String, Integer>(); } @@ -209,7 +209,7 @@ public class AutoDictionary extends ExpandableDictionary { qb.setProjectionMap(sDictProjectionMap); // Get the database and run the query - SQLiteDatabase db = mOpenHelper.getReadableDatabase(); + SQLiteDatabase db = sOpenHelper.getReadableDatabase(); Cursor c = qb.query(db, null, selection, selectionArgs, null, null, DEFAULT_SORT_ORDER); return c; |