/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
D | DatabaseHelper.java | 122 private void createSecureTable(SQLiteDatabase db) { in createSecureTable() argument 123 db.execSQL("CREATE TABLE secure (" + in createSecureTable() 128 db.execSQL("CREATE INDEX secureIndex1 ON secure (name);"); in createSecureTable() 131 private void createGlobalTable(SQLiteDatabase db) { in createGlobalTable() argument 132 db.execSQL("CREATE TABLE global (" + in createGlobalTable() 137 db.execSQL("CREATE INDEX globalIndex1 ON global (name);"); in createGlobalTable() 141 public void onCreate(SQLiteDatabase db) { in onCreate() argument 142 db.execSQL("CREATE TABLE system (" + in onCreate() 147 db.execSQL("CREATE INDEX systemIndex1 ON system (name);"); in onCreate() 149 createSecureTable(db); in onCreate() [all …]
|
D | SettingsProvider.java | 386 SQLiteDatabase db = dbhelper.getWritableDatabase(); in establishDbTracking() local 394 SettingsFileObserver observer = new SettingsFileObserver(userHandle, db.getPath()); in establishDbTracking() 435 SQLiteDatabase db = dbHelper.getReadableDatabase(); in fullyPopulateCache() local 436 Cursor c = db.query( in fullyPopulateCache() 636 SQLiteDatabase db = dbHelper.getReadableDatabase(); in lookupValue() local 639 cursor = db.query(table, COLUMN_VALUE, "name=?", new String[]{key}, in lookupValue() 667 SQLiteDatabase db = dbH.getReadableDatabase(); in queryForUser() local 678 Cursor cursor = db.rawQuery("PRAGMA table_info(favorites);", null); in queryForUser() 691 Cursor ret = qb.query(db, select, args.where, args.args, null, null, sort); in queryForUser() 732 SQLiteDatabase db = dbH.getWritableDatabase(); in bulkInsert() local [all …]
|
/frameworks/base/core/java/android/database/sqlite/ |
D | SQLiteOpenHelper.java | 207 SQLiteDatabase db = mDatabase; in getDatabaseLocked() local 211 if (db != null) { in getDatabaseLocked() 212 if (writable && db.isReadOnly()) { in getDatabaseLocked() 213 db.reopenReadWrite(); in getDatabaseLocked() 216 db = SQLiteDatabase.create(null); in getDatabaseLocked() 221 db = SQLiteDatabase.openDatabase(path, mFactory, in getDatabaseLocked() 224 db = mContext.openOrCreateDatabase(mName, mEnableWriteAheadLogging ? in getDatabaseLocked() 235 db = SQLiteDatabase.openDatabase(path, mFactory, in getDatabaseLocked() 240 onConfigure(db); in getDatabaseLocked() 242 final int version = db.getVersion(); in getDatabaseLocked() [all …]
|
D | SQLiteQueryBuilder.java | 291 public Cursor query(SQLiteDatabase db, String[] projectionIn, in query() argument 294 return query(db, projectionIn, selection, selectionArgs, groupBy, having, sortOrder, in query() 330 public Cursor query(SQLiteDatabase db, String[] projectionIn, in query() argument 333 return query(db, projectionIn, selection, selectionArgs, in query() 372 public Cursor query(SQLiteDatabase db, String[] projectionIn, in query() argument 389 validateQuerySql(db, sqlForValidation, in query() 400 return db.rawQueryWithFactory( in query() 410 private void validateQuerySql(SQLiteDatabase db, String sql, in validateQuerySql() argument 412 db.getThreadSession().prepare(sql, in validateQuerySql() 413 db.getThreadDefaultConnectionFlags(true /*readOnly*/), cancellationSignal, null); in validateQuerySql()
|
D | SQLiteProgram.java | 40 SQLiteProgram(SQLiteDatabase db, String sql, Object[] bindArgs, in SQLiteProgram() argument 42 mDatabase = db; in SQLiteProgram() 58 db.getThreadSession().prepare(mSql, in SQLiteProgram() 59 db.getThreadDefaultConnectionFlags(assumeReadOnly), in SQLiteProgram()
|
D | SQLiteQuery.java | 36 SQLiteQuery(SQLiteDatabase db, String query, CancellationSignal cancellationSignal) { in SQLiteQuery() argument 37 super(db, query, null, cancellationSignal); in SQLiteQuery()
|
D | SQLiteDirectCursorDriver.java | 35 public SQLiteDirectCursorDriver(SQLiteDatabase db, String sql, String editTable, in SQLiteDirectCursorDriver() argument 37 mDatabase = db; in SQLiteDirectCursorDriver()
|
/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 | 97 final DropBoxManager db = (DropBoxManager) ctx.getSystemService(Context.DROPBOX_SERVICE); in logBootEvents() local 111 if (recovery != null && db != null) { in logBootEvents() 112 db.addText("SYSTEM_RECOVERY_LOG", headers + recovery); in logBootEvents() 118 if (db != null) db.addText("SYSTEM_BOOT", headers); in logBootEvents() 121 addFileToDropBox(db, prefs, headers, "/proc/last_kmsg", in logBootEvents() 123 addFileToDropBox(db, prefs, headers, "/cache/recovery/log", in logBootEvents() 125 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_console", in logBootEvents() 127 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_threads", in logBootEvents() 130 if (db != null) db.addText("SYSTEM_RESTART", headers); in logBootEvents() 136 addFileToDropBox(db, prefs, headers, tombstoneFiles[i].getPath(), in logBootEvents() [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/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/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/jni/ |
D | android_database_SQLiteConnection.cpp | 79 sqlite3* const db; member 86 SQLiteConnection(sqlite3* db, int openFlags, const String8& path, const String8& label) : in SQLiteConnection() 87 db(db), openFlags(openFlags), path(path), label(label), canceled(false) { } in SQLiteConnection() 130 sqlite3* db; in nativeOpen() local 131 int err = sqlite3_open_v2(path.string(), &db, sqliteFlags, NULL); in nativeOpen() 138 if ((sqliteFlags & SQLITE_OPEN_READWRITE) && sqlite3_db_readonly(db, NULL)) { in nativeOpen() 139 throw_sqlite3_exception(env, db, "Could not open the database in read/write mode."); in nativeOpen() 140 sqlite3_close(db); in nativeOpen() 145 err = sqlite3_busy_timeout(db, BUSY_TIMEOUT_MS); in nativeOpen() 147 throw_sqlite3_exception(env, db, "Could not set busy timeout"); in nativeOpen() [all …]
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | LockSettingsService.java | 274 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in removeUser() local 285 db.beginTransaction(); in removeUser() 286 db.delete(TABLE, COLUMN_USERID + "='" + userId + "'", null); in removeUser() 287 db.setTransactionSuccessful(); in removeUser() 289 db.endTransaction(); in removeUser() 313 private void writeToDb(SQLiteDatabase db, String key, String value, int userId) { in writeToDb() argument 319 db.beginTransaction(); in writeToDb() 321 db.delete(TABLE, COLUMN_KEY + "=? AND " + COLUMN_USERID + "=?", in writeToDb() 323 db.insert(TABLE, null, cv); in writeToDb() 324 db.setTransactionSuccessful(); in writeToDb() [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 | 282 final SQLiteDatabase db = accounts.openHelper.getWritableDatabase(); in purgeOldGrants() local 283 final Cursor cursor = db.query(TABLE_GRANTS, in purgeOldGrants() 295 db.delete(TABLE_GRANTS, GRANTS_GRANTEE_UID + "=?", in purgeOldGrants() 333 final SQLiteDatabase db = accounts.openHelper.getWritableDatabase(); in validateAccountsInternal() local 335 Cursor cursor = db.query(TABLE_ACCOUNTS, in validateAccountsInternal() 350 db.delete(TABLE_ACCOUNTS, ACCOUNTS_ID + "=" + accountId, null); in validateAccountsInternal() 452 final SQLiteDatabase db = accounts.openHelper.getReadableDatabase(); in readPasswordInternal() local 453 Cursor cursor = db.query(TABLE_ACCOUNTS, new String[]{ACCOUNTS_PASSWORD}, in readPasswordInternal() 536 final SQLiteDatabase db = accounts.openHelper.getWritableDatabase(); in addAccountInternal() local 537 db.beginTransaction(); in addAccountInternal() [all …]
|
/frameworks/base/core/java/android/content/ |
D | SearchRecentSuggestionsProvider.java | 137 public void onCreate(SQLiteDatabase db) { in onCreate() argument 148 db.execSQL(builder.toString()); in onCreate() 152 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument 155 db.execSQL("DROP TABLE IF EXISTS suggestions"); in onUpgrade() 156 onCreate(db); in onUpgrade() 226 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in delete() local 236 count = db.delete(sSuggestions, selection, selectionArgs); in delete() 273 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in insert() local 285 rowID = db.insert(sSuggestions, NULL_COLUMN, values); in insert() 321 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/ml/bordeaux/service/src/android/bordeaux/services/ |
D | BordeauxSessionStorage.java | 70 public void onCreate(SQLiteDatabase db) { in onCreate() argument 71 db.execSQL(DATABASE_CREATE); in onCreate() 75 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument 79 db.execSQL("DROP TABLE IF EXISTS " + SESSION_TABLE); in onUpgrade() 80 onCreate(db); in onUpgrade()
|
/frameworks/base/core/java/android/database/ |
D | DatabaseUtils.java | 757 public static long queryNumEntries(SQLiteDatabase db, String table) { in queryNumEntries() argument 758 return queryNumEntries(db, table, null, null); in queryNumEntries() 770 public static long queryNumEntries(SQLiteDatabase db, String table, String selection) { in queryNumEntries() argument 771 return queryNumEntries(db, table, selection, null); in queryNumEntries() 787 public static long queryNumEntries(SQLiteDatabase db, String table, String selection, in queryNumEntries() argument 790 return longForQuery(db, "select count(*) from " + table + s, in queryNumEntries() 798 public static long longForQuery(SQLiteDatabase db, String query, String[] selectionArgs) { in longForQuery() argument 799 SQLiteStatement prog = db.compileStatement(query); in longForQuery() 820 public static String stringForQuery(SQLiteDatabase db, String query, String[] selectionArgs) { in stringForQuery() argument 821 SQLiteStatement prog = db.compileStatement(query); in stringForQuery() [all …]
|
/frameworks/base/docs/html/training/basics/data-storage/ |
D | databases.jd | 27 <li><a href="{@docRoot}guide/topics/data/data-storage.html#db">Using Databases</a></li> 155 public static final String DATABASE_NAME = "FeedReader.db"; 160 public void onCreate(SQLiteDatabase db) { 161 db.execSQL(SQL_CREATE_ENTRIES); 163 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { 166 db.execSQL(SQL_DELETE_ENTRIES); 167 onCreate(db); 169 public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { 170 onUpgrade(db, oldVersion, newVersion); 192 SQLiteDatabase db = mDbHelper.getWritableDatabase(); [all …]
|
/frameworks/base/docs/html/training/search/ |
D | search.jd | 88 public void onCreate(SQLiteDatabase db) { 89 mDatabase = db; 94 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { 97 db.execSQL("DROP TABLE IF EXISTS " + FTS_VIRTUAL_TABLE); 98 onCreate(db); 161 public void onCreate(SQLiteDatabase db) { 162 mDatabase = db; 205 DatabaseTable db = new DatabaseTable(this); 213 Cursor c = db.getWordMatches(query, null);
|
/frameworks/base/core/java/android/webkit/ |
D | WebIconDatabaseClassic.java | 179 File db = new File(path); in open() local 180 if (!db.exists()) { in open() 181 db.mkdirs(); in open() 184 Message.obtain(null, EventHandler.OPEN, db.getAbsolutePath())); in open()
|