/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/base/core/java/android/app/ |
H A D | ContextImpl.java | 854 SQLiteDatabase db = SQLiteDatabase.openDatabase(f.getPath(), factory, flags, errorHandler); 856 return db;
|
/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...] |
H A D | SyncStorageEngine.java | 1853 File file = mContext.getDatabasePath("syncmanager.db"); 1858 SQLiteDatabase db = null; 1860 db = SQLiteDatabase.openDatabase(path, null, 1865 if (db != null) { 1866 final boolean hasType = db.getVersion() >= 11; 1869 if (DEBUG_FILE) Log.v(TAG, "Reading legacy sync accounts db"); 1893 Cursor c = qb.query(db, null, null, null, null, null, null); 1942 c = qb.query(db, null, null, null, null, null, null); 1966 db.close();
|
/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/database/sqlite/ |
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 | 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 2170 newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) argument [all...] |
H A D | SQLiteDirectCursorDriver.java | 35 public SQLiteDirectCursorDriver(SQLiteDatabase db, String sql, String editTable, argument 37 mDatabase = db;
|
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 | 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 | SQLiteQuery.java | 36 SQLiteQuery(SQLiteDatabase db, String query, CancellationSignal cancellationSignal) { argument 37 super(db, query, null, cancellationSignal);
|
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 | SQLiteStatement.java | 30 SQLiteStatement(SQLiteDatabase db, String sql, Object[] bindArgs) { argument 31 super(db, sql, bindArgs, null);
|
/frameworks/base/core/java/android/view/ |
H A D | View.java | 16405 final Rect db = dr.getBounds(); 16410 if (db.left > 0) { 16411 //Log.i("VIEW", "Drawable left " + db.left + " > view 0"); 16412 r.op(0, 0, db.left, h, Region.Op.UNION); 16414 if (db.right < w) { 16415 //Log.i("VIEW", "Drawable right " + db.right + " < view " + w); 16416 r.op(db.right, 0, w, h, Region.Op.UNION); 16418 if (db.top > 0) { 16419 //Log.i("VIEW", "Drawable top " + db.top + " > view 0"); 16420 r.op(0, 0, w, db [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()));
|
/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/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/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/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 | DatabaseCursorTest.java | 55 mDatabaseFile = new File(dbDir, "database_test.db"); 447 SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, 449 return new SQLiteCursor(db, masterQuery, editTable, query) {
|
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());
|
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/media/java/android/mtp/ |
H A D | MtpDatabase.java | 198 SQLiteDatabase db = null; 201 db = context.openOrCreateDatabase("device-properties", Context.MODE_PRIVATE, null); 202 if (db != null) { 203 c = db.query("properties", new String[] { "_id", "code", "value" }, 219 if (db != null) db.close();
|
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
H A D | DatabaseHelper.java | 65 private static final String DATABASE_NAME = "settings.db"; 96 // The owner gets the unadorned db name; 119 private void createSecureTable(SQLiteDatabase db) { argument 120 db.execSQL("CREATE TABLE secure (" + 125 db.execSQL("CREATE INDEX secureIndex1 ON secure (name);"); 128 private void createGlobalTable(SQLiteDatabase db) { argument 129 db.execSQL("CREATE TABLE global (" + 134 db.execSQL("CREATE INDEX globalIndex1 ON global (name);"); 138 public void onCreate(SQLiteDatabase db) { argument 139 db 184 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument 1529 moveSettingsToNewTable(SQLiteDatabase db, String sourceTable, String destTable, String[] settingsToMove, boolean doIgnore) argument 1567 movePrefixedSettingsToNewTable( SQLiteDatabase db, String sourceTable, String destTable, String[] prefixesToMove) argument 1601 upgradeLockPatternLocation(SQLiteDatabase db) argument 1625 upgradeScreenTimeoutFromNever(SQLiteDatabase db) argument 1649 upgradeVibrateSettingFromNone(SQLiteDatabase db) argument 1671 upgradeScreenTimeout(SQLiteDatabase db) argument 1688 upgradeAutoBrightness(SQLiteDatabase db) argument 1707 loadBookmarks(SQLiteDatabase db) argument 1794 loadVolumeLevels(SQLiteDatabase db) argument 1849 loadVibrateSetting(SQLiteDatabase db, boolean deleteOld) argument 1872 loadVibrateWhenRingingSetting(SQLiteDatabase db) argument 1890 loadSettings(SQLiteDatabase db) argument 1899 loadSystemSettings(SQLiteDatabase db) argument 1968 loadSecureSettings(SQLiteDatabase db) argument 2065 loadGlobalSettings(SQLiteDatabase db) argument 2235 getIntValueFromSystem(SQLiteDatabase db, String name, int defaultValue) argument 2239 getIntValueFromTable(SQLiteDatabase db, String table, String name, int defaultValue) argument 2245 getStringValueFromTable(SQLiteDatabase db, String table, String name, String defaultValue) argument [all...] |