/frameworks/base/test-runner/src/android/test/ |
H A D | DatabaseTestUtils.java | 34 * @param expectedDb the db that is known to have the correct schema 35 * @param db the db whose schema should be checked 37 public static void assertSchemaEquals(SQLiteDatabase expectedDb, SQLiteDatabase db) { argument 39 Set<String> schema = getSchemaSet(db); 43 private static Set<String> getSchemaSet(SQLiteDatabase db) { argument 46 Cursor entityCursor = db.rawQuery("SELECT sql FROM sqlite_master", null);
|
/frameworks/base/core/java/android/database/sqlite/ |
H A D | SQLiteQuery.java | 36 SQLiteQuery(SQLiteDatabase db, String query, CancellationSignal cancellationSignal) { argument 37 super(db, query, null, cancellationSignal);
|
H A D | SQLiteStatement.java | 30 SQLiteStatement(SQLiteDatabase db, String sql, Object[] bindArgs) { argument 31 super(db, sql, bindArgs, null);
|
H A D | SQLiteDirectCursorDriver.java | 35 public SQLiteDirectCursorDriver(SQLiteDatabase db, String sql, String editTable, argument 37 mDatabase = db;
|
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 | 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 | 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 validateQuerySql(db, sqlForValidation, 400 return db 410 validateQuerySql(SQLiteDatabase db, String sql, CancellationSignal cancellationSignal) argument [all...] |
H A D | SQLiteDatabase.java | 406 * db.beginTransaction(); 409 * db.setTransactionSuccessful(); 411 * db.endTransaction(); 430 * db.beginTransactionNonExclusive(); 433 * db.setTransactionSuccessful(); 435 * db.endTransaction(); 455 * db.beginTransactionWithListener(listener); 458 * db.setTransactionSuccessful(); 460 * db.endTransaction(); 483 * db 2181 newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) argument [all...] |
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/ |
H A D | AggregatorStorage.java | 44 public void onCreate(SQLiteDatabase db) { argument 45 db.execSQL(mTableCmd); 49 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 53 db.execSQL("DROP TABLE IF EXISTS " + mTableName); 54 onCreate(db);
|
H A D | BordeauxSessionStorage.java | 70 public void onCreate(SQLiteDatabase db) { argument 71 db.execSQL(DATABASE_CREATE); 75 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 79 db.execSQL("DROP TABLE IF EXISTS " + SESSION_TABLE); 80 onCreate(db);
|
/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 | 97 final DropBoxManager db = (DropBoxManager) ctx.getSystemService(Context.DROPBOX_SERVICE); 112 if (recovery != null && db != null) { 113 db.addText("SYSTEM_RECOVERY_LOG", headers + recovery); 135 if (db != null) db.addText("SYSTEM_BOOT", headers); 138 addFileWithFootersToDropBox(db, prefs, headers, lastKmsgFooter, 140 addFileWithFootersToDropBox(db, prefs, headers, lastKmsgFooter, 143 addFileToDropBox(db, prefs, headers, "/cache/recovery/log", 145 addFileToDropBox(db, prefs, headers, "/cache/recovery/last_kmsg", 147 addFileToDropBox(db, pref 185 addFileToDropBox( DropBoxManager db, SharedPreferences prefs, String headers, String filename, int maxSize, String tag) argument 192 addFileWithFootersToDropBox( DropBoxManager db, SharedPreferences prefs, String headers, String footers, String filename, int maxSize, String tag) argument 214 addAuditErrorsToDropBox(DropBoxManager db, SharedPreferences prefs, String headers, int maxSize, String tag) argument 247 addFsckErrorsToDropBox(DropBoxManager db, SharedPreferences prefs, String headers, int maxSize, String tag) argument [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/services/voiceinteraction/java/com/android/server/voiceinteraction/ |
H A D | DatabaseHelper.java | 42 private static final String NAME = "sound_model.db"; 74 public void onCreate(SQLiteDatabase db) { argument 76 db.execSQL(CREATE_TABLE_SOUND_MODEL); 80 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 82 db.execSQL("DROP TABLE IF EXISTS " + SoundModelContract.TABLE); 83 onCreate(db); 93 SQLiteDatabase db = getWritableDatabase(); 108 return db.insertWithOnConflict(SoundModelContract.TABLE, null, values, 111 db.close(); 132 SQLiteDatabase db [all...] |
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/ |
H A D | TrackerProvider.java | 40 private static final String DB_NAME = "tracking.db"; 56 public void onCreate(SQLiteDatabase db) { argument 62 db.execSQL(queryBuilder.toString()); 63 db.setVersion(DB_VERSION); 67 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 72 db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME); 73 onCreate(db); 87 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); 88 int result = db.delete(TABLE_NAME, selection, selectionArgs); 100 SQLiteDatabase db [all...] |
/frameworks/ex/common/java/com/android/common/content/ |
H A D | SyncStateContentProviderHelper.java | 54 public void createDatabase(SQLiteDatabase db) { argument 55 db.execSQL("DROP TABLE IF EXISTS " + SYNC_STATE_TABLE); 56 db.execSQL("CREATE TABLE " + SYNC_STATE_TABLE + " (" 64 db.execSQL("DROP TABLE IF EXISTS " + SYNC_STATE_META_TABLE); 65 db.execSQL("CREATE TABLE " + SYNC_STATE_META_TABLE + " (" 69 db.insert(SYNC_STATE_META_TABLE, SYNC_STATE_META_VERSION_COLUMN, values); 72 public void onDatabaseOpened(SQLiteDatabase db) { argument 73 long version = DatabaseUtils.longForQuery(db, 77 createDatabase(db); 81 public Cursor query(SQLiteDatabase db, Strin argument 87 insert(SQLiteDatabase db, ContentValues values) argument 91 delete(SQLiteDatabase db, String userWhere, String[] whereArgs) argument 95 update(SQLiteDatabase db, ContentValues values, String selection, String[] selectionArgs) argument 100 update(SQLiteDatabase db, long rowId, Object data) argument 113 onAccountsChanged(SQLiteDatabase db, Account[] accounts) argument [all...] |
/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/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/packages/DocumentsUI/src/com/android/documentsui/ |
H A D | RecentsProvider.java | 117 private static final String DB_NAME = "recents.db"; 129 public void onCreate(SQLiteDatabase db) { argument 131 db.execSQL("CREATE TABLE " + TABLE_RECENT + " (" + 137 db.execSQL("CREATE TABLE " + TABLE_STATE + " (" + 147 db.execSQL("CREATE TABLE " + TABLE_RESUME + " (" + 156 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 158 db.execSQL("DROP TABLE IF EXISTS " + TABLE_RECENT); 159 db.execSQL("DROP TABLE IF EXISTS " + TABLE_STATE); 160 db.execSQL("DROP TABLE IF EXISTS " + TABLE_RESUME); 161 onCreate(db); [all...] |
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
H A D | DatabaseHelper.java | 68 private static final String DATABASE_NAME = "settings.db"; 99 // The owner gets the unadorned db name; 121 private void createSecureTable(SQLiteDatabase db) { argument 122 db.execSQL("CREATE TABLE secure (" + 127 db.execSQL("CREATE INDEX secureIndex1 ON secure (name);"); 130 private void createGlobalTable(SQLiteDatabase db) { argument 131 db.execSQL("CREATE TABLE global (" + 136 db.execSQL("CREATE INDEX globalIndex1 ON global (name);"); 140 public void onCreate(SQLiteDatabase db) { argument 141 db 194 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument 1930 moveSettingsToNewTable(SQLiteDatabase db, String sourceTable, String destTable, String[] settingsToMove, boolean doIgnore) argument 1968 movePrefixedSettingsToNewTable( SQLiteDatabase db, String sourceTable, String destTable, String[] prefixesToMove) argument 2002 upgradeLockPatternLocation(SQLiteDatabase db) argument 2026 upgradeScreenTimeoutFromNever(SQLiteDatabase db) argument 2050 upgradeVibrateSettingFromNone(SQLiteDatabase db) argument 2072 upgradeScreenTimeout(SQLiteDatabase db) argument 2089 upgradeAutoBrightness(SQLiteDatabase db) argument 2108 loadBookmarks(SQLiteDatabase db) argument 2195 loadVolumeLevels(SQLiteDatabase db) argument 2250 loadVibrateSetting(SQLiteDatabase db, boolean deleteOld) argument 2273 loadVibrateWhenRingingSetting(SQLiteDatabase db) argument 2291 loadSettings(SQLiteDatabase db) argument 2300 loadSystemSettings(SQLiteDatabase db) argument 2369 loadSecureSettings(SQLiteDatabase db) argument 2484 loadGlobalSettings(SQLiteDatabase db) argument 2677 getIntValueFromSystem(SQLiteDatabase db, String name, int defaultValue) argument 2681 getIntValueFromTable(SQLiteDatabase db, String table, String name, int defaultValue) argument 2687 getStringValueFromTable(SQLiteDatabase db, String table, String name, String defaultValue) argument [all...] |
/frameworks/base/services/core/java/com/android/server/ |
H A D | LockSettingsStorage.java | 78 public void writeKeyValue(SQLiteDatabase db, String key, String value, int userId) { argument 84 db.beginTransaction(); 86 db.delete(TABLE, COLUMN_KEY + "=? AND " + COLUMN_USERID + "=?", 88 db.insert(TABLE, null, cv); 89 db.setTransactionSuccessful(); 92 db.endTransaction(); 108 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 109 if ((cursor = db.query(TABLE, COLUMNS_FOR_QUERY, 133 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 134 if ((cursor = db 328 initialize(SQLiteDatabase db) argument 345 createTable(SQLiteDatabase db) argument 355 onCreate(SQLiteDatabase db) argument 361 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument [all...] |
/frameworks/base/core/java/android/database/ |
H A D | DatabaseUtils.java | 753 * @param db the database the table is in 757 public static long queryNumEntries(SQLiteDatabase db, String table) { argument 758 return queryNumEntries(db, table, null, null); 763 * @param db the database the table is in 770 public static long queryNumEntries(SQLiteDatabase db, String table, String selection) { argument 771 return queryNumEntries(db, table, selection, null); 776 * @param db the database the table is in 787 public static long queryNumEntries(SQLiteDatabase db, String table, String selection, argument 790 return longForQuery(db, "select count(*) from " + table + s, 796 * @param db th 801 queryIsEmpty(SQLiteDatabase db, String table) argument 810 longForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument 832 stringForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument 856 blobFileDescriptorForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument 1013 InsertHelper(SQLiteDatabase db, String tableName) argument [all...] |