/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
D | DatabaseHelper.java | 93 private void createSecureTable(SQLiteDatabase db) { in createSecureTable() argument 94 db.execSQL("CREATE TABLE secure (" + in createSecureTable() 99 db.execSQL("CREATE INDEX secureIndex1 ON secure (name);"); in createSecureTable() 103 public void onCreate(SQLiteDatabase db) { in onCreate() argument 104 db.execSQL("CREATE TABLE system (" + in onCreate() 109 db.execSQL("CREATE INDEX systemIndex1 ON system (name);"); in onCreate() 111 createSecureTable(db); in onCreate() 113 db.execSQL("CREATE TABLE bluetooth_devices (" + in onCreate() 121 db.execSQL("CREATE TABLE bookmarks (" + in onCreate() 130 db.execSQL("CREATE INDEX bookmarksIndex1 ON bookmarks (folder);"); in onCreate() [all …]
|
D | SettingsProvider.java | 262 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in onCreate() local 263 db.enableWriteAheadLogging(); in onCreate() 264 sObserverInstance = new SettingsFileObserver(db.getPath()); in onCreate() 285 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in fullyPopulateCache() local 286 Cursor c = db.query( in fullyPopulateCache() 376 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in lookupValue() local 379 cursor = db.query(table, COLUMN_VALUE, "name=?", new String[]{key}, in lookupValue() 398 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in query() local 409 Cursor cursor = db.rawQuery("PRAGMA table_info(favorites);", null); in query() 422 Cursor ret = qb.query(db, select, args.where, args.args, null, null, sort); in query() [all …]
|
/frameworks/base/core/java/android/database/sqlite/ |
D | SQLiteOpenHelper.java | 150 SQLiteDatabase db = null; in getWritableDatabase() local 155 db = SQLiteDatabase.create(null); in getWritableDatabase() 157 db = mContext.openOrCreateDatabase(mName, 0, mFactory, mErrorHandler); in getWritableDatabase() 160 int version = db.getVersion(); in getWritableDatabase() 162 db.beginTransaction(); in getWritableDatabase() 165 onCreate(db); in getWritableDatabase() 168 onDowngrade(db, version, mNewVersion); in getWritableDatabase() 170 onUpgrade(db, version, mNewVersion); in getWritableDatabase() 173 db.setVersion(mNewVersion); in getWritableDatabase() 174 db.setTransactionSuccessful(); in getWritableDatabase() [all …]
|
D | DatabaseConnectionPool.java | 51 /* package */ DatabaseConnectionPool(SQLiteDatabase db) { in DatabaseConnectionPool() argument 52 this.mParentDbObj = db; in DatabaseConnectionPool() 79 SQLiteDatabase db = null; in get() local 110 db = poolObj.mDb; in get() 114 db = mParentDbObj.createPoolConnection((short)(poolSize + 1)); in get() 115 poolObj = new PoolObj(db); in get() 138 db = poolObj.mDb; in get() 142 assert poolObj.mDb == db; in get() local 148 return db; in get() 157 /* package */ synchronized void release(SQLiteDatabase db) { in release() argument [all …]
|
D | SQLiteCompiledSql.java | 57 /* package */ SQLiteCompiledSql(SQLiteDatabase db, String sql) { in SQLiteCompiledSql() argument 58 db.verifyDbIsOpen(); in SQLiteCompiledSql() 59 db.verifyLockOwner(); in SQLiteCompiledSql() 60 mDatabase = db; in SQLiteCompiledSql() 63 nHandle = db.mNativeHandle; in SQLiteCompiledSql()
|
D | SQLiteDatabase.java | 820 SQLiteDatabase db = (isPooledConnection()) ? mParentConnObj : this; in amIInTransaction() local 821 boolean b = (!db.inTransaction()) ? false : in amIInTransaction() 822 db.mTransactionUsingExecSql || db.mLock.isHeldByCurrentThread(); in amIInTransaction() 946 public Cursor newCursor(SQLiteDatabase db, 1011 SQLiteDatabase db = new SQLiteDatabase(path, factory, flags, errorHandler, connectionNum); 1017 db.dbopen(path, flags); 1018 db.setLocale(Locale.getDefault()); 1020 db.enableSqlTracing(path, connectionNum); 1023 db.enableSqlProfiling(path, connectionNum); 1025 return db; [all …]
|
D | SQLiteQuery.java | 50 /* package */ SQLiteQuery(SQLiteDatabase db, String query, int offsetIndex, String[] bindArgs) { in SQLiteQuery() argument 51 super(db, query); in SQLiteQuery() 64 /* package */ SQLiteQuery(SQLiteDatabase db, SQLiteQuery query) { in SQLiteQuery() argument 65 super(db, query.mSql); in SQLiteQuery()
|
D | SQLiteProgram.java | 93 /* package */ SQLiteProgram(SQLiteDatabase db, String sql) { in SQLiteProgram() argument 94 this(db, sql, null, true); in SQLiteProgram() 97 /* package */ SQLiteProgram(SQLiteDatabase db, String sql, Object[] bindArgs, in SQLiteProgram() argument 116 db.acquireReference(); in SQLiteProgram() 117 db.addSQLiteClosable(this); in SQLiteProgram() 118 mDatabase = db; in SQLiteProgram() 119 nHandle = db.mNativeHandle; in SQLiteProgram()
|
D | SQLiteCursor.java | 75 public SQLiteCursor(SQLiteDatabase db, SQLiteCursorDriver driver, in SQLiteCursor() argument 240 SQLiteDatabase db = null; in requery() local 242 db = mQuery.mDatabase.getDatabaseHandle(mQuery.mSql); in requery() 248 if (!db.equals(mQuery.mDatabase)) { in requery() 252 db.lock(mQuery.mSql); in requery() 261 mQuery = new SQLiteQuery(db, mQuery); in requery() 267 db.unlock(); in requery()
|
D | SQLiteQueryBuilder.java | 288 public Cursor query(SQLiteDatabase db, String[] projectionIn, in query() argument 291 return query(db, projectionIn, selection, selectionArgs, groupBy, having, sortOrder, in query() 327 public Cursor query(SQLiteDatabase db, String[] projectionIn, in query() argument 344 validateSql(db, sqlForValidation); // will throw if query is invalid in query() 354 return db.rawQueryWithFactory( in query() 363 private void validateSql(SQLiteDatabase db, String sql) { in validateSql() argument 364 db.lock(sql); in validateSql() 366 new SQLiteCompiledSql(db, sql).releaseSqlStatement(); in validateSql() 368 db.unlock(); in validateSql()
|
/frameworks/ex/common/java/com/android/common/content/ |
D | SyncStateContentProviderHelper.java | 54 public void createDatabase(SQLiteDatabase db) { in createDatabase() argument 55 db.execSQL("DROP TABLE IF EXISTS " + SYNC_STATE_TABLE); in createDatabase() 56 db.execSQL("CREATE TABLE " + SYNC_STATE_TABLE + " (" in createDatabase() 64 db.execSQL("DROP TABLE IF EXISTS " + SYNC_STATE_META_TABLE); in createDatabase() 65 db.execSQL("CREATE TABLE " + SYNC_STATE_META_TABLE + " (" in createDatabase() 69 db.insert(SYNC_STATE_META_TABLE, SYNC_STATE_META_VERSION_COLUMN, values); in createDatabase() 72 public void onDatabaseOpened(SQLiteDatabase db) { in onDatabaseOpened() argument 73 long version = DatabaseUtils.longForQuery(db, in onDatabaseOpened() 77 createDatabase(db); in onDatabaseOpened() 81 public Cursor query(SQLiteDatabase db, String[] projection, in query() argument [all …]
|
/frameworks/base/services/java/com/android/server/ |
D | BootReceiver.java | 85 final DropBoxManager db = (DropBoxManager) ctx.getSystemService(Context.DROPBOX_SERVICE); in logBootEvents() local 97 if (recovery != null && db != null) { in logBootEvents() 98 db.addText("SYSTEM_RECOVERY_LOG", headers + recovery); in logBootEvents() 104 if (db != null) db.addText("SYSTEM_BOOT", headers); in logBootEvents() 107 addFileToDropBox(db, prefs, headers, "/proc/last_kmsg", in logBootEvents() 109 addFileToDropBox(db, prefs, headers, "/cache/recovery/log", in logBootEvents() 111 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_console", in logBootEvents() 113 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_threads", in logBootEvents() 116 if (db != null) db.addText("SYSTEM_RESTART", headers); in logBootEvents() 122 addFileToDropBox(db, prefs, headers, tombstoneFiles[i].getPath(), in logBootEvents() [all …]
|
/frameworks/base/core/tests/coretests/src/android/database/sqlite/ |
D | DatabaseConnectionPoolTest.java | 74 SQLiteDatabase db = mTestPool.get(TEST_SQL); in testGetAndRelease() local 77 assertEquals(mDatabase, db.mParentConnObj); in testGetAndRelease() 80 assertFalse(mTestPool.isDatabaseObjFree(db)); in testGetAndRelease() 82 mTestPool.release(db); in testGetAndRelease() 86 assertTrue(mTestPool.isDatabaseObjFree(db)); in testGetAndRelease() 89 mTestPool.release(db); in testGetAndRelease() 106 SQLiteDatabase db = mTestPool.get(TEST_SQL); in testGetAllConnAndOneMore() local 107 assertFalse(dbObjs.contains(db)); in testGetAllConnAndOneMore() 108 dbObjs.add(db); in testGetAllConnAndOneMore() 109 assertEquals(mDatabase, db.mParentConnObj); in testGetAllConnAndOneMore() [all …]
|
D | SQLiteCursorTest.java | 67 SQLiteDatabase db = cursor.getDatabase(); in testQueryObjReassignment() local 68 assertTrue(db.mConnectionNum > 0); in testQueryObjReassignment() 69 assertFalse(mDatabase.equals(db)); in testQueryObjReassignment() 70 assertEquals(mDatabase, db.mParentConnObj); in testQueryObjReassignment() 71 assertTrue(pool.getConnectionList().contains(db)); in testQueryObjReassignment() 72 assertTrue(db.isOpen()); in testQueryObjReassignment() 76 assertEquals(db, dbAgain); in testQueryObjReassignment() 79 assertFalse(db.isOpen()); in testQueryObjReassignment() 89 assertFalse(mDatabase.equals(db)); in testQueryObjReassignment() 93 db = cursor.getDatabase(); in testQueryObjReassignment() [all …]
|
D | SQLiteDatabaseTest.java | 97 SQLiteDatabase db = mDatabase.getDbConnection("select * from test"); in testDisableWriteAheadLogging() local 98 assertNotNull(db); in testDisableWriteAheadLogging() 99 assertFalse(mDatabase.equals(db)); in testDisableWriteAheadLogging() 100 assertTrue(db.isOpen()); in testDisableWriteAheadLogging() 104 assertFalse(db.isOpen()); in testDisableWriteAheadLogging() 124 SQLiteDatabase db = mDatabase.mConnectionPool.getConnectionList().get(0); in testCursorsWithClosedDbConnAfterDisableWriteAheadLogging() local 125 assertTrue(mDatabase.mConnectionPool.isDatabaseObjFree(db)); in testCursorsWithClosedDbConnAfterDisableWriteAheadLogging() 129 assertFalse(db.isOpen()); in testCursorsWithClosedDbConnAfterDisableWriteAheadLogging() 365 private SQLiteDatabase db = null; field in SQLiteDatabaseTest.Writer 366 public Writer(SQLiteDatabase db) { in Writer() argument [all …]
|
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/ |
D | TrackerProvider.java | 56 public void onCreate(SQLiteDatabase db) { in onCreate() argument 62 db.execSQL(queryBuilder.toString()); in onCreate() 63 db.setVersion(DB_VERSION); in onCreate() 67 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument 72 db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME); in onUpgrade() 73 onCreate(db); in onUpgrade() 87 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in delete() local 88 int result = db.delete(TABLE_NAME, selection, selectionArgs); in delete() 100 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in insert() local 101 long rowId = db.insert(TABLE_NAME, null, values); in insert() [all …]
|
/frameworks/base/packages/WAPPushManager/src/com/android/smspush/ |
D | WapPushManager.java | 73 public void onCreate(SQLiteDatabase db) { in onCreate() argument 88 db.execSQL(sql); in onCreate() 92 public void onUpgrade(SQLiteDatabase db, in onUpgrade() argument 118 protected queryData queryLastApp(SQLiteDatabase db, in queryLastApp() argument 127 Cursor cur = db.rawQuery(sql, null); in queryLastApp() 182 SQLiteDatabase db = dbh.getReadableDatabase(); in processMessage() local 183 WapPushManDBHelper.queryData lastapp = dbh.queryLastApp(db, app_id, content_type); in processMessage() 184 db.close(); in processMessage() 243 SQLiteDatabase db = dbh.getWritableDatabase(); in addPackage() local 244 WapPushManDBHelper.queryData lastapp = dbh.queryLastApp(db, x_app_id, content_type); in addPackage() [all …]
|
/frameworks/base/tests/DumpRenderTree2/src/com/android/dumprendertree2/ |
D | SummarizerDBHelper.java | 53 private static final void createTables(SQLiteDatabase db) { in createTables() argument 60 db.execSQL(cmd); in createTables() 64 private static final void dropTables(SQLiteDatabase db) { in dropTables() argument 66 db.execSQL("DROP TABLE IF EXISTS " + tableName); in dropTables() 76 public void onCreate(SQLiteDatabase db) { in onCreate() argument 77 dropTables(db); in onCreate() 78 createTables(db); in onCreate() 82 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument 86 public void reset(SQLiteDatabase db) { in reset() argument 87 dropTables(db); in reset() [all …]
|
/frameworks/base/core/tests/coretests/src/android/app/activity/ |
D | LocalProvider.java | 53 public void onCreate(SQLiteDatabase db) { in onCreate() argument 54 db.execSQL("CREATE TABLE data (" + in onCreate() 60 db.execSQL("INSERT INTO data (text, integer) VALUES ('first data', 100);"); in onCreate() 64 public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) { in onUpgrade() argument 68 db.execSQL("DROP TABLE IF EXISTS data"); in onUpgrade() 69 onCreate(db); in onUpgrade() 103 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in query() local 104 Cursor ret = qb.query(db, projectionIn, selection, selectionArgs, in query() 134 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in update() local 139 count = db.update("data", values, "_id=" + rowId, null); in update()
|
/frameworks/base/core/java/com/android/internal/content/ |
D | SelectionBuilder.java | 99 public Cursor query(SQLiteDatabase db, String table, String[] columns, String orderBy) { in query() argument 100 return query(db, table, columns, null, null, orderBy, null); in query() 106 public Cursor query(SQLiteDatabase db, String table, String[] columns, String groupBy, in query() argument 108 return db.query(table, columns, getSelection(), getSelectionArgs(), groupBy, having, in query() 115 public int update(SQLiteDatabase db, String table, ContentValues values) { in update() argument 116 return db.update(table, values, getSelection(), getSelectionArgs()); in update() 122 public int delete(SQLiteDatabase db, String table) { in delete() argument 123 return db.delete(table, getSelection(), getSelectionArgs()); in delete()
|
/frameworks/base/core/java/android/accounts/ |
D | AccountManagerService.java | 223 final SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in purgeOldGrants() local 224 final Cursor cursor = db.query(TABLE_GRANTS, in purgeOldGrants() 236 db.delete(TABLE_GRANTS, GRANTS_GRANTEE_UID + "=?", in purgeOldGrants() 247 final SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in validateAccountsAndPopulateCache() local 249 Cursor cursor = db.query(TABLE_ACCOUNTS, in validateAccountsAndPopulateCache() 264 db.delete(TABLE_ACCOUNTS, ACCOUNTS_ID + "=" + accountId, null); in validateAccountsAndPopulateCache() 326 final SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in readPasswordInternal() local 327 Cursor cursor = db.query(TABLE_ACCOUNTS, new String[]{ACCOUNTS_PASSWORD}, in readPasswordInternal() 406 final SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in addAccountInternal() local 407 db.beginTransaction(); in addAccountInternal() [all …]
|
/frameworks/base/core/java/android/content/ |
D | SearchRecentSuggestionsProvider.java | 131 public void onCreate(SQLiteDatabase db) { in onCreate() argument 142 db.execSQL(builder.toString()); in onCreate() 146 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument 149 db.execSQL("DROP TABLE IF EXISTS suggestions"); in onUpgrade() 150 onCreate(db); in onUpgrade() 220 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in delete() local 230 count = db.delete(sSuggestions, selection, selectionArgs); in delete() 267 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in insert() local 279 rowID = db.insert(sSuggestions, NULL_COLUMN, values); in insert() 315 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in query() local [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/ |
D | MemoryFileProvider.java | 71 public void onCreate(SQLiteDatabase db) { in onCreate() argument 72 db.execSQL("CREATE TABLE data (" + in onCreate() 82 db.insert("data", null, values); in onCreate() 86 public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) { in onUpgrade() argument 90 db.execSQL("DROP TABLE IF EXISTS data"); in onUpgrade() 91 onCreate(db); in onUpgrade() 158 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in getBlobColumnAsFile() local 159 return DatabaseUtils.blobFileDescriptorForQuery(db, sql, null); in getBlobColumnAsFile()
|
/frameworks/base/test-runner/src/android/test/ |
D | DatabaseTestUtils.java | 37 public static void assertSchemaEquals(SQLiteDatabase expectedDb, SQLiteDatabase db) { in assertSchemaEquals() argument 39 Set<String> schema = getSchemaSet(db); in assertSchemaEquals() 43 private static Set<String> getSchemaSet(SQLiteDatabase db) { in getSchemaSet() argument 46 Cursor entityCursor = db.rawQuery("SELECT sql FROM sqlite_master", null); in getSchemaSet()
|
/frameworks/base/core/java/android/database/ |
D | DatabaseUtils.java | 657 public static long queryNumEntries(SQLiteDatabase db, String table) { in queryNumEntries() argument 658 return queryNumEntries(db, table, null, null); in queryNumEntries() 670 public static long queryNumEntries(SQLiteDatabase db, String table, String selection) { in queryNumEntries() argument 671 return queryNumEntries(db, table, selection, null); in queryNumEntries() 687 public static long queryNumEntries(SQLiteDatabase db, String table, String selection, in queryNumEntries() argument 690 return longForQuery(db, "select count(*) from " + table + s, in queryNumEntries() 698 public static long longForQuery(SQLiteDatabase db, String query, String[] selectionArgs) { in longForQuery() argument 699 SQLiteStatement prog = db.compileStatement(query); in longForQuery() 720 public static String stringForQuery(SQLiteDatabase db, String query, String[] selectionArgs) { in stringForQuery() argument 721 SQLiteStatement prog = db.compileStatement(query); in stringForQuery() [all …]
|