Searched refs:db (Results 1 - 25 of 38) sorted by relevance

12

/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
H A DDatabaseHelper.java60 private static final String DATABASE_NAME = "settings.db";
93 private void createSecureTable(SQLiteDatabase db) { argument
94 db.execSQL("CREATE TABLE secure (" +
99 db.execSQL("CREATE INDEX secureIndex1 ON secure (name);");
103 public void onCreate(SQLiteDatabase db) { argument
104 db.execSQL("CREATE TABLE system (" +
109 db.execSQL("CREATE INDEX systemIndex1 ON system (name);");
111 createSecureTable(db);
113 db.execSQL("CREATE TABLE bluetooth_devices (" +
121 db
144 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument
1020 moveFromSystemToSecure(SQLiteDatabase db, String [] settingsToMove) argument
1052 upgradeLockPatternLocation(SQLiteDatabase db) argument
1076 upgradeScreenTimeoutFromNever(SQLiteDatabase db) argument
1100 upgradeVibrateSettingFromNone(SQLiteDatabase db) argument
1122 upgradeScreenTimeout(SQLiteDatabase db) argument
1139 upgradeAutoBrightness(SQLiteDatabase db) argument
1158 loadBookmarks(SQLiteDatabase db) argument
1245 loadVolumeLevels(SQLiteDatabase db) argument
1303 loadVibrateSetting(SQLiteDatabase db, boolean deleteOld) argument
1326 loadSettings(SQLiteDatabase db) argument
1331 loadSystemSettings(SQLiteDatabase db) argument
1449 loadSecureSettings(SQLiteDatabase db) argument
1595 getIntValueFromSystem(SQLiteDatabase db, String name, int defaultValue) argument
[all...]
/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteOpenHelper.java150 SQLiteDatabase db = null;
155 db = SQLiteDatabase.create(null);
157 db = mContext.openOrCreateDatabase(mName, 0, mFactory, mErrorHandler);
160 int version = db.getVersion();
162 db.beginTransaction();
165 onCreate(db);
168 onDowngrade(db, version, mNewVersion);
170 onUpgrade(db, version, mNewVersion);
173 db.setVersion(mNewVersion);
174 db
276 onCreate(SQLiteDatabase db) argument
293 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument
306 onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) argument
318 onOpen(SQLiteDatabase db) argument
[all...]
H A DSQLiteCompiledSql.java57 /* package */ SQLiteCompiledSql(SQLiteDatabase db, String sql) { argument
58 db.verifyDbIsOpen();
59 db.verifyLockOwner();
60 mDatabase = db;
67 nHandle = db.mNativeHandle;
140 buff.append(", db=");
H A DDatabaseConnectionPool.java51 /* package */ DatabaseConnectionPool(SQLiteDatabase db) { argument
52 this.mParentDbObj = db;
79 SQLiteDatabase db = null;
110 db = poolObj.mDb;
114 db = mParentDbObj.createPoolConnection((short)(poolSize + 1));
115 poolObj = new PoolObj(db);
138 db = poolObj.mDb;
142 assert poolObj.mDb == db;
148 return db;
155 * @param db th
157 release(SQLiteDatabase db) argument
249 isDatabaseObjFree(SQLiteDatabase db) argument
279 PoolObj(SQLiteDatabase db) argument
[all...]
H A DSQLiteQuery.java48 * @param db The database that this query object is associated with
52 /* package */ SQLiteQuery(SQLiteDatabase db, String query, int offsetIndex, String[] bindArgs) { argument
53 super(db, query);
63 * @param db The database that this query object is associated with
66 /* package */ SQLiteQuery(SQLiteDatabase db, SQLiteQuery query) { argument
67 super(db, query.mSql);
H A DSQLiteDirectCursorDriver.java34 public SQLiteDirectCursorDriver(SQLiteDatabase db, String sql, String editTable) { argument
35 mDatabase = db;
H A DSQLiteDatabase.java542 * db.beginTransaction();
545 * db.setTransactionSuccessful();
547 * db.endTransaction();
566 * db.beginTransactionNonExclusive();
569 * db.setTransactionSuccessful();
571 * db.endTransaction();
591 * db.beginTransactionWithListener(listener);
594 * db.setTransactionSuccessful();
596 * db.endTransaction();
619 * db
942 newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) argument
2431 releaseDbConnection(SQLiteDatabase db) argument
[all...]
H A DSQLiteCursor.java67 * @param db a reference to a Database object that is already constructed
75 public SQLiteCursor(SQLiteDatabase db, SQLiteCursorDriver driver, argument
244 SQLiteDatabase db = null;
246 db = mQuery.mDatabase.getDatabaseHandle(mQuery.mSql);
252 if (!db.equals(mQuery.mDatabase)) {
256 db.lock(mQuery.mSql);
265 mQuery = new SQLiteQuery(db, mQuery);
271 db.unlock();
H A DSQLiteProgram.java93 /* package */ SQLiteProgram(SQLiteDatabase db, String sql) { argument
94 this(db, sql, null, true);
97 /* package */ SQLiteProgram(SQLiteDatabase db, String sql, Object[] bindArgs, argument
116 db.acquireReference();
117 db.addSQLiteClosable(this);
118 mDatabase = db;
119 nHandle = db.mNativeHandle;
H A DSQLiteQueryBuilder.java262 * @param db the database to query on
288 public Cursor query(SQLiteDatabase db, String[] projectionIn, argument
291 return query(db, projectionIn, selection, selectionArgs, groupBy, having, sortOrder,
299 * @param db the database to query on
327 public Cursor query(SQLiteDatabase db, String[] projectionIn, argument
344 validateSql(db, sqlForValidation); // will throw if query is invalid
354 return db.rawQueryWithFactory(
363 private void validateSql(SQLiteDatabase db, String sql) { argument
364 db.lock(sql);
366 new SQLiteCompiledSql(db, sq
[all...]
H A DSQLiteStatement.java55 * @param db
58 /* package */ SQLiteStatement(SQLiteDatabase db, String sql, Object[] bindArgs) { argument
59 super(db, sql, bindArgs, false /* don't compile sql statement */);
219 SQLiteDatabase db = ((mStatementType & SQLiteProgram.STATEMENT_USE_POOLED_CONN) > 0)
223 mDatabase = db;
/frameworks/ex/common/java/com/android/common/content/
H A DSyncStateContentProviderHelper.java54 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/tests/LocationTracker/src/com/android/locationtracker/data/
H A DTrackerProvider.java40 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 DBootReceiver.java85 final DropBoxManager db = (DropBoxManager) ctx.getSystemService(Context.DROPBOX_SERVICE);
97 if (recovery != null && db != null) {
98 db.addText("SYSTEM_RECOVERY_LOG", headers + recovery);
104 if (db != null) db.addText("SYSTEM_BOOT", headers);
107 addFileToDropBox(db, prefs, headers, "/proc/last_kmsg",
109 addFileToDropBox(db, prefs, headers, "/cache/recovery/log",
111 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_console",
113 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_threads",
116 if (db !
143 addFileToDropBox( DropBoxManager db, SharedPreferences prefs, String headers, String filename, int maxSize, String tag) argument
[all...]
/frameworks/base/test-runner/src/android/test/
H A DDatabaseTestUtils.java34 * @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 DSummarizerDBHelper.java53 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 DSelectionBuilder.java99 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/database/sqlite/
H A DDatabaseConnectionPoolTest.java47 mDatabaseFile = new File(dbDir, "database_test.db");
74 SQLiteDatabase db = mTestPool.get(TEST_SQL);
77 assertEquals(mDatabase, db.mParentConnObj);
80 assertFalse(mTestPool.isDatabaseObjFree(db));
82 mTestPool.release(db);
86 assertTrue(mTestPool.isDatabaseObjFree(db));
89 mTestPool.release(db);
106 SQLiteDatabase db = mTestPool.get(TEST_SQL);
107 assertFalse(dbObjs.contains(db));
108 dbObjs.add(db);
202 executeSqlOnDatabaseConn(SQLiteDatabase db, String sql) argument
[all...]
H A DSQLiteCursorTest.java40 mDatabaseFile = new File(dbDir, "sqlitecursor_test.db");
67 SQLiteDatabase db = cursor.getDatabase();
68 assertTrue(db.mConnectionNum > 0);
69 assertFalse(mDatabase.equals(db));
70 assertEquals(mDatabase, db.mParentConnObj);
71 assertTrue(pool.getConnectionList().contains(db));
72 assertTrue(db.isOpen());
76 assertEquals(db, dbAgain);
79 assertFalse(db.isOpen());
89 assertFalse(mDatabase.equals(db));
[all...]
H A DSQLiteDatabaseTest.java49 private static final String DB_NAME = "database_test.db";
97 SQLiteDatabase db = mDatabase.getDbConnection("select * from test");
98 assertNotNull(db);
99 assertFalse(mDatabase.equals(db));
100 assertTrue(db.isOpen());
104 assertFalse(db.isOpen());
124 SQLiteDatabase db = mDatabase.mConnectionPool.getConnectionList().get(0);
125 assertTrue(mDatabase.mConnectionPool.isDatabaseObjFree(db));
129 assertFalse(db.isOpen());
365 private SQLiteDatabase db field in class:SQLiteDatabaseTest.Writer
366 Writer(SQLiteDatabase db) argument
392 private SQLiteDatabase db = null; field in class:SQLiteDatabaseTest.Reader
397 Reader(SQLiteDatabase db, String table, Writer w, int readerNum) argument
417 ClassToTestSqlCompilationAndCaching(SQLiteDatabase db, String sql) argument
420 create(SQLiteDatabase db, String sql) argument
968 onCreate(SQLiteDatabase db) argument
969 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/app/activity/
H A DLocalProvider.java45 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 DWapPushManager.java53 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 DMemoryFileProvider.java63 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/java/android/content/
H A DSearchRecentSuggestionsProvider.java84 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/android/accounts/
H A DAccountManagerService.java82 private static final String DATABASE_NAME = "accounts.db";
223 final SQLiteDatabase db = mOpenHelper.getWritableDatabase();
224 final Cursor cursor = db.query(TABLE_GRANTS,
236 db.delete(TABLE_GRANTS, GRANTS_GRANTEE_UID + "=?",
247 final SQLiteDatabase db = mOpenHelper.getWritableDatabase();
249 Cursor cursor = db.query(TABLE_ACCOUNTS,
264 db.delete(TABLE_ACCOUNTS, ACCOUNTS_ID + "=" + accountId, null);
326 final SQLiteDatabase db = mOpenHelper.getReadableDatabase();
327 Cursor cursor = db.query(TABLE_ACCOUNTS, new String[]{ACCOUNTS_PASSWORD},
406 final SQLiteDatabase db
448 insertExtraLocked(SQLiteDatabase db, long accountId, String key, String value) argument
638 invalidateAuthTokenLocked(SQLiteDatabase db, String accountType, String authToken) argument
1395 getAccountIdLocked(SQLiteDatabase db, Account account) argument
1408 getExtrasIdLocked(SQLiteDatabase db, long accountId, String key) argument
1718 onCreate(SQLiteDatabase db) argument
1749 createAccountsDeletionTrigger(SQLiteDatabase db) argument
1762 createGrantsTable(SQLiteDatabase db) argument
1772 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument
1796 onOpen(SQLiteDatabase db) argument
2169 writeUserDataIntoCacheLocked(final SQLiteDatabase db, Account account, String key, String value) argument
2183 writeAuthTokenIntoCacheLocked(final SQLiteDatabase db, Account account, String key, String value) argument
2223 readUserDataForAccountFromDatabaseLocked( final SQLiteDatabase db, Account account) argument
2243 readAuthTokensForAccountFromDatabaseLocked( final SQLiteDatabase db, Account account) argument
[all...]

Completed in 518 milliseconds

12