Home
last modified time | relevance | path

Searched refs:mDatabase (Results 1 – 21 of 21) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/database/
DDatabaseGeneralTest.java52 private SQLiteDatabase mDatabase; field in DatabaseGeneralTest
63 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); in setUp()
64 assertNotNull(mDatabase); in setUp()
65 mDatabase.setVersion(CURRENT_DATABASE_VERSION); in setUp()
70 mDatabase.close(); in tearDown()
85 mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);"); in populateDefaultTable()
87 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString1 + "');"); in populateDefaultTable()
88 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString2 + "');"); in populateDefaultTable()
89 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString3 + "');"); in populateDefaultTable()
94 assertEquals(CURRENT_DATABASE_VERSION, mDatabase.getVersion()); in testVersion()
[all …]
DNewDatabasePerformanceTests.java41 protected SQLiteDatabase mDatabase; field in NewDatabasePerformanceTests.PerformanceBase
49 mDatabase = in setUp()
52 assertTrue(mDatabase != null); in setUp()
53 mDatabase.setVersion(CURRENT_DATABASE_VERSION); in setUp()
57 mDatabase.close(); in tearDown()
123 mDatabase in setUp()
129 mDatabase.execSQL(statements[i]); in testRun()
155 mDatabase in setUp()
157 mDatabase.execSQL("CREATE INDEX i1c ON t1(c)"); in setUp()
162 mDatabase.execSQL(statements[i]); in testRun()
[all …]
DDatabaseStatementTest.java38 private SQLiteDatabase mDatabase; field in DatabaseStatementTest
50 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); in setUp()
51 assertNotNull(mDatabase); in setUp()
52 mDatabase.setVersion(CURRENT_DATABASE_VERSION); in setUp()
57 mDatabase.close(); in tearDown()
72 mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);"); in populateDefaultTable()
74 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString1 + "');"); in populateDefaultTable()
75 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString2 + "');"); in populateDefaultTable()
76 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString3 + "');"); in populateDefaultTable()
82 SQLiteStatement statement = mDatabase.compileStatement("DELETE FROM test"); in testExecuteStatement()
[all …]
DDatabasePerformanceTests.java81 protected SQLiteDatabase mDatabase; field in DatabasePerformanceTests.PerformanceBase
91 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); in setUp()
92 Assert.assertTrue(mDatabase != null); in setUp()
93 mDatabase.setVersion(CURRENT_DATABASE_VERSION); in setUp()
97 mDatabase.close(); in tearDown()
214 mDatabase in setUp()
221 mDatabase.execSQL(statements[i]); in run()
247 mDatabase in setUp()
249 mDatabase.execSQL("CREATE INDEX i1c ON t1(c)"); in setUp()
255 mDatabase.execSQL(statements[i]); in run()
[all …]
DDatabaseCursorTest.java48 private SQLiteDatabase mDatabase; field in DatabaseCursorTest
60 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); in setUp()
61 assertNotNull(mDatabase); in setUp()
62 mDatabase.setVersion(CURRENT_DATABASE_VERSION); in setUp()
67 mDatabase.close(); in tearDown()
82 mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);"); in populateDefaultTable()
84 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString1 + "');"); in populateDefaultTable()
85 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString2 + "');"); in populateDefaultTable()
86 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString3 + "');"); in populateDefaultTable()
92 mDatabase.execSQL( in testBlob()
[all …]
DDatabaseLockTest.java38 private SQLiteDatabase mDatabase; field in DatabaseLockTest
51 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); in setUp()
52 assertNotNull(mDatabase); in setUp()
57 mDatabase.close(); in tearDown()
74 mDatabase.beginTransaction(); in testLockFairness()
85 mDatabase.endTransaction(); in testLockFairness()
101 mDatabase.beginTransaction(); in run()
108 mDatabase.endTransaction(); in run()
126 mDatabase.beginTransaction(); in testLockLatency()
138 mDatabase.endTransaction(); in testLockLatency()
[all …]
DDatabaseStressTest.java34 private SQLiteDatabase mDatabase; field in DatabaseStressTest
47 mDatabase = c.openOrCreateDatabase("database_test.db", 0, null); in setUp()
49 assertNotNull(mDatabase); in setUp()
50 mDatabase.setVersion(CURRENT_DATABASE_VERSION); in setUp()
52 mDatabase.execSQL("CREATE TABLE IF NOT EXISTS test (_id INTEGER PRIMARY KEY, data TEXT);"); in setUp()
58 mDatabase.close(); in tearDown()
71 mDatabase.execSQL("INSERT INTO test (data) VALUES (?)", strArr); in testSingleThreadInsertDelete()
72 mDatabase.execSQL("delete from test;"); in testSingleThreadInsertDelete()
93 mDatabase.execSQL("INSERT INTO test (data) VALUES (?)", strArr); in testOutOfSpace()
DDatabaseLocaleTest.java33 private SQLiteDatabase mDatabase; field in DatabaseLocaleTest
48 mDatabase = SQLiteDatabase.create(null); in setUp()
49 mDatabase.execSQL( in setUp()
55 mDatabase.execSQL("INSERT INTO test (data) VALUES('" + s + "');"); in insertStrings()
61 mDatabase.close(); in tearDown()
67 Cursor c = mDatabase.rawQuery(sql, null); in query()
91 mDatabase.setLocale(new Locale("en", "US")); in testLocaleenUS()
114 mDatabase.execSQL("INSERT INTO test(id, data) VALUES(1, '" + expectedString + "')"); in testHoge()
115 cursor = mDatabase.rawQuery("SELECT data FROM test WHERE id = 1", null); in testHoge()
DDatabaseErrorHandlerTest.java33 private SQLiteDatabase mDatabase; field in DatabaseErrorHandlerTest
46 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null, in setUp()
48 assertNotNull(mDatabase); in setUp()
53 mDatabase.close(); in tearDown()
59 new MyDatabaseCorruptionHandler().onCorruption(mDatabase); in testNoCorruptionCase()
66 mDatabase.execSQL("create table t (i int);"); in testDatabaseIsCorrupt()
75 mDatabase.execSQL("select * from t;"); in testDatabaseIsCorrupt()
/frameworks/base/core/tests/coretests/src/android/database/sqlite/
DSQLiteCursorTest.java30 private SQLiteDatabase mDatabase; field in SQLiteCursorTest
42 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); in setUp()
43 assertNotNull(mDatabase); in setUp()
45 mDatabase.execSQL("CREATE TABLE " + TABLE_NAME + " (i int, j int);"); in setUp()
50 mDatabase.close(); in tearDown()
62 mDatabase.beginTransaction(); in testFillWindow()
63 mDatabase.execSQL("CREATE TABLE " + testTable + " (col1 int, desc text not null);"); in testFillWindow()
64 mDatabase.setTransactionSuccessful(); in testFillWindow()
65 mDatabase.endTransaction(); in testFillWindow()
82 mDatabase.beginTransaction(); in testFillWindow()
[all …]
/frameworks/base/core/java/android/database/sqlite/
DSQLiteOpenHelper.java58 private SQLiteDatabase mDatabase; field in SQLiteOpenHelper
130 if (mDatabase != null && mDatabase.isOpen() && !mDatabase.isReadOnly()) { in setWriteAheadLoggingEnabled()
132 mDatabase.enableWriteAheadLogging(); in setWriteAheadLoggingEnabled()
134 mDatabase.disableWriteAheadLogging(); in setWriteAheadLoggingEnabled()
192 if (mDatabase != null) { in getDatabaseLocked()
193 if (!mDatabase.isOpen()) { in getDatabaseLocked()
195 mDatabase = null; in getDatabaseLocked()
196 } else if (!writable || !mDatabase.isReadOnly()) { in getDatabaseLocked()
198 return mDatabase; in getDatabaseLocked()
206 SQLiteDatabase db = mDatabase; in getDatabaseLocked()
[all …]
DSQLiteProgram.java33 private final SQLiteDatabase mDatabase; field in SQLiteProgram
42 mDatabase = db; in SQLiteProgram()
84 return mDatabase; in getDatabase()
101 return mDatabase.getThreadSession(); in getSession()
106 return mDatabase.getThreadDefaultConnectionFlags(mReadOnly); in getConnectionFlags()
111 mDatabase.onCorruption(); in onCorruption()
DSQLiteDirectCursorDriver.java29 private final SQLiteDatabase mDatabase; field in SQLiteDirectCursorDriver
37 mDatabase = db; in SQLiteDirectCursorDriver()
44 final SQLiteQuery query = new SQLiteQuery(mDatabase, mSql, mCancellationSignal); in query()
52 cursor = factory.newCursor(mDatabase, this, mEditTable, query); in query()
/frameworks/av/media/mtp/
DMtpServer.cpp103 mDatabase(database), in MtpServer()
241 mDatabase->sessionEnded(); in run()
310 mDatabase->endSendObject((const char *)edit->mPath, edit->mHandle, edit->mFormat, true); in commitEdit()
442 MtpObjectFormatList* playbackFormats = mDatabase->getSupportedPlaybackFormats(); in doGetDeviceInfo()
443 MtpObjectFormatList* captureFormats = mDatabase->getSupportedCaptureFormats(); in doGetDeviceInfo()
444 MtpDevicePropertyList* deviceProperties = mDatabase->getSupportedDeviceProperties(); in doGetDeviceInfo()
501 mDatabase->sessionStarted(); in doOpenSession()
511 mDatabase->sessionEnded(); in doCloseSession()
554 MtpObjectPropertyList* properties = mDatabase->getSupportedObjectProperties(format); in doGetObjectPropsSupported()
571 MtpObjectHandleList* handles = mDatabase->getObjectList(storageID, format, parent); in doGetObjectHandles()
[all …]
DMtpServer.h40 MtpDatabase* mDatabase; variable
/frameworks/base/services/usage/java/com/android/server/usage/
DUserUsageStatsService.java47 private final UsageStatsDatabase mDatabase; field in UserUsageStatsService
60 mDatabase = new UsageStatsDatabase(usageStatsDir); in UserUsageStatsService()
67 mDatabase.init(currentTimeMillis); in init()
71 mCurrentStats[i] = mDatabase.getLatestUsageStats(i); in init()
123 mDatabase.onTimeChanged(newTime - oldTime); in onTimeChanged()
208 intervalType = mDatabase.findBestFitBucket(beginTime, endTime); in queryStats()
245 List<T> results = mDatabase.queryUsageStats(intervalType, beginTime, in queryStats()
325 mDatabase.putUsageStats(i, mCurrentStats[i]); in persistActiveStats()
360 mDatabase.prune(currentTimeMillis); in rolloverStats()
403 final long lastBeginTime = mDatabase.getLatestUsageStatsBeginTime(intervalType); in loadActiveStats()
[all …]
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/
DAggregatorRecordStorage.java72 mDatabase = mDbHelper.getWritableDatabase(); in AggregatorRecordStorage()
86 mDatabase.insert(mTableName, null, content); in addData()
95 Cursor cursor = mDatabase.rawQuery("select * from " + mTableName + ";", null); in getAllData()
116 int nDeleteRows = mDatabase.delete(mTableName, "1", null); in removeAllData()
DAggregatorStorage.java32 protected SQLiteDatabase mDatabase; field in AggregatorStorage
/frameworks/base/media/jni/
Dandroid_mtp_MtpDatabase.cpp93 jobject mDatabase; member in MyMtpDatabase
193 : mDatabase(env->NewGlobalRef(client)), in MyMtpDatabase()
218 env->DeleteGlobalRef(mDatabase); in cleanup()
235 MtpObjectHandle result = env->CallIntMethod(mDatabase, method_beginSendObject, in beginSendObject()
249 env->CallVoidMethod(mDatabase, method_endSendObject, pathStr, in endSendObject()
261 jintArray array = (jintArray)env->CallObjectMethod(mDatabase, method_getObjectList, in getObjectList()
281 int result = env->CallIntMethod(mDatabase, method_getNumObjects, in getNumObjects()
290 jintArray array = (jintArray)env->CallObjectMethod(mDatabase, in getSupportedPlaybackFormats()
308 jintArray array = (jintArray)env->CallObjectMethod(mDatabase, in getSupportedCaptureFormats()
326 jintArray array = (jintArray)env->CallObjectMethod(mDatabase, in getSupportedObjectProperties()
[all …]
/frameworks/base/docs/html/training/search/
Dsearch.jd74 private SQLiteDatabase mDatabase;
89 mDatabase = db;
90 mDatabase.execSQL(FTS_TABLE_CREATE);
152 return mDatabase.insert(FTS_VIRTUAL_TABLE, null, initialValues);
162 mDatabase = db;
163 mDatabase.execSQL(FTS_TABLE_CREATE);
/frameworks/base/media/java/android/mtp/
DMtpPropertyGroup.java50 private final MtpDatabase mDatabase; field in MtpPropertyGroup
70 mDatabase = database; in MtpPropertyGroup()