/frameworks/base/core/java/android/database/sqlite/ |
H A D | SQLiteOpenHelper.java | 207 SQLiteDatabase db = mDatabase; 211 if (db != null) { 212 if (writable && db.isReadOnly()) { 213 db.reopenReadWrite(); 216 db = SQLiteDatabase.create(null); 221 db = SQLiteDatabase.openDatabase(path, mFactory, 224 db = mContext.openOrCreateDatabase(mName, mEnableWriteAheadLogging ? 235 db = SQLiteDatabase.openDatabase(path, mFactory, 240 onConfigure(db); 242 final int version = db 312 onConfigure(SQLiteDatabase db) argument 320 onCreate(SQLiteDatabase db) argument 342 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 360 onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 378 onOpen(SQLiteDatabase db) argument [all...] |
H A D | SQLiteQuery.java | 36 SQLiteQuery(SQLiteDatabase db, String query, CancellationSignal cancellationSignal) { argument 37 super(db, query, null, cancellationSignal);
|
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 | SQLiteDirectCursorDriver.java | 35 public SQLiteDirectCursorDriver(SQLiteDatabase db, String sql, String editTable, argument 37 mDatabase = db;
|
H A D | SQLiteStatement.java | 30 SQLiteStatement(SQLiteDatabase db, String sql, Object[] bindArgs) { argument 31 super(db, sql, bindArgs, null);
|
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...] |
/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/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; 122 private void createSecureTable(SQLiteDatabase db) { argument 123 db.execSQL("CREATE TABLE secure (" + 128 db.execSQL("CREATE INDEX secureIndex1 ON secure (name);"); 131 private void createGlobalTable(SQLiteDatabase db) { argument 132 db.execSQL("CREATE TABLE global (" + 137 db.execSQL("CREATE INDEX globalIndex1 ON global (name);"); 141 public void onCreate(SQLiteDatabase db) { argument 142 db 195 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument 1559 moveSettingsToNewTable(SQLiteDatabase db, String sourceTable, String destTable, String[] settingsToMove, boolean doIgnore) argument 1597 movePrefixedSettingsToNewTable( SQLiteDatabase db, String sourceTable, String destTable, String[] prefixesToMove) argument 1631 upgradeLockPatternLocation(SQLiteDatabase db) argument 1655 upgradeScreenTimeoutFromNever(SQLiteDatabase db) argument 1679 upgradeVibrateSettingFromNone(SQLiteDatabase db) argument 1701 upgradeScreenTimeout(SQLiteDatabase db) argument 1718 upgradeAutoBrightness(SQLiteDatabase db) argument 1737 loadBookmarks(SQLiteDatabase db) argument 1824 loadVolumeLevels(SQLiteDatabase db) argument 1879 loadVibrateSetting(SQLiteDatabase db, boolean deleteOld) argument 1902 loadVibrateWhenRingingSetting(SQLiteDatabase db) argument 1920 loadSettings(SQLiteDatabase db) argument 1929 loadSystemSettings(SQLiteDatabase db) argument 1998 loadSecureSettings(SQLiteDatabase db) argument 2095 loadGlobalSettings(SQLiteDatabase db) argument 2267 getIntValueFromSystem(SQLiteDatabase db, String name, int defaultValue) argument 2271 getIntValueFromTable(SQLiteDatabase db, String table, String name, int defaultValue) argument 2277 getStringValueFromTable(SQLiteDatabase db, String table, String name, String defaultValue) argument [all...] |
H A D | SettingsProvider.java | 347 // the db file itself will be deleted automatically, but we need to tear down 364 Slog.i(TAG, "Installing settings db helper and caches for user " + userHandle); 381 // Initialization of the db *outside* the locks. It's possible that racing 384 // manages concurrency itself, and it's important that we not run the db 386 SQLiteDatabase db = dbhelper.getWritableDatabase(); 390 // separately, and of course it has to run after the db file 394 SettingsFileObserver observer = new SettingsFileObserver(userHandle, db.getPath()); 435 SQLiteDatabase db = dbHelper.getReadableDatabase(); 436 Cursor c = db.query( 580 // fast path: owner 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/base/services/java/com/android/server/ |
H A D | BootReceiver.java | 97 final DropBoxManager db = (DropBoxManager) ctx.getSystemService(Context.DROPBOX_SERVICE); 111 if (recovery != null && db != null) { 112 db.addText("SYSTEM_RECOVERY_LOG", headers + recovery); 118 if (db != null) db.addText("SYSTEM_BOOT", headers); 121 addFileToDropBox(db, prefs, headers, "/proc/last_kmsg", 123 addFileToDropBox(db, prefs, headers, "/cache/recovery/log", 125 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_console", 127 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_threads", 130 if (db ! 157 addFileToDropBox( DropBoxManager db, SharedPreferences prefs, String headers, String filename, int maxSize, String tag) argument [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/tests/DumpRenderTree2/src/com/android/dumprendertree2/ |
H A D | SummarizerDBHelper.java | 53 private static final void createTables(SQLiteDatabase db) { argument 60 db.execSQL(cmd); 64 private static final void dropTables(SQLiteDatabase db) { argument 66 db.execSQL("DROP TABLE IF EXISTS " + tableName); 76 public void onCreate(SQLiteDatabase db) { argument 77 dropTables(db); 78 createTables(db); 82 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 83 /** NOOP for now, because we will never upgrade the db */ 86 public void reset(SQLiteDatabase db) { argument [all...] |
/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/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/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 127 Cursor cur = db.rawQuery(sql, null); 182 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/jni/ |
H A D | android_database_SQLiteConnection.cpp | 79 sqlite3* const db; member in struct:android::SQLiteConnection 86 SQLiteConnection(sqlite3* db, int openFlags, const String8& path, const String8& label) : argument 87 db(db), openFlags(openFlags), path(path), label(label), canceled(false) { } 130 sqlite3* db; local 131 int err = sqlite3_open_v2(path.string(), &db, sqliteFlags, NULL); 138 if ((sqliteFlags & SQLITE_OPEN_READWRITE) && sqlite3_db_readonly(db, NULL)) { 139 throw_sqlite3_exception(env, db, "Could not open the database in read/write mode."); 140 sqlite3_close(db); 145 err = sqlite3_busy_timeout(db, BUSY_TIMEOUT_M [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/core/java/com/android/internal/widget/ |
H A D | LockSettingsService.java | 274 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); 285 db.beginTransaction(); 286 db.delete(TABLE, COLUMN_USERID + "='" + userId + "'", null); 287 db.setTransactionSuccessful(); 289 db.endTransaction(); 313 private void writeToDb(SQLiteDatabase db, String key, String value, int userId) { argument 319 db.beginTransaction(); 321 db.delete(TABLE, COLUMN_KEY + "=? AND " + COLUMN_USERID + "=?", 323 db.insert(TABLE, null, cv); 324 db 357 createTable(SQLiteDatabase db) argument 367 onCreate(SQLiteDatabase db) argument 372 initializeDefaults(SQLiteDatabase db) argument 382 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument [all...] |
/frameworks/base/core/java/android/accounts/ |
H A D | AccountManagerService.java | 94 private static final String DATABASE_NAME = "accounts.db"; 282 final SQLiteDatabase db = accounts.openHelper.getWritableDatabase(); 283 final Cursor cursor = db.query(TABLE_GRANTS, 295 db.delete(TABLE_GRANTS, GRANTS_GRANTEE_UID + "=?", 333 final SQLiteDatabase db = accounts.openHelper.getWritableDatabase(); 335 Cursor cursor = db.query(TABLE_ACCOUNTS, 350 db.delete(TABLE_ACCOUNTS, ACCOUNTS_ID + "=" + accountId, null); 452 final SQLiteDatabase db = accounts.openHelper.getReadableDatabase(); 453 Cursor cursor = db.query(TABLE_ACCOUNTS, new String[]{ACCOUNTS_PASSWORD}, 536 final SQLiteDatabase db 578 insertExtraLocked(SQLiteDatabase db, long accountId, String key, String value) argument 778 invalidateAuthTokenLocked(UserAccounts accounts, SQLiteDatabase db, String accountType, String authToken) argument 1622 getAccountIdLocked(SQLiteDatabase db, Account account) argument 1635 getExtrasIdLocked(SQLiteDatabase db, long accountId, String key) argument 1963 onCreate(SQLiteDatabase db) argument 1994 createAccountsDeletionTrigger(SQLiteDatabase db) argument 2007 createGrantsTable(SQLiteDatabase db) argument 2017 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 2041 onOpen(SQLiteDatabase db) argument 2454 writeUserDataIntoCacheLocked(UserAccounts accounts, final SQLiteDatabase db, Account account, String key, String value) argument 2468 writeAuthTokenIntoCacheLocked(UserAccounts accounts, final SQLiteDatabase db, Account account, String key, String value) argument 2509 readUserDataForAccountFromDatabaseLocked( final SQLiteDatabase db, Account account) argument 2529 readAuthTokensForAccountFromDatabaseLocked( final SQLiteDatabase db, Account account) argument [all...] |
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/ |
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/tests/coretests/src/android/database/ |
H A D | DatabaseErrorHandlerTest.java | 35 private static final String DB_NAME = "database_test.db"; 79 * this test used to produce a corrupted db. but with new sqlite it instead reports 81 * need to figure out how to cause corruption in db 94 SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null, 96 assertTrue(db.isDatabaseIntegrityOk());
|
/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, 795 * Utility method to run the query on the db an 798 longForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument 820 stringForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument 844 blobFileDescriptorForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument 1001 InsertHelper(SQLiteDatabase db, String tableName) argument [all...] |
/frameworks/base/core/java/android/webkit/ |
H A D | WebIconDatabaseClassic.java | 179 File db = new File(path); 180 if (!db.exists()) { 181 db.mkdirs(); 184 Message.obtain(null, EventHandler.OPEN, db.getAbsolutePath()));
|