/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/ |
D | ActionBatch.java | 114 final SQLiteDatabase db = MetadataDbHelper.getDb(context, mClientId); in execute() 115 final ContentValues values = MetadataDbHelper.getContentValuesByWordListId(db, in execute() 117 final int status = values.getAsInteger(MetadataDbHelper.STATUS_COLUMN); in execute() 120 if (MetadataDbHelper.STATUS_DOWNLOADING == status) { in execute() 126 manager.remove(values.getAsLong(MetadataDbHelper.PENDINGID_COLUMN)); in execute() 128 MetadataDbHelper.markEntryAsAvailable(db, mWordList.mId, mWordList.mVersion); in execute() 129 } else if (MetadataDbHelper.STATUS_AVAILABLE != status) { in execute() 209 final int status = mWordListValues.getAsInteger(MetadataDbHelper.STATUS_COLUMN); in execute() 210 if (MetadataDbHelper.STATUS_DOWNLOADING != status) { in execute() 211 final String id = mWordListValues.getAsString(MetadataDbHelper.WORDLISTID_COLUMN); in execute() [all …]
|
D | UpdateHandler.java | 139 MetadataDbHelper.registerMetadataDownloadId(context, uri, downloadId); in writeMetadataDownloadId() 178 final Cursor cursor = MetadataDbHelper.queryClientIds(context); in update() 185 MetadataDbHelper.getMetadataUriAsString(context, clientId); in update() 281 MetadataDbHelper.getMetadataDownloadIdForClient(context, clientId); in cancelUpdateWithDownloadManager() 285 MetadataDbHelper.getMetadataUriAsString(context, clientId), NOT_AN_ID); in cancelUpdateWithDownloadManager() 334 MetadataDbHelper.markEntryAsDownloading(db, id, version, downloadId); in registerDownloadRequest() 385 MetadataDbHelper.getDownloadRecordsForDownloadId(context, in getDownloadRecordsForCompletedDownloadInfo() 397 MetadataDbHelper.saveLastUpdateTimeOfUri(context, downloadInfo.mUri); in getDownloadRecordsForCompletedDownloadInfo() 447 final SQLiteDatabase db = MetadataDbHelper.getDb(context, record.mClientId); in downloadFinished() 492 MetadataDbHelper.deleteDownloadingEntry(db, fileId); in publishUpdateWordListCompleted() [all …]
|
D | DictionaryProvider.java | 229 final Cursor c = MetadataDbHelper.queryDictionaries(getContext(), clientId); in query() 236 if (!MetadataDbHelper.isClientKnown(getContext(), clientId)) return null; in query() 274 final SQLiteDatabase db = MetadataDbHelper.getDb(context, clientId); in getWordlistMetadataForWordlistId() 275 return MetadataDbHelper.getInstalledOrDeletingWordListContentValuesByWordListId( in getWordlistMetadataForWordlistId() 308 final int status = wordList.getAsInteger(MetadataDbHelper.STATUS_COLUMN); in openAssetFile() 309 if (MetadataDbHelper.STATUS_DELETING == status) { in openAssetFile() 319 wordList.getAsString(MetadataDbHelper.LOCAL_FILENAME_COLUMN); in openAssetFile() 349 MetadataDbHelper.queryInstalledOrDeletingOrAvailableDictionaryMetadata(context, in getDictionaryWordListsForLocale() 355 final int idIndex = results.getColumnIndex(MetadataDbHelper.WORDLISTID_COLUMN); in getDictionaryWordListsForLocale() 356 final int localeIndex = results.getColumnIndex(MetadataDbHelper.LOCALE_COLUMN); in getDictionaryWordListsForLocale() [all …]
|
D | WordListPreference.java | 107 case MetadataDbHelper.STATUS_DELETING: in getSummary() 108 case MetadataDbHelper.STATUS_AVAILABLE: in getSummary() 110 case MetadataDbHelper.STATUS_DOWNLOADING: in getSummary() 112 case MetadataDbHelper.STATUS_INSTALLED: in getSummary() 114 case MetadataDbHelper.STATUS_DISABLED: in getSummary() 160 if (MetadataDbHelper.STATUS_DOWNLOADING == mStatus) { in disableDict() 161 setStatus(MetadataDbHelper.STATUS_AVAILABLE); in disableDict() 162 } else if (MetadataDbHelper.STATUS_INSTALLED == mStatus) { in disableDict() 165 setStatus(MetadataDbHelper.STATUS_DISABLED); in disableDict() 175 if (MetadataDbHelper.STATUS_AVAILABLE == mStatus) { in enableDict() [all …]
|
D | MetadataDbHelper.java | 38 public class MetadataDbHelper extends SQLiteOpenHelper { class 41 private static final String TAG = MetadataDbHelper.class.getSimpleName(); 153 private static TreeMap<String, MetadataDbHelper> sInstanceMap = null; 154 public static synchronized MetadataDbHelper getInstance(final Context context, in getInstance() 162 if (null == sInstanceMap) sInstanceMap = new TreeMap<String, MetadataDbHelper>(); in getInstance() 163 MetadataDbHelper helper = sInstanceMap.get(clientId); in getInstance() 165 helper = new MetadataDbHelper(context, clientId); in getInstance() 170 private MetadataDbHelper(final Context context, final String clientId) { in MetadataDbHelper() method in MetadataDbHelper 287 SQLiteDatabase defaultDb = MetadataDbHelper.getDb(context, null); in getMetadataUriAsString() 288 final Cursor cursor = defaultDb.query(MetadataDbHelper.CLIENT_TABLE_NAME, in getMetadataUriAsString() [all …]
|
D | MetadataHandler.java | 49 final int localeColumn = results.getColumnIndex(MetadataDbHelper.LOCALE_COLUMN); in makeMetadataObject() 50 final int typeColumn = results.getColumnIndex(MetadataDbHelper.TYPE_COLUMN); in makeMetadataObject() 52 results.getColumnIndex(MetadataDbHelper.DESCRIPTION_COLUMN); in makeMetadataObject() 53 final int idIndex = results.getColumnIndex(MetadataDbHelper.WORDLISTID_COLUMN); in makeMetadataObject() 54 final int updateIndex = results.getColumnIndex(MetadataDbHelper.DATE_COLUMN); in makeMetadataObject() 55 final int fileSizeIndex = results.getColumnIndex(MetadataDbHelper.FILESIZE_COLUMN); in makeMetadataObject() 56 final int checksumIndex = results.getColumnIndex(MetadataDbHelper.CHECKSUM_COLUMN); in makeMetadataObject() 58 results.getColumnIndex(MetadataDbHelper.LOCAL_FILENAME_COLUMN); in makeMetadataObject() 60 results.getColumnIndex(MetadataDbHelper.REMOTE_FILENAME_COLUMN); in makeMetadataObject() 61 final int versionIndex = results.getColumnIndex(MetadataDbHelper.VERSION_COLUMN); in makeMetadataObject() [all …]
|
D | WordListMetadata.java | 75 final String id = values.getAsString(MetadataDbHelper.WORDLISTID_COLUMN); in createFromContentValues() 76 final Integer type = values.getAsInteger(MetadataDbHelper.TYPE_COLUMN); in createFromContentValues() 77 final String description = values.getAsString(MetadataDbHelper.DESCRIPTION_COLUMN); in createFromContentValues() 78 final Long lastUpdate = values.getAsLong(MetadataDbHelper.DATE_COLUMN); in createFromContentValues() 79 final Long fileSize = values.getAsLong(MetadataDbHelper.FILESIZE_COLUMN); in createFromContentValues() 80 final String checksum = values.getAsString(MetadataDbHelper.CHECKSUM_COLUMN); in createFromContentValues() 81 final String localFilename = values.getAsString(MetadataDbHelper.LOCAL_FILENAME_COLUMN); in createFromContentValues() 82 final String remoteFilename = values.getAsString(MetadataDbHelper.REMOTE_FILENAME_COLUMN); in createFromContentValues() 83 final Integer version = values.getAsInteger(MetadataDbHelper.VERSION_COLUMN); in createFromContentValues() 84 final Integer formatVersion = values.getAsInteger(MetadataDbHelper.FORMATVERSION_COLUMN); in createFromContentValues() [all …]
|
D | MetadataParser.java | 35 private static final String ID_FIELD_NAME = MetadataDbHelper.WORDLISTID_COLUMN; 37 private static final String DESCRIPTION_FIELD_NAME = MetadataDbHelper.DESCRIPTION_COLUMN; 39 private static final String FILESIZE_FIELD_NAME = MetadataDbHelper.FILESIZE_COLUMN; 40 private static final String CHECKSUM_FIELD_NAME = MetadataDbHelper.CHECKSUM_COLUMN; 42 MetadataDbHelper.REMOTE_FILENAME_COLUMN; 43 private static final String VERSION_FIELD_NAME = MetadataDbHelper.VERSION_COLUMN; 44 private static final String FORMATVERSION_FIELD_NAME = MetadataDbHelper.FORMATVERSION_COLUMN; 79 MetadataDbHelper.TYPE_BULK, in parseOneWordList()
|
D | DictionarySettingsFragment.java | 118 if (!MetadataDbHelper.isClientKnown(activity, mClientId)) { in onResume() 208 MetadataDbHelper.getLastUpdateDateForClient(getActivity(), mClientId); in refreshInterface() 285 final int idIndex = cursor.getColumnIndex(MetadataDbHelper.WORDLISTID_COLUMN); in createInstalledDictSettingsCollection() 286 final int versionIndex = cursor.getColumnIndex(MetadataDbHelper.VERSION_COLUMN); in createInstalledDictSettingsCollection() 287 final int localeIndex = cursor.getColumnIndex(MetadataDbHelper.LOCALE_COLUMN); in createInstalledDictSettingsCollection() 288 final int descriptionIndex = cursor.getColumnIndex(MetadataDbHelper.DESCRIPTION_COLUMN); in createInstalledDictSettingsCollection() 289 final int statusIndex = cursor.getColumnIndex(MetadataDbHelper.STATUS_COLUMN); in createInstalledDictSettingsCollection() 290 final int filesizeIndex = cursor.getColumnIndex(MetadataDbHelper.FILESIZE_COLUMN); in createInstalledDictSettingsCollection()
|
D | DictionaryDownloadProgressBar.java | 56 final SQLiteDatabase db = MetadataDbHelper.getDb(context, clientId); in getDownloadManagerPendingIdFromWordlistId() 58 MetadataDbHelper.getContentValuesOfLatestAvailableWordlistById(db, wordlistId); in getDownloadManagerPendingIdFromWordlistId() 65 return wordlistValues.getAsInteger(MetadataDbHelper.PENDINGID_COLUMN); in getDownloadManagerPendingIdFromWordlistId()
|
D | DictionaryListInterfaceState.java | 36 public int mStatus = MetadataDbHelper.STATUS_UNKNOWN; 49 if (null == state) return MetadataDbHelper.STATUS_UNKNOWN; in getStatus()
|
D | DictionaryService.java | 216 final long lastUpdate = MetadataDbHelper.getOldestUpdateTime(context); in isLastUpdateAtLeastThisOld()
|