/frameworks/base/core/java/android/content/ |
H A D | SearchRecentSuggestionsProvider.java | 84 private static final String sDatabaseName = "suggestions.db"; 137 public void onCreate(SQLiteDatabase db) { argument 148 db.execSQL(builder.toString()); 152 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 155 db.execSQL("DROP TABLE IF EXISTS suggestions"); 156 onCreate(db); 226 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); 236 count = db.delete(sSuggestions, selection, selectionArgs); 273 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); 285 rowID = db [all...] |
/frameworks/base/core/java/android/database/ |
H A D | DatabaseUtils.java | 773 * @param db the database the table is in 777 public static long queryNumEntries(SQLiteDatabase db, String table) { argument 778 return queryNumEntries(db, table, null, null); 783 * @param db the database the table is in 790 public static long queryNumEntries(SQLiteDatabase db, String table, String selection) { argument 791 return queryNumEntries(db, table, selection, null); 796 * @param db the database the table is in 807 public static long queryNumEntries(SQLiteDatabase db, String table, String selection, argument 810 return longForQuery(db, "select count(*) from " + table + s, 816 * @param db th 821 queryIsEmpty(SQLiteDatabase db, String table) argument 830 longForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument 852 stringForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument 876 blobFileDescriptorForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument 1033 InsertHelper(SQLiteDatabase db, String tableName) argument [all...] |
/frameworks/base/core/java/android/database/sqlite/ |
H A D | SQLiteCursor.java | 70 * @param db a reference to a Database object that is already constructed 78 public SQLiteCursor(SQLiteDatabase db, SQLiteCursorDriver driver, argument
|
H A D | SQLiteDatabase.java | 408 * db.beginTransaction(); 411 * db.setTransactionSuccessful(); 413 * db.endTransaction(); 432 * db.beginTransactionNonExclusive(); 435 * db.setTransactionSuccessful(); 437 * db.endTransaction(); 457 * db.beginTransactionWithListener(listener); 460 * db.setTransactionSuccessful(); 462 * db.endTransaction(); 485 * db 2197 newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) argument [all...] |
H A D | SQLiteDirectCursorDriver.java | 35 public SQLiteDirectCursorDriver(SQLiteDatabase db, String sql, String editTable, argument 37 mDatabase = db;
|
H A D | SQLiteOpenHelper.java | 206 SQLiteDatabase db = mDatabase; 210 if (db != null) { 211 if (writable && db.isReadOnly()) { 212 db.reopenReadWrite(); 215 db = SQLiteDatabase.create(null); 220 db = SQLiteDatabase.openDatabase(path, mFactory, 223 db = mContext.openOrCreateDatabase(mName, mEnableWriteAheadLogging ? 234 db = SQLiteDatabase.openDatabase(path, mFactory, 239 onConfigure(db); 241 final int version = db 311 onConfigure(SQLiteDatabase db) argument 319 onCreate(SQLiteDatabase db) argument 341 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 359 onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 377 onOpen(SQLiteDatabase db) argument [all...] |
H A D | SQLiteProgram.java | 40 SQLiteProgram(SQLiteDatabase db, String sql, Object[] bindArgs, argument 42 mDatabase = db; 58 db.getThreadSession().prepare(mSql, 59 db.getThreadDefaultConnectionFlags(assumeReadOnly),
|
H A D | SQLiteQuery.java | 36 SQLiteQuery(SQLiteDatabase db, String query, CancellationSignal cancellationSignal) { argument 37 super(db, query, null, cancellationSignal);
|
H A D | SQLiteQueryBuilder.java | 265 * @param db the database to query on 291 public Cursor query(SQLiteDatabase db, String[] projectionIn, argument 294 return query(db, projectionIn, selection, selectionArgs, groupBy, having, sortOrder, 302 * @param db the database to query on 330 public Cursor query(SQLiteDatabase db, String[] projectionIn, argument 333 return query(db, projectionIn, selection, selectionArgs, 341 * @param db the database to query on 372 public Cursor query(SQLiteDatabase db, String[] projectionIn, argument 389 db.validateSql(sqlForValidation, cancellationSignal); // will throw if query is invalid 399 return db [all...] |
H A D | SQLiteStatement.java | 30 SQLiteStatement(SQLiteDatabase db, String sql, Object[] bindArgs) { argument 31 super(db, sql, bindArgs, null);
|
/frameworks/base/core/java/com/android/internal/content/ |
H A D | SelectionBuilder.java | 99 public Cursor query(SQLiteDatabase db, String table, String[] columns, String orderBy) { argument 100 return query(db, table, columns, null, null, orderBy, null); 106 public Cursor query(SQLiteDatabase db, String table, String[] columns, String groupBy, argument 108 return db.query(table, columns, getSelection(), getSelectionArgs(), groupBy, having, 115 public int update(SQLiteDatabase db, String table, ContentValues values) { argument 116 return db.update(table, values, getSelection(), getSelectionArgs()); 122 public int delete(SQLiteDatabase db, String table) { argument 123 return db.delete(table, getSelection(), getSelectionArgs());
|
/frameworks/base/core/java/com/android/server/ |
H A D | BootReceiver.java | 117 final DropBoxManager db = (DropBoxManager) ctx.getSystemService(Context.DROPBOX_SERVICE); 131 if (recovery != null && db != null) { 132 db.addText("SYSTEM_RECOVERY_LOG", headers + recovery); 155 if (db != null) db.addText("SYSTEM_BOOT", headers); 158 addFileWithFootersToDropBox(db, timestamps, headers, lastKmsgFooter, 160 addFileWithFootersToDropBox(db, timestamps, headers, lastKmsgFooter, 162 addFileToDropBox(db, timestamps, headers, "/cache/recovery/log", -LOG_SIZE, 164 addFileToDropBox(db, timestamps, headers, "/cache/recovery/last_kmsg", 166 addAuditErrorsToDropBox(db, timestamp 205 addFileToDropBox( DropBoxManager db, HashMap<String, Long> timestamps, String headers, String filename, int maxSize, String tag) argument 211 addFileWithFootersToDropBox( DropBoxManager db, HashMap<String, Long> timestamps, String headers, String footers, String filename, int maxSize, String tag) argument 232 addAuditErrorsToDropBox(DropBoxManager db, HashMap<String, Long> timestamps, String headers, int maxSize, String tag) argument 264 addFsckErrorsToDropBox(DropBoxManager db, HashMap<String, Long> timestamps, String headers, int maxSize, String tag) argument [all...] |
/frameworks/base/core/jni/ |
H A D | android_database_SQLiteConnection.cpp | 82 sqlite3* const db; member in struct:android::SQLiteConnection 89 SQLiteConnection(sqlite3* db, int openFlags, const String8& path, const String8& label) : argument 90 db(db), openFlags(openFlags), path(path), label(label), canceled(false) { } 133 sqlite3* db; local 134 int err = sqlite3_open_v2(path.string(), &db, sqliteFlags, NULL); 141 if ((sqliteFlags & SQLITE_OPEN_READWRITE) && sqlite3_db_readonly(db, NULL)) { 142 throw_sqlite3_exception(env, db, "Could not open the database in read/write mode."); 143 sqlite3_close(db); 148 err = sqlite3_busy_timeout(db, BUSY_TIMEOUT_M [all...] |
H A D | android_hardware_location_ContextHubService.cpp | 112 static contextHubServiceDb_s db; member in namespace:android 118 if (hubHandle >= 0 && hubHandle < db.hubInfo.numHubs) { 119 return &db.hubInfo.hubs[hubHandle]; 128 return db.hubInfo.contextHubModule->send_message(info->hub_id, msg); 148 if (hubHandle < 0 || hubHandle >= db.hubInfo.numHubs) { 151 return db.hubInfo.hubs[hubHandle].hub_id; 156 if (!db.appInstances.count(id)) { 161 int hubHandle = db.appInstances[id].hubHandle; 163 return db.hubInfo.hubs[hubHandle].hub_id; 167 auto end = db [all...] |
/frameworks/base/core/tests/coretests/src/android/app/activity/ |
H A D | LocalProvider.java | 45 private static final String DATABASE_NAME = "local.db"; 53 public void onCreate(SQLiteDatabase db) { argument 54 db.execSQL("CREATE TABLE data (" + 60 db.execSQL("INSERT INTO data (text, integer) VALUES ('first data', 100);"); 64 public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) { argument 68 db.execSQL("DROP TABLE IF EXISTS data"); 69 onCreate(db); 103 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 104 Cursor ret = qb.query(db, projectionIn, selection, selectionArgs, 134 SQLiteDatabase db [all...] |
/frameworks/base/core/tests/coretests/src/android/content/ |
H A D | MemoryFileProvider.java | 63 private static final String DATABASE_NAME = "local.db"; 71 public void onCreate(SQLiteDatabase db) { argument 72 db.execSQL("CREATE TABLE data (" + 82 db.insert("data", null, values); 86 public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) { argument 90 db.execSQL("DROP TABLE IF EXISTS data"); 91 onCreate(db); 158 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 159 return DatabaseUtils.blobFileDescriptorForQuery(db, sql, null);
|
/frameworks/base/core/tests/coretests/src/android/database/ |
H A D | DatabaseStatementTest.java | 45 mDatabaseFile = new File(dbDir, "database_test.db"); 249 public StatementTestThread(SQLiteDatabase db, SQLiteStatement statement) { argument 251 mDatabase = db;
|
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/ |
H A D | RecentsProvider.java | 122 private static final String DB_NAME = "recents.db"; 134 public void onCreate(SQLiteDatabase db) { argument 136 db.execSQL("CREATE TABLE " + TABLE_RECENT + " (" + 142 db.execSQL("CREATE TABLE " + TABLE_STATE + " (" + 152 db.execSQL("CREATE TABLE " + TABLE_RESUME + " (" + 161 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 163 db.execSQL("DROP TABLE IF EXISTS " + TABLE_RECENT); 164 db.execSQL("DROP TABLE IF EXISTS " + TABLE_STATE); 165 db.execSQL("DROP TABLE IF EXISTS " + TABLE_RESUME); 166 onCreate(db); [all...] |
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/ |
H A D | MtpDatabase.java | 721 public void onCreate(SQLiteDatabase db) { argument 722 db.execSQL(QUERY_CREATE_DOCUMENTS); 723 db.execSQL(QUERY_CREATE_ROOT_EXTRA); 724 db.execSQL(QUERY_CREATE_LAST_BOOT_COUNT); 728 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 729 db.execSQL("DROP TABLE IF EXISTS " + TABLE_DOCUMENTS); 730 db.execSQL("DROP TABLE IF EXISTS " + TABLE_ROOT_EXTRA); 731 db.execSQL("DROP TABLE IF EXISTS " + TABLE_LAST_BOOT_COUNT); 732 onCreate(db);
|
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
H A D | DatabaseHelper.java | 77 private static final String DATABASE_NAME = "settings.db"; 111 // The owner gets the unadorned db name; 145 // No need to remove files if db is in memory 162 // No need to backup files if db is in memory 178 private void createSecureTable(SQLiteDatabase db) { argument 179 db.execSQL("CREATE TABLE secure (" + 184 db.execSQL("CREATE INDEX secureIndex1 ON secure (name);"); 187 private void createGlobalTable(SQLiteDatabase db) { argument 188 db.execSQL("CREATE TABLE global (" + 193 db 197 onCreate(SQLiteDatabase db) argument 251 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument 1961 recreateDatabase(SQLiteDatabase db, int oldVersion, int upgradeVersion, int currentVersion) argument 1990 moveSettingsToNewTable(SQLiteDatabase db, String sourceTable, String destTable, String[] settingsToMove, boolean doIgnore) argument 2028 movePrefixedSettingsToNewTable( SQLiteDatabase db, String sourceTable, String destTable, String[] prefixesToMove) argument 2062 upgradeLockPatternLocation(SQLiteDatabase db) argument 2086 upgradeScreenTimeoutFromNever(SQLiteDatabase db) argument 2110 upgradeVibrateSettingFromNone(SQLiteDatabase db) argument 2132 upgradeScreenTimeout(SQLiteDatabase db) argument 2149 upgradeAutoBrightness(SQLiteDatabase db) argument 2168 loadBookmarks(SQLiteDatabase db) argument 2255 loadVolumeLevels(SQLiteDatabase db) argument 2307 loadVibrateSetting(SQLiteDatabase db, boolean deleteOld) argument 2330 loadVibrateWhenRingingSetting(SQLiteDatabase db) argument 2348 loadSettings(SQLiteDatabase db) argument 2357 loadSystemSettings(SQLiteDatabase db) argument 2434 loadSecureSettings(SQLiteDatabase db) argument 2557 loadGlobalSettings(SQLiteDatabase db) argument 2753 getIntValueFromSystem(SQLiteDatabase db, String name, int defaultValue) argument 2757 getIntValueFromTable(SQLiteDatabase db, String table, String name, int defaultValue) argument 2763 getStringValueFromTable(SQLiteDatabase db, String table, String name, String defaultValue) argument [all...] |
/frameworks/base/packages/WAPPushManager/src/com/android/smspush/ |
H A D | WapPushManager.java | 53 private static final String DATABASE_NAME = "wappush.db"; 73 public void onCreate(SQLiteDatabase db) { argument 74 if (LOCAL_LOGV) Log.v(LOG_TAG, "db onCreate."); 88 db.execSQL(sql); 92 public void onUpgrade(SQLiteDatabase db, argument 96 db.execSQL( 98 onCreate(db); 118 protected queryData queryLastApp(SQLiteDatabase db, argument 123 Cursor cur = db.query(APPID_TABLE_NAME, 186 SQLiteDatabase db [all...] |
/frameworks/base/services/core/java/com/android/server/ |
H A D | LockSettingsStorage.java | 112 public void writeKeyValue(SQLiteDatabase db, String key, String value, int userId) { argument 118 db.beginTransaction(); 120 db.delete(TABLE, COLUMN_KEY + "=? AND " + COLUMN_USERID + "=?", 122 db.insert(TABLE, null, cv); 123 db.setTransactionSuccessful(); 126 db.endTransaction(); 142 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 143 if ((cursor = db.query(TABLE, COLUMNS_FOR_QUERY, 167 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 168 if ((cursor = db 469 initialize(SQLiteDatabase db) argument 486 createTable(SQLiteDatabase db) argument 496 onCreate(SQLiteDatabase db) argument 502 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument [all...] |
/frameworks/base/services/core/java/com/android/server/accounts/ |
H A D | AccountManagerService.java | 160 private static final String DATABASE_NAME = "accounts.db"; 215 private static final String PRE_N_DATABASE_NAME = "accounts.db"; 216 private static final String CE_DATABASE_NAME = "accounts_ce.db"; 217 private static final String DE_DATABASE_NAME = "accounts_de.db"; 438 final SQLiteDatabase db = accounts.openHelper.getWritableDatabase(); 442 Cursor metaCursor = db.query( 493 db.delete( 517 db.insertWithOnConflict(TABLE_META, null, values, SQLiteDatabase.CONFLICT_REPLACE); 520 Cursor cursor = db.query(TABLE_ACCOUNTS, 534 db 1261 insertExtraLocked(SQLiteDatabase db, long accountId, String key, String value) argument 1745 invalidateAuthTokenLocked(UserAccounts accounts, SQLiteDatabase db, String accountType, String authToken) argument 3728 getAccountIdFromSharedTable(SQLiteDatabase db, Account account) argument 3741 getAccountIdLocked(SQLiteDatabase db, Account account) argument 3754 getExtrasIdLocked(SQLiteDatabase db, long accountId, String key) argument 4241 createDebugTable(SQLiteDatabase db) argument 4266 logRecord(SQLiteDatabase db, String action, String tableName, long accountId, UserAccounts userAccount) argument 4274 logRecord(SQLiteDatabase db, String action, String tableName, long accountId, UserAccounts userAccount, int callingUid) argument 4293 initializeDebugDbSizeAndCompileSqlStatementForLogging(SQLiteDatabase db, UserAccounts userAccount) argument 4306 compileSqlStatementForLogging(SQLiteDatabase db, UserAccounts userAccount) argument 4312 getDebugTableRowCount(SQLiteDatabase db) argument 4321 getDebugTableInsertionPoint(SQLiteDatabase db) argument 4345 onCreate(SQLiteDatabase db) argument 4350 createSharedAccountsTable(SQLiteDatabase db) argument 4358 addLastSuccessfullAuthenticatedTimeColumn(SQLiteDatabase db) argument 4363 addOldAccountNameColumn(SQLiteDatabase db) argument 4367 addDebugTable(SQLiteDatabase db) argument 4371 createAccountsDeletionTrigger(SQLiteDatabase db) argument 4384 createGrantsTable(SQLiteDatabase db) argument 4393 populateMetaTableWithAuthTypeAndUID( SQLiteDatabase db, Map<String, Integer> authTypeAndUIDMap) argument 4411 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 4466 onOpen(SQLiteDatabase db) argument 4487 onCreate(SQLiteDatabase db) argument 4507 createSharedAccountsTable(SQLiteDatabase db) argument 4515 createAccountsDeletionTrigger(SQLiteDatabase db) argument 4524 createGrantsTable(SQLiteDatabase db) argument 4534 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 4570 onOpen(SQLiteDatabase db) argument 4651 onCreate(SQLiteDatabase db) argument 4677 createAccountsDeletionTrigger(SQLiteDatabase db) argument 4689 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 4712 onOpen(SQLiteDatabase db) argument 4716 findAccountPasswordByNameAndType(SQLiteDatabase db, String name, String type) argument 4731 findCeAccountsNotInDe(SQLiteDatabase db) argument 5435 writeUserDataIntoCacheLocked(UserAccounts accounts, final SQLiteDatabase db, Account account, String key, String value) argument 5461 writeAuthTokenIntoCacheLocked(UserAccounts accounts, final SQLiteDatabase db, Account account, String key, String value) argument 5501 readUserDataForAccountFromDatabaseLocked( final SQLiteDatabase db, Account account) argument 5521 readAuthTokensForAccountFromDatabaseLocked( final SQLiteDatabase db, Account account) argument [all...] |
/frameworks/base/services/core/java/com/android/server/notification/ |
H A D | NotificationUsageStats.java | 991 private static final String DB_NAME = "notification_log.db"; 1084 public void onCreate(SQLiteDatabase db) { 1085 db.execSQL("CREATE TABLE " + TAB_LOG + " (" + 1113 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { 1115 db.execSQL("DROP TABLE IF EXISTS " + TAB_LOG); 1116 onCreate(db); 1140 SQLiteDatabase db = mHelper.getReadableDatabase(); 1143 Cursor cursor = db.rawQuery(q, null); 1171 SQLiteDatabase db = mHelper.getReadableDatabase(); 1174 Cursor cursor = db 1220 pruneIfNecessary(SQLiteDatabase db) argument [all...] |
/frameworks/base/services/tests/servicestests/src/com/android/server/accounts/ |
H A D | PreNTestDatabaseHelper.java | 39 public void onCreate(SQLiteDatabase db) { argument 40 db.execSQL("CREATE TABLE accounts ( " 46 db.execSQL("INSERT INTO accounts (name, type, password) VALUES " 49 db.execSQL("CREATE TABLE authtokens ( " 55 db.execSQL("INSERT INTO authtokens (accounts_id, type, authtoken) VALUES " 58 db.execSQL("CREATE TABLE grants ( " 64 db.execSQL("CREATE TABLE extras ( " 71 db.execSQL("CREATE TABLE meta ( " 75 db.execSQL("" 88 public void onUpgrade(SQLiteDatabase db, in argument [all...] |