/frameworks/base/core/java/android/database/sqlite/ |
H A D | SQLiteOpenHelper.java | 111 SQLiteDatabase db = null; 116 db = SQLiteDatabase.create(null); 118 db = mContext.openOrCreateDatabase(mName, 0, mFactory); 121 int version = db.getVersion(); 123 db.beginTransaction(); 126 onCreate(db); 130 version + " to " + mNewVersion + ": " + db.getPath()); 132 onUpgrade(db, version, mNewVersion); 134 db.setVersion(mNewVersion); 135 db 231 onCreate(SQLiteDatabase db) argument 248 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 257 onOpen(SQLiteDatabase db) argument [all...] |
H A D | SQLiteCompiledSql.java | 57 /* package */ SQLiteCompiledSql(SQLiteDatabase db, String sql) { argument 58 if (!db.isOpen()) { 59 throw new IllegalStateException("database " + db.getPath() + " already closed"); 61 mDatabase = db; 64 this.nHandle = db.mNativeHandle;
|
H A D | SQLiteContentHelper.java | 38 * @param db Handle to a readable database. 46 public static AssetFileDescriptor getBlobColumnAsAssetFile(SQLiteDatabase db, String sql, argument 49 MemoryFile file = simpleQueryForBlobMemoryFile(db, sql, selectionArgs); 69 private static MemoryFile simpleQueryForBlobMemoryFile(SQLiteDatabase db, String sql, argument 71 Cursor cursor = db.rawQuery(sql, selectionArgs);
|
H A D | SQLiteProgram.java | 61 /* package */ SQLiteProgram(SQLiteDatabase db, String sql) { argument 62 mDatabase = db; 64 db.acquireReference(); 65 db.addSQLiteClosable(this); 66 this.nHandle = db.mNativeHandle; 73 mCompiledSql = new SQLiteCompiledSql(db, sql); 80 mCompiledSql = db.getCompiledStatementForSql(sql); 83 mCompiledSql = new SQLiteCompiledSql(db, sql); 89 db.addToCompiledQueries(sql, mCompiledSql); 103 mCompiledSql = new SQLiteCompiledSql(db, sq [all...] |
H A D | SQLiteDirectCursorDriver.java | 34 public SQLiteDirectCursorDriver(SQLiteDatabase db, String sql, String editTable) { argument 35 mDatabase = db;
|
H A D | SQLiteStatement.java | 37 * @param db 40 /* package */ SQLiteStatement(SQLiteDatabase db, String sql) { argument 41 super(db, sql);
|
H A D | SQLiteQuery.java | 44 * @param db The database that this query object is associated with 48 /* package */ SQLiteQuery(SQLiteDatabase db, String query, int offsetIndex, String[] bindArgs) { argument 49 super(db, query);
|
H A D | SQLiteCursor.java | 204 * @param db a reference to a Database object that is already constructed 210 public SQLiteCursor(SQLiteDatabase db, SQLiteCursorDriver driver, argument 215 mDatabase = db; 222 db.lock(); 243 db.unlock();
|
H A D | SQLiteQueryBuilder.java | 251 * @param db the database to query on 277 public Cursor query(SQLiteDatabase db, String[] projectionIn, argument 280 return query(db, projectionIn, selection, selectionArgs, groupBy, having, sortOrder, 288 * @param db the database to query on 316 public Cursor query(SQLiteDatabase db, String[] projectionIn, argument 330 return db.rawQueryWithFactory(
|
H A D | SQLiteDatabase.java | 293 private static final String LOG_SLOW_QUERIES_PROPERTY = "db.log.slow_query_threshold"; 471 * db.beginTransaction(); 474 * db.setTransactionSuccessful(); 476 * db.endTransaction(); 493 * db.beginTransactionWithListener(listener); 496 * db.setTransactionSuccessful(); 498 * db.endTransaction(); 663 * @deprecated if the db is locked more than once (becuase of nested transactions) then the lock 797 public Cursor newCursor(SQLiteDatabase db, argument 1920 sQueryLogTimeInMillis = SystemProperties.getInt("db 2222 getPragmaVal(SQLiteDatabase db, String pragma) argument [all...] |
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
H A D | DatabaseHelper.java | 61 private static final String DATABASE_NAME = "settings.db"; 94 private void createSecureTable(SQLiteDatabase db) { argument 95 db.execSQL("CREATE TABLE secure (" + 100 db.execSQL("CREATE INDEX secureIndex1 ON secure (name);"); 104 public void onCreate(SQLiteDatabase db) { argument 105 db.execSQL("CREATE TABLE system (" + 110 db.execSQL("CREATE INDEX systemIndex1 ON system (name);"); 112 createSecureTable(db); 114 db.execSQL("CREATE TABLE bluetooth_devices (" + 122 db 145 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument 762 moveFromSystemToSecure(SQLiteDatabase db, String [] settingsToMove) argument 794 upgradeLockPatternLocation(SQLiteDatabase db) argument 818 upgradeScreenTimeoutFromNever(SQLiteDatabase db) argument 848 loadBookmarks(SQLiteDatabase db, int startingIndex) argument 924 loadBookmarks(SQLiteDatabase db) argument 934 loadVolumeLevels(SQLiteDatabase db) argument 981 loadVibrateSetting(SQLiteDatabase db, boolean deleteOld) argument 1003 loadSettings(SQLiteDatabase db) argument 1008 loadSystemSettings(SQLiteDatabase db) argument 1118 loadSecureSettings(SQLiteDatabase db) argument [all...] |
H A D | SettingsProvider.java | 269 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 270 sObserverInstance = new SettingsFileObserver(db.getPath()); 291 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 292 Cursor c = db.query( 382 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 385 cursor = db.query(table, COLUMN_VALUE, "name=?", new String[]{key}, 404 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 415 Cursor cursor = db.rawQuery("PRAGMA table_info(favorites);", null); 428 Cursor ret = qb.query(db, select, args.where, args.args, null, null, sort); 455 SQLiteDatabase db [all...] |
/frameworks/base/core/java/com/android/internal/content/ |
H A D | SyncStateContentProviderHelper.java | 58 public void createDatabase(SQLiteDatabase db) { argument 59 db.execSQL("DROP TABLE IF EXISTS " + SYNC_STATE_TABLE); 60 db.execSQL("CREATE TABLE " + SYNC_STATE_TABLE + " (" 68 db.execSQL("DROP TABLE IF EXISTS " + SYNC_STATE_META_TABLE); 69 db.execSQL("CREATE TABLE " + SYNC_STATE_META_TABLE + " (" 73 db.insert(SYNC_STATE_META_TABLE, SYNC_STATE_META_VERSION_COLUMN, values); 76 public void onDatabaseOpened(SQLiteDatabase db) { argument 77 long version = DatabaseUtils.longForQuery(db, 81 createDatabase(db); 85 public Cursor query(SQLiteDatabase db, Strin argument 91 insert(SQLiteDatabase db, ContentValues values) argument 95 delete(SQLiteDatabase db, String userWhere, String[] whereArgs) argument 99 update(SQLiteDatabase db, ContentValues values, String selection, String[] selectionArgs) argument 104 update(SQLiteDatabase db, long rowId, Object data) argument 117 onAccountsChanged(SQLiteDatabase db, Account[] accounts) argument [all...] |
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/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/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/services/java/com/android/server/ |
H A D | BootReceiver.java | 98 final DropBoxManager db = (DropBoxManager) ctx.getSystemService(Context.DROPBOX_SERVICE); 110 if (recovery != null && db != null) { 111 db.addText("SYSTEM_RECOVERY_LOG", headers + recovery); 117 if (db != null) db.addText("SYSTEM_BOOT", headers); 120 addFileToDropBox(db, prefs, headers, "/proc/last_kmsg", 122 addFileToDropBox(db, prefs, headers, "/cache/recovery/log", 124 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_console", 126 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_threads", 129 if (db ! 156 addFileToDropBox( DropBoxManager db, SharedPreferences prefs, String headers, String filename, int maxSize, String tag) argument [all...] |
H A D | BatteryService.java | 378 DropBoxManager db = (DropBoxManager) mContext.getSystemService(Context.DROPBOX_SERVICE); 379 if (db == null || !db.isTagEnabled("BATTERY_DISCHARGE_INFO")) return; 391 db.addFile("BATTERY_DISCHARGE_INFO", dumpFile, DropBoxManager.IS_TEXT);
|
/frameworks/base/core/tests/coretests/src/android/app/activity/ |
H A D | LocalProvider.java | 46 private static final String DATABASE_NAME = "local.db"; 54 public void onCreate(SQLiteDatabase db) { argument 55 db.execSQL("CREATE TABLE data (" + 61 db.execSQL("INSERT INTO data (text, integer) VALUES ('first data', 100);"); 65 public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) { argument 69 db.execSQL("DROP TABLE IF EXISTS data"); 70 onCreate(db); 104 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 105 Cursor ret = qb.query(db, projectionIn, selection, selectionArgs, 135 SQLiteDatabase db [all...] |
/frameworks/base/core/java/android/accounts/ |
H A D | AccountManagerService.java | 89 private static final String DATABASE_NAME = "accounts.db"; 236 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); 237 Cursor cursor = db.query(TABLE_ACCOUNTS, 249 db.delete(TABLE_ACCOUNTS, ACCOUNTS_ID + "=" + accountId, null); 263 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); 264 Cursor cursor = db.query(TABLE_ACCOUNTS, 274 db.delete(TABLE_ACCOUNTS, ACCOUNTS_ID + "=" + accountId, null); 302 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 303 Cursor cursor = db.query(TABLE_ACCOUNTS, new String[]{ACCOUNTS_PASSWORD}, 333 SQLiteDatabase db 449 insertExtra(SQLiteDatabase db, long accountId, String key, String value) argument 608 invalidateAuthToken(SQLiteDatabase db, String accountType, String authToken) argument 1291 getAccountId(SQLiteDatabase db, Account account) argument 1304 getExtrasId(SQLiteDatabase db, long accountId, String key) argument 1589 onCreate(SQLiteDatabase db) argument 1620 createAccountsDeletionTrigger(SQLiteDatabase db) argument 1633 createGrantsTable(SQLiteDatabase db) argument 1643 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 1667 onOpen(SQLiteDatabase db) argument [all...] |
/frameworks/base/core/java/android/content/ |
H A D | SearchRecentSuggestionsProvider.java | 78 private static final String sDatabaseName = "suggestions.db"; 131 public void onCreate(SQLiteDatabase db) { argument 142 db.execSQL(builder.toString()); 146 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 149 db.execSQL("DROP TABLE IF EXISTS suggestions"); 150 onCreate(db); 214 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); 224 count = db.delete(sSuggestions, selection, selectionArgs); 261 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); 273 rowID = db [all...] |
/frameworks/base/core/tests/coretests/src/android/content/ |
H A D | MemoryFileProvider.java | 68 private static final String DATABASE_NAME = "local.db"; 76 public void onCreate(SQLiteDatabase db) { argument 77 db.execSQL("CREATE TABLE data (" + 87 db.insert("data", null, values); 91 public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) { argument 95 db.execSQL("DROP TABLE IF EXISTS data"); 96 onCreate(db); 168 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 169 MemoryFile file = simpleQueryForBlobMemoryFile(db, sql); 180 private MemoryFile simpleQueryForBlobMemoryFile(SQLiteDatabase db, Strin argument [all...] |
/frameworks/base/tests/CoreTests/android/core/ |
H A D | DatabaseSessionCache.java | 59 public static final String DATABASE_NAME = "ssl_sessions.db"; 154 // We want a single db per VM. 293 public void onCreate(SQLiteDatabase db) { argument 294 db.execSQL("CREATE TABLE " + SSL_CACHE_TABLE + " (" + 300 db.execSQL("CREATE INDEX ssl_sessions_idx1 ON ssl_sessions (" + 305 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 306 db.execSQL("DROP TABLE IF EXISTS " + SSL_CACHE_TABLE ); 307 onCreate(db);
|
/frameworks/base/core/java/android/database/ |
H A D | DatabaseUtils.java | 602 * @param db the database the table is in 606 public static long queryNumEntries(SQLiteDatabase db, String table) { argument 607 Cursor cursor = db.query(table, countProjection, 618 * Utility method to run the query on the db and return the value in the 621 public static long longForQuery(SQLiteDatabase db, String query, String[] selectionArgs) { argument 622 SQLiteStatement prog = db.compileStatement(query); 646 * Utility method to run the query on the db and return the value in the 649 public static String stringForQuery(SQLiteDatabase db, String query, String[] selectionArgs) { argument 650 SQLiteStatement prog = db.compileStatement(query); 793 * @param db th 796 InsertHelper(SQLiteDatabase db, String tableName) argument [all...] |
/frameworks/base/core/java/android/webkit/ |
H A D | WebIconDatabase.java | 202 File db = new File(path); 203 if (!db.exists()) { 204 db.mkdirs(); 207 Message.obtain(null, EventHandler.OPEN, db.getAbsolutePath()));
|