/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/ |
D | ActionBatch.java | 113 final SQLiteDatabase db = MetadataDbHelper.getDb(context, mClientId); in execute() 114 final ContentValues values = MetadataDbHelper.getContentValuesByWordListId(db, in execute() 116 final int status = values.getAsInteger(MetadataDbHelper.STATUS_COLUMN); in execute() 118 if (MetadataDbHelper.STATUS_DOWNLOADING == status) { in execute() 121 manager.remove(values.getAsLong(MetadataDbHelper.PENDINGID_COLUMN)); in execute() 122 MetadataDbHelper.markEntryAsAvailable(db, mWordList.mId, mWordList.mVersion); in execute() 123 } else if (MetadataDbHelper.STATUS_AVAILABLE != status in execute() 124 && MetadataDbHelper.STATUS_RETRYING != status) { in execute() 181 final int status = mWordListValues.getAsInteger(MetadataDbHelper.STATUS_COLUMN); in execute() 182 if (MetadataDbHelper.STATUS_DOWNLOADING != status) { in execute() [all …]
|
D | MetadataHandler.java | 50 final int localeColumn = results.getColumnIndex(MetadataDbHelper.LOCALE_COLUMN); in makeMetadataObject() 51 final int typeColumn = results.getColumnIndex(MetadataDbHelper.TYPE_COLUMN); in makeMetadataObject() 53 results.getColumnIndex(MetadataDbHelper.DESCRIPTION_COLUMN); in makeMetadataObject() 54 final int idIndex = results.getColumnIndex(MetadataDbHelper.WORDLISTID_COLUMN); in makeMetadataObject() 55 final int updateIndex = results.getColumnIndex(MetadataDbHelper.DATE_COLUMN); in makeMetadataObject() 56 final int fileSizeIndex = results.getColumnIndex(MetadataDbHelper.FILESIZE_COLUMN); in makeMetadataObject() 58 results.getColumnIndex(MetadataDbHelper.RAW_CHECKSUM_COLUMN); in makeMetadataObject() 59 final int checksumIndex = results.getColumnIndex(MetadataDbHelper.CHECKSUM_COLUMN); in makeMetadataObject() 60 final int retryCountIndex = results.getColumnIndex(MetadataDbHelper.RETRY_COUNT_COLUMN); in makeMetadataObject() 62 results.getColumnIndex(MetadataDbHelper.LOCAL_FILENAME_COLUMN); in makeMetadataObject() [all …]
|
D | DictionaryProvider.java | 113 static private final String[] columnNames = { MetadataDbHelper.WORDLISTID_COLUMN, 114 MetadataDbHelper.LOCALE_COLUMN, MetadataDbHelper.RAW_CHECKSUM_COLUMN }; 235 final Cursor c = MetadataDbHelper.queryDictionaries(getContext(), clientId); in query() 242 if (!MetadataDbHelper.isClientKnown(getContext(), clientId)) return null; in query() 273 final SQLiteDatabase db = MetadataDbHelper.getDb(context, clientId); in getWordlistMetadataForWordlistId() 274 return MetadataDbHelper.getInstalledOrDeletingWordListContentValuesByWordListId( in getWordlistMetadataForWordlistId() 307 final int status = wordList.getAsInteger(MetadataDbHelper.STATUS_COLUMN); in openAssetFile() 308 if (MetadataDbHelper.STATUS_DELETING == status) { in openAssetFile() 318 wordList.getAsString(MetadataDbHelper.LOCAL_FILENAME_COLUMN); in openAssetFile() 346 MetadataDbHelper.queryInstalledOrDeletingOrAvailableDictionaryMetadata(context, in getDictionaryWordListsForLocale() [all …]
|
D | UpdateHandler.java | 148 MetadataDbHelper.registerMetadataDownloadId(context, uri, downloadId); in writeMetadataDownloadId() 187 final Cursor cursor = MetadataDbHelper.queryClientIds(context); in tryUpdate() 194 MetadataDbHelper.getMetadataUriAsString(context, clientId); in tryUpdate() 278 MetadataDbHelper.getMetadataDownloadIdAndStartDateForURI(context, metadataUri); in maybeCancelUpdateAndReturnIfStillRunning() 307 final String metadataUri = MetadataDbHelper.getMetadataUriAsString(context, clientId); in cancelUpdate() 336 MetadataDbHelper.markEntryAsDownloading(db, id, version, downloadId); in registerDownloadRequest() 387 MetadataDbHelper.getDownloadRecordsForDownloadId(context, in getDownloadRecordsForCompletedDownloadInfo() 399 MetadataDbHelper.saveLastUpdateTimeOfUri(context, downloadInfo.mUri); in getDownloadRecordsForCompletedDownloadInfo() 451 final SQLiteDatabase db = MetadataDbHelper.getDb(context, record.mClientId); in downloadFinished() 496 MetadataDbHelper.deleteDownloadingEntry(db, fileId); in publishUpdateWordListCompleted() [all …]
|
D | WordListMetadata.java | 83 final String id = values.getAsString(MetadataDbHelper.WORDLISTID_COLUMN); in createFromContentValues() 84 final Integer type = values.getAsInteger(MetadataDbHelper.TYPE_COLUMN); in createFromContentValues() 85 final String description = values.getAsString(MetadataDbHelper.DESCRIPTION_COLUMN); in createFromContentValues() 86 final Long lastUpdate = values.getAsLong(MetadataDbHelper.DATE_COLUMN); in createFromContentValues() 87 final Long fileSize = values.getAsLong(MetadataDbHelper.FILESIZE_COLUMN); in createFromContentValues() 88 final String rawChecksum = values.getAsString(MetadataDbHelper.RAW_CHECKSUM_COLUMN); in createFromContentValues() 89 final String checksum = values.getAsString(MetadataDbHelper.CHECKSUM_COLUMN); in createFromContentValues() 90 final int retryCount = values.getAsInteger(MetadataDbHelper.RETRY_COUNT_COLUMN); in createFromContentValues() 91 final String localFilename = values.getAsString(MetadataDbHelper.LOCAL_FILENAME_COLUMN); in createFromContentValues() 92 final String remoteFilename = values.getAsString(MetadataDbHelper.REMOTE_FILENAME_COLUMN); in createFromContentValues() [all …]
|
D | WordListPreference.java | 119 case MetadataDbHelper.STATUS_DELETING: in getSummary() 120 case MetadataDbHelper.STATUS_AVAILABLE: in getSummary() 122 case MetadataDbHelper.STATUS_DOWNLOADING: in getSummary() 124 case MetadataDbHelper.STATUS_INSTALLED: in getSummary() 126 case MetadataDbHelper.STATUS_DISABLED: in getSummary() 173 if (MetadataDbHelper.STATUS_DOWNLOADING == mStatus) { in disableDict() 174 setStatus(MetadataDbHelper.STATUS_AVAILABLE); in disableDict() 175 } else if (MetadataDbHelper.STATUS_INSTALLED == mStatus) { in disableDict() 178 setStatus(MetadataDbHelper.STATUS_DISABLED); in disableDict() 190 if (MetadataDbHelper.STATUS_AVAILABLE == mStatus) { in enableDict() [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 RAW_CHECKSUM_FIELD_NAME = MetadataDbHelper.RAW_CHECKSUM_COLUMN; 41 private static final String CHECKSUM_FIELD_NAME = MetadataDbHelper.CHECKSUM_COLUMN; 43 MetadataDbHelper.REMOTE_FILENAME_COLUMN; 44 private static final String VERSION_FIELD_NAME = MetadataDbHelper.VERSION_COLUMN; 45 private static final String FORMATVERSION_FIELD_NAME = MetadataDbHelper.FORMATVERSION_COLUMN; 80 MetadataDbHelper.TYPE_BULK, in parseOneWordList() 86 MetadataDbHelper.DICTIONARY_RETRY_THRESHOLD /* retryCount */, in parseOneWordList()
|
D | MetadataDbHelper.java | 42 public class MetadataDbHelper extends SQLiteOpenHelper { class 43 private static final String TAG = MetadataDbHelper.class.getSimpleName(); 164 private static TreeMap<String, MetadataDbHelper> sInstanceMap = null; 165 public static synchronized MetadataDbHelper getInstance(final Context context, in getInstance() 174 MetadataDbHelper helper = sInstanceMap.get(clientId); in getInstance() 176 helper = new MetadataDbHelper(context, clientId); in getInstance() 181 private MetadataDbHelper(final Context context, final String clientId) { in MetadataDbHelper() method in MetadataDbHelper 359 SQLiteDatabase defaultDb = MetadataDbHelper.getDb(context, null); in getMetadataUriAsString() 360 final Cursor cursor = defaultDb.query(MetadataDbHelper.CLIENT_TABLE_NAME, in getMetadataUriAsString() 361 new String[] { MetadataDbHelper.CLIENT_METADATA_URI_COLUMN }, in getMetadataUriAsString() [all …]
|
D | DictionarySettingsFragment.java | 113 return MetadataDbHelper.getMetadataUriAsString(getActivity(), mClientId); in onCreateOptionsMenu() 147 if (!MetadataDbHelper.isClientKnown(activity, mClientId)) { in onResume() 309 final int idIndex = cursor.getColumnIndex(MetadataDbHelper.WORDLISTID_COLUMN); in createInstalledDictSettingsCollection() 310 final int versionIndex = cursor.getColumnIndex(MetadataDbHelper.VERSION_COLUMN); in createInstalledDictSettingsCollection() 311 final int localeIndex = cursor.getColumnIndex(MetadataDbHelper.LOCALE_COLUMN); in createInstalledDictSettingsCollection() 312 final int descriptionIndex = cursor.getColumnIndex(MetadataDbHelper.DESCRIPTION_COLUMN); in createInstalledDictSettingsCollection() 313 final int statusIndex = cursor.getColumnIndex(MetadataDbHelper.STATUS_COLUMN); in createInstalledDictSettingsCollection() 314 final int filesizeIndex = cursor.getColumnIndex(MetadataDbHelper.FILESIZE_COLUMN); in createInstalledDictSettingsCollection()
|
D | DictionaryDownloadProgressBar.java | 55 final SQLiteDatabase db = MetadataDbHelper.getDb(context, clientId); in getDownloadManagerPendingIdFromWordlistId() 57 MetadataDbHelper.getContentValuesOfLatestAvailableWordlistById(db, wordlistId); in getDownloadManagerPendingIdFromWordlistId() 64 return wordlistValues.getAsInteger(MetadataDbHelper.PENDINGID_COLUMN); in getDownloadManagerPendingIdFromWordlistId()
|
D | DictionaryListInterfaceState.java | 37 public int mStatus = MetadataDbHelper.STATUS_UNKNOWN; 51 if (null == state) return MetadataDbHelper.STATUS_UNKNOWN; in getStatus()
|
D | DictionaryService.java | 248 final long lastUpdate = MetadataDbHelper.getOldestUpdateTime(context); in isLastUpdateAtLeastThisOld()
|