Home
last modified time | relevance | path

Searched refs:mTransactionManager (Results 1 – 25 of 26) sorted by relevance

12

/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/storage/
DTransactionManagerTest.java97 private TransactionManager mTransactionManager; field in TransactionManagerTest
102 mTransactionManager = mHealthConnectDatabaseTestRule.getTransactionManager(); in setup()
103 mTransactionTestUtils = new TransactionTestUtils(context, mTransactionManager); in setup()
125 mTransactionManager.readRecordsByIds(readTransactionRequest); in readRecordsById_returnsAllRecords()
150 List<RecordInternal<?>> records = mTransactionManager.readRecordsByIds(request); in readRecordsById_multipleRecordTypes_returnsAllRecords()
172 () -> mTransactionManager.readRecordsByIds(readTransactionRequest)); in readRecordsById_readByFilterRequest_throws()
200 mTransactionManager.readRecordsAndPageToken(readTransactionRequest); in readRecordsAndPageToken_returnsRecordsAndPageToken()
219 () -> mTransactionManager.readRecordsAndPageToken(readTransactionRequest)); in readRecordsAndPageToken_readByIdRequest_throws()
234 mTransactionManager.deleteAll(new DeleteTransactionRequest(TEST_PACKAGE_NAME, parcel)); in deleteAll_byId_generateChangeLogs()
256 mTransactionManager.deleteAll(new DeleteTransactionRequest(TEST_PACKAGE_NAME, parcel)); in deleteAll_byTimeFilter_generateChangeLogs()
[all …]
DNoMockAutoDeleteServiceTest.java47 private TransactionManager mTransactionManager; field in NoMockAutoDeleteServiceTest
53 mTransactionManager = testRule.getTransactionManager(); in setup()
54 DatabaseHelper.clearAllData(mTransactionManager); in setup()
55 mTransactionTestUtils = new TransactionTestUtils(context, mTransactionManager); in setup()
66 try (Cursor cursor = mTransactionManager.read(new ReadTableRequest(STEPS_TABLE_NAME))) { in startAutoDelete_changeLogsGenerated()
76 try (Cursor cursor = mTransactionManager.read(new ReadTableRequest(STEPS_TABLE_NAME))) { in startAutoDelete_changeLogsGenerated()
DTransactionManagerExerciseRoutesTest.java68 private TransactionManager mTransactionManager; field in TransactionManagerExerciseRoutesTest
76 mTransactionManager = testRule.getTransactionManager(); in setup()
77 mTransactionTestUtils = new TransactionTestUtils(context, mTransactionManager); in setup()
105 List<RecordInternal<?>> returnedRecords = mTransactionManager.readRecordsByIds(request); in readRecordsByIds_doesNotReturnRoutesOfOtherApps()
137 List<RecordInternal<?>> returnedRecords = mTransactionManager.readRecordsByIds(request); in readRecordsByIds_unknownApp_doesNotReturnRoute()
162 List<RecordInternal<?>> returnedRecords = mTransactionManager.readRecordsByIds(request); in readRecordsByIds_nullPackageName_doesNotReturnRoute()
187 List<RecordInternal<?>> returnedRecords = mTransactionManager.readRecordsByIds(request); in readRecordsByIds_unknownApp_withReadRoutePermission_returnsRoute()
224 mTransactionManager.readRecordsAndPageToken(request).first; in readRecordsAndPageToken_byFilters_doesNotReturnRoutesOfOtherApps()
263 mTransactionManager.readRecordsAndPageToken(request).first; in readRecordsAndPageToken_byFilters_unknownApp_doesNotReturnRoute()
294 mTransactionManager.readRecordsAndPageToken(request).first; in readRecordsAndPageToken_byFilters_nullPackageName_doesNotReturnRoute()
[all …]
DAutoDeleteServiceTest.java115 @Mock private TransactionManager mTransactionManager; field in AutoDeleteServiceTest
135 when(TransactionManager.getInitialisedInstance()).thenReturn(mTransactionManager); in testStartAutoDelete_getPreferenceReturnNull()
144 verify(mTransactionManager, Mockito.times(2)) in testStartAutoDelete_getPreferenceReturnNull()
158 when(TransactionManager.getInitialisedInstance()).thenReturn(mTransactionManager); in testStartAutoDelete_getPreferenceReturnNonNull()
169 verify(mTransactionManager, Mockito.times(2)) in testStartAutoDelete_getPreferenceReturnNonNull()
175 verify(mTransactionManager) in testStartAutoDelete_getPreferenceReturnNonNull()
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/migration/
DPriorityMigrationHelperTest.java76 @Mock private TransactionManager mTransactionManager; field in PriorityMigrationHelperTest
84 when(TransactionManager.getInitialisedInstance()).thenReturn(mTransactionManager); in setUp()
91 mPriorityMigrationHelper.clearData(mTransactionManager); in tearDown()
105 when(mTransactionManager.getNumberOfEntriesInTheTable(eq(PRE_MIGRATION_TABLE_NAME))) in testPopulatePreMigrationPriority_preMigrationPriorityExists_prioritySaved()
131 when(mTransactionManager.getNumberOfEntriesInTheTable(eq(PRE_MIGRATION_TABLE_NAME))) in testPopulatePreMigrationPriority_preMigrationTableIsPopulated_noOperationPerformed()
135 verify(mTransactionManager, never()).insert(any()); in testPopulatePreMigrationPriority_preMigrationTableIsPopulated_noOperationPerformed()
145 when(mTransactionManager.getNumberOfEntriesInTheTable(eq(PRE_MIGRATION_TABLE_NAME))) in testPopulatePreMigrationPriority_NoPreMigrationPriorityExists_placeholderSaved()
156 when(mTransactionManager.read(any())).thenReturn(mCursor); in testGetPreMigrationPriority_priorityReadFromDatabased()
179 mPriorityMigrationHelper.clearData(mTransactionManager); in testClearPreMigrationPriority_dataDeleted()
180 verify(mTransactionManager, times(1)) in testClearPreMigrationPriority_dataDeleted()
[all …]
DMigrationCleanerTest.java42 @Mock private TransactionManager mTransactionManager; field in MigrationCleanerTest
50 mCleaner = new MigrationCleaner(mTransactionManager, PriorityMigrationHelper.getInstance()); in before()
80 verify(mTransactionManager, never()).delete(any()); in testStateChanged_notComplete_noTablesCleared()
85 verify(mTransactionManager) in verifyMigrationEntityTableCleared()
95 verify(mTransactionManager) in verifyPriorityMigrationTableCleared()
DPriorityMigrationTest.java70 @Mock TransactionManager mTransactionManager; field in PriorityMigrationTest
95 .when(mTransactionManager) in setUp()
101 mTransactionManager, in setUp()
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DVoipCallTransactionTest.java51 private TransactionManager mTransactionManager; field in VoipCallTransactionTest
110 mTransactionManager = TransactionManager.getTestInstance(); in setUp()
117 mTransactionManager.clear(); in tearDown()
139 mTransactionManager.addTransaction(new SerialTransaction(subTransactions, mLock), in testSerialTransactionSuccess()
174 mTransactionManager.addTransaction(new SerialTransaction(subTransactions, mLock), in testSerialTransactionFailed()
199 mTransactionManager.addTransaction(new ParallelTransaction(subTransactions, mLock), in testParallelTransactionSuccess()
237 mTransactionManager.addTransaction(new ParallelTransaction(subTransactions, mLock), in testParallelTransactionFailed()
263 mTransactionManager.addTransaction(t, outcomeReceiver); in testTransactionTimeout()
289 mTransactionManager.addTransaction(t1, outcomeExceptionReceiver); in testTransactionException()
297 mTransactionManager.addTransaction(t2, outcomeReceiver); in testTransactionException()
[all …]
DTransactionalServiceWrapperTest.java70 @Mock private TransactionManager mTransactionManager; field in TransactionalServiceWrapperTest
88 mTransactionalServiceWrapper.setTransactionManager(mTransactionManager); in setUp()
135 verify(mTransactionManager, times(1)) in testCallControlSetActive()
150 verify(mTransactionManager, times(1)) in testCallControlRejectCall()
165 verify(mTransactionManager, times(1)) in testCallControlDisconnectCall()
179 verify(mTransactionManager, times(1)) in testCallControlSetInactive()
DTelecomServiceImplTest.java201 @Mock private TransactionManager mTransactionManager; field in TelecomServiceImplTest
261 telecomServiceImpl.setTransactionManager(mTransactionManager); in setUp()
462 verify(mTransactionManager, times(1)) in testAddCallWithOutgoingCall()
487 verify(mTransactionManager, times(1)) in testAddCallWithIncomingCall()
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/storage/datatypehelpers/
DRecordHelperTest.java66 private TransactionManager mTransactionManager; field in RecordHelperTest
71 mTransactionManager = testRule.getTransactionManager(); in setup()
72 DatabaseHelper.clearAllData(mTransactionManager); in setup()
73 mTransactionTestUtils = new TransactionTestUtils(context, mTransactionManager); in setup()
85 try (Cursor cursor = mTransactionManager.read(request)) { in getInternalRecords_insertThenRead_recordReturned()
105 try (Cursor cursor = mTransactionManager.read(request)) { in getInternalRecords_requestSizeMoreThanRecordNumber_recordsReturned()
124 try (Cursor cursor = mTransactionManager.read(request)) { in getInternalRecords_cursorHasTooManyData_throws()
162 try (Cursor cursor = mTransactionManager.read(request1)) { in getNextInternalRecordsPageAndToken_zeroOffsetDesc_correctResults()
180 try (Cursor cursor = mTransactionManager.read(request2)) { in getNextInternalRecordsPageAndToken_zeroOffsetDesc_correctResults()
246 try (Cursor cursor = mTransactionManager.read(request1)) { in getNextInternalRecordsPageAndToken_sameStartTimeAsc_correctResults()
[all …]
DHealthConnectDatabaseTestRule.java43 private TransactionManager mTransactionManager; field in HealthConnectDatabaseTestRule
59 mTransactionManager = TransactionManager.getInstance(mContext); in before()
65 DatabaseHelper.clearAllData(mTransactionManager); in after()
77 return mTransactionManager; in getTransactionManager()
DTransactionTestUtils.java66 private final TransactionManager mTransactionManager; field in TransactionTestUtils
71 mTransactionManager = transactionManager; in TransactionTestUtils()
77 mTransactionManager.insert( in insertApp()
92 return mTransactionManager.insertAll( in insertRecords()
163 mTransactionManager.insert( in insertAccessLog()
174 mTransactionManager.insert( in insertChangeLog()
185 try (Cursor cursor = mTransactionManager.read(readChangeLogsRequest)) { in getAllDeletedUuids()
DHealthDataCategoryPriorityHelperTest.java106 @Mock private TransactionManager mTransactionManager; field in HealthDataCategoryPriorityHelperTest
120 when(TransactionManager.getInitialisedInstance()).thenReturn(mTransactionManager); in setUp()
121 when(mTransactionManager.read(any())).thenReturn(mCursor); in setUp()
122 when(mTransactionManager.getCurrentUserHandle()).thenReturn(UserHandle.CURRENT); in setUp()
150 mHealthDataCategoryPriorityHelper.clearData(mTransactionManager); in setUp()
158 mHealthDataCategoryPriorityHelper.clearData(mTransactionManager); in tearDown()
160 clearInvocations(mTransactionManager); in tearDown()
175 verify(mTransactionManager, never()).insertOrReplace(any()); in testAppendToPriorityList_ifAppInList_doesNotAddToList()
193 verify(mTransactionManager) in testAppendToPriorityList_activeDefaultApp_addsToTopOfList()
214 verify(mTransactionManager) in testAppendToPriorityList_ifNonDefaultApp_addsToBottomOfList()
[all …]
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/exportimport/
DImportManagerTest.java80 private TransactionManager mTransactionManager; field in ImportManagerTest
88 mTransactionManager = mDatabaseTestRule.getTransactionManager(); in setUp()
89 mTransactionTestUtils = new TransactionTestUtils(mContext, mTransactionManager); in setUp()
100 DatabaseHelper.clearAllData(mTransactionManager); in tearDown()
120 File originalDb = mTransactionManager.getDatabasePath(); in copiesAllData()
128 DatabaseHelper.clearAllData(mTransactionManager); in copiesAllData()
142 List<RecordInternal<?>> records = mTransactionManager.readRecordsByIds(request); in copiesAllData()
158 File originalDb = mTransactionManager.getDatabasePath(); in skipsMissingTables()
177 DatabaseHelper.clearAllData(mTransactionManager); in skipsMissingTables()
191 List<RecordInternal<?>> records = mTransactionManager.readRecordsByIds(request); in skipsMissingTables()
[all …]
DExportManagerTest.java72 private TransactionManager mTransactionManager; field in ExportManagerTest
81 mTransactionManager = mDatabaseTestRule.getTransactionManager(); in setUp()
82 mTransactionTestUtils = new TransactionTestUtils(mContext, mTransactionManager); in setUp()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/migration/
DMigrationCleaner.java36 private final TransactionManager mTransactionManager; field in MigrationCleaner
43 mTransactionManager = transactionManager; in MigrationCleaner()
60 mMigrationEntityHelper.clearData(mTransactionManager); in clean()
66 mPriorityMigrationHelper.clearData(mTransactionManager); in clean()
DDataMigrationManager.java63 private final TransactionManager mTransactionManager; field in DataMigrationManager
81 mTransactionManager = transactionManager; in DataMigrationManager()
97 mTransactionManager.runAsTransaction( in apply()
141 long recordRowId = mTransactionManager.insertOrIgnore(db, parseRecord(payload)); in migrateRecord()
143 mTransactionManager.insertOrIgnore( in migrateRecord()
243 return mTransactionManager.insertOrIgnore(db, request) != -1; in insertEntityIdIfNotPresent()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/
DHealthConnectManagerService.java59 private final TransactionManager mTransactionManager; field in HealthConnectManagerService
89 mTransactionManager = in HealthConnectManagerService()
99 new MigrationCleaner(mTransactionManager, PriorityMigrationHelper.getInstance()); in HealthConnectManagerService()
109 mTransactionManager, in HealthConnectManagerService()
142 mTransactionManager.onUserSwitching(); in onUserSwitching()
184 mTransactionManager.onUserUnlocked( in switchToSetupForUser()
DHealthConnectServiceImpl.java197 private final TransactionManager mTransactionManager; field in HealthConnectServiceImpl
231 mTransactionManager = transactionManager; in HealthConnectServiceImpl()
400 List<String> uuids = mTransactionManager.insertAll(insertRequest); in insertRecords()
689 mTransactionManager.readRecordsByIds( in readRecords()
695 mTransactionManager.readRecordsAndPageToken( in readRecords()
848 mTransactionManager.updateAll(request); in updateRecords()
1041 mTransactionManager.readRecordsByIds( in getChangeLogs()
1294 mTransactionManager.deleteAll( in deleteUsingFiltersInternal()
1889 DatabaseHelper.clearAllData(mTransactionManager); in deleteAllStagedRemoteData()
2276 mTransactionManager.readMedicalResourcesByIds(List.of()); in readMedicalResources()
[all …]
/packages/services/Telecomm/src/com/android/server/telecom/
DTransactionalServiceWrapper.java94 private TransactionManager mTransactionManager; field in TransactionalServiceWrapper
120 mTransactionManager = TransactionManager.getInstance(); in TransactionalServiceWrapper()
128 mTransactionManager = transactionManager; in setTransactionManager()
132 return mTransactionManager; in getTransactionManager()
328 mTransactionManager.addTransaction(
391 mTransactionManager.addTransaction(transaction, new OutcomeReceiver<>() { in addTransactionsToManager()
464 mTransactionManager.addTransaction(serialTransactions, in handleCallEventCallbackNewFocus()
496 mTransactionManager.addTransaction( in onSetInactive()
520 mTransactionManager.addTransaction( in onDisconnect()
545 mTransactionManager.addTransaction( in onCallStreamingStarted()
DTelecomServiceImpl.java231 mTransactionManager.addTransaction(transaction, new OutcomeReceiver<>() {
2721 private TransactionManager mTransactionManager; field in TelecomServiceImpl
2772 mTransactionManager = TransactionManager.getInstance(); in TelecomServiceImpl()
2781 mTransactionManager = transactionManager; in setTransactionManager()
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/backuprestore/
DBackupRestoreTest.java128 @Mock private TransactionManager mTransactionManager; field in BackupRestoreTest
151 when(TransactionManager.getInitialisedInstance()).thenReturn(mTransactionManager); in setUp()
168 clearInvocations(mTransactionManager); in tearDown()
198 when(mTransactionManager.getDatabasePath()).thenReturn(dbFileToBackup); in testGetAllBackupData_forDeviceToDevice_copiesAllData()
507 when(mTransactionManager.getDatabaseVersion()).thenReturn(1); in testScheduleAllTimeoutJobs_stagingDone_triggersMergingJob()
775 when(mTransactionManager.getDatabaseVersion()).thenReturn(1); in testMerge_restoreStateIsIdle()
789 when(mTransactionManager.getDatabaseVersion()).thenReturn(1); in testMerge_mergingOfGrantTimesIsInvoked()
805 when(mTransactionManager.getDatabaseVersion()).thenReturn(1); in testMerge_mergingOfGrantTimes_parsesRestoredGrantTimes()
823 when(mTransactionManager.getDatabaseVersion()).thenReturn(1); in testMerge_whenModuleVersionBehind_setsVersionDiffError()
845 when(mTransactionManager.getDatabaseVersion()).thenReturn(1); in testMerge_whenMigrationInProgress_schedulesRetryMergingJob()
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/permission/
DPermissionPackageChangesOrchestratorTest.java68 @Mock private TransactionManager mTransactionManager; field in PermissionPackageChangesOrchestratorTest
78 when(TransactionManager.getInitialisedInstance()).thenReturn(mTransactionManager); in setUp()
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/
DHealthConnectServiceImplTest.java187 @Mock private TransactionManager mTransactionManager; field in HealthConnectServiceImplTest
228 when(TransactionManager.getInitialisedInstance()).thenReturn(mTransactionManager); in setUp()
232 mTransactionManager, in setUp()

12