Home
last modified time | relevance | path

Searched refs:mObserver (Results 1 – 25 of 57) sorted by relevance

123

/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/map/
DBluetoothMapContentObserverTest.java139 private BluetoothMapContentObserver mObserver; field in BluetoothMapContentObserverTest
193 mObserver = new BluetoothMapContentObserver(mContext, mClient, mInstance, null, true); in setUp()
194 mObserver.mProviderClient = mProviderClient; in setUp()
195 mObserver.mAccount = mItem; in setUp()
243 mObserver.setNotificationFilter(0); in testSendEvent_withZeroEventFilter()
247 mObserver.new Event(eventType, TEST_HANDLE_ONE, null, null); in testSendEvent_withZeroEventFilter()
248 mObserver.sendEvent(event); in testSendEvent_withZeroEventFilter()
252 mObserver.sendEvent(event); in testSendEvent_withZeroEventFilter()
256 mObserver.sendEvent(event); in testSendEvent_withZeroEventFilter()
260 mObserver.sendEvent(event); in testSendEvent_withZeroEventFilter()
[all …]
DEventTest.java61 private BluetoothMapContentObserver mObserver; field in EventTest
86 mObserver = new BluetoothMapContentObserver(mockContext, null, mockMas, null, true); in setUp()
87 mEvent = mObserver.new Event(TEST_EVENT_TYPE, TEST_HANDLE, TEST_FOLDER, TEST_TYPE); in setUp()
93 mObserver.new Event(TEST_EVENT_TYPE, TEST_HANDLE, TEST_FOLDER, TEST_TYPE); in constructor()
103 mObserver.new Event(TEST_EVENT_TYPE, TEST_HANDLE, TEST_FOLDER, null, TEST_TYPE); in constructor_withNullOldFolder()
114 mObserver in constructor_withNonNullOldFolder()
126 mObserver in constructor_forExtendedEventTypeOnePointOne()
150 mObserver in constructor_forExtendedEventTypeOnePointTwo_withMessageEvents()
179 mObserver in constructor_forExtendedEventTypeOnePointTwo_withConversationEvents()
DBluetoothMapObexServerTest.java77 @Mock private BluetoothMapContentObserver mObserver; field in BluetoothMapObexServerTest
102 null, mContext, mObserver, mMasInstance, mAccountItem, TEST_ENABLE_SMS_MMS); in setUp()
122 mObserver, in setOwnerStatus_withAccountTypeEmail()
222 new BluetoothMapObexServer(null, mContext, mObserver, mMasInstance, null, false); in setMsgTypeFilterParams_withAccountNull_andOverwriteTrue()
251 mObserver, in setMsgTypeFilterParams_withInvalidFilterMessageType()
278 mObserver, in setMsgTypeFilterParams_withValidFilterMessageType()
/packages/modules/DnsResolver/
DPrivateDnsConfigurationTest.cpp46 mPdc.setObserver(&mObserver); in SetUp()
58 ON_CALL(mObserver, onValidationStateUpdate) in SetUp()
60 std::lock_guard guard(mObserver.lock); in SetUp()
62 auto it = mObserver.serverStateMap.find(server); in SetUp()
63 if (it == mObserver.serverStateMap.end() || in SetUp()
70 mObserver.runningThreads++; in SetUp()
74 mObserver.runningThreads--; in SetUp()
76 mObserver.serverStateMap[server] = validation; in SetUp()
127 return (serverStateMap == mObserver.getServerStateMap()); in checkPrivateDnsStatus()
140 MockObserver mObserver; member in android::net::PrivateDnsConfigurationTest
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/
DNotificationContentObserverTest.java48 private NotificationContentObserver mObserver; field in NotificationContentObserverTest
52 mObserver = new NotificationContentObserver(null); in setUp()
57 mObserver.registerKeysToObserverCallback(Arrays.asList(KEY_MEDIA), mObserverCallbackA); in registerKeysToObserverCallback_correctKeys_registersCallback()
58 mObserver.registerKeysToObserverCallback( in registerKeysToObserverCallback_correctKeys_registersCallback()
61 assertThat(mObserver.getUrisToCallback()).hasSize(2); in registerKeysToObserverCallback_correctKeys_registersCallback()
62 assertThat(mObserver.getUrisToCallback()) in registerKeysToObserverCallback_correctKeys_registersCallback()
64 assertThat(mObserver.getUrisToCallback()) in registerKeysToObserverCallback_correctKeys_registersCallback()
67 mObserver.registerKeysToObserverCallback( in registerKeysToObserverCallback_correctKeys_registersCallback()
70 assertThat(mObserver.getUrisToCallback()).hasSize(3); in registerKeysToObserverCallback_correctKeys_registersCallback()
71 assertThat(mObserver.getUrisToCallback()).containsEntry( in registerKeysToObserverCallback_correctKeys_registersCallback()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/
DAccessibilitySettingsContentObserverTest.java52 private final AccessibilitySettingsContentObserver mObserver = field in AccessibilitySettingsContentObserverTest
62 mObserver.register(mContentResolver); in register_shouldRegisterContentObserverForDefaultKeys()
66 Settings.Secure.ACCESSIBILITY_ENABLED, mObserver); in register_shouldRegisterContentObserverForDefaultKeys()
68 Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, mObserver); in register_shouldRegisterContentObserverForDefaultKeys()
73 mObserver.register(mContentResolver); in unregister_shouldUnregisterContentObserver()
75 mObserver.unregister(mContentResolver); in unregister_shouldUnregisterContentObserver()
85 mObserver.registerKeysToObserverCallback(List.of(SPECIFIC_KEY_A_1), mObserverCallbackA); in register_addSpecificKeys_shouldRegisterContentObserverForSpecificAndDefaultKeys()
87 mObserver.register(mContentResolver); in register_addSpecificKeys_shouldRegisterContentObserverForSpecificAndDefaultKeys()
91 Settings.Secure.ACCESSIBILITY_ENABLED, mObserver); in register_addSpecificKeys_shouldRegisterContentObserverForSpecificAndDefaultKeys()
93 Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, mObserver); in register_addSpecificKeys_shouldRegisterContentObserverForSpecificAndDefaultKeys()
[all …]
/packages/apps/Nfc/tests/unit/src/com/android/nfc/cardemulation/
DPreferredServicesTest.java81 private WalletRoleObserver mObserver; field in PreferredServicesTest
157 when(mObserver.getDefaultWalletRoleHolder(anyInt())).thenReturn(null); in setUp()
168 when(mObserver.isWalletRoleFeatureEnabled()).thenReturn(true); in setUp()
178 when(mObserver.isWalletRoleFeatureEnabled()).thenReturn(false); in testConstructorWhenWalletRoleFeatureIsNotEnabled()
180 services = new PreferredServices(mContext, mServicesCache, mAidCache, mObserver, mCallback); in testConstructorWhenWalletRoleFeatureIsNotEnabled()
183 assertThat(services.mWalletRoleObserver).isEqualTo(mObserver); in testConstructorWhenWalletRoleFeatureIsNotEnabled()
192 verify(mObserver, never()).getDefaultWalletRoleHolder(anyInt()); in testConstructorWhenWalletRoleFeatureIsNotEnabled()
197 services = new PreferredServices(mContext, mServicesCache, mAidCache, mObserver, mCallback); in testConstructorWhenWalletRoleFeatureIsEnabled()
200 assertThat(services.mWalletRoleObserver).isEqualTo(mObserver); in testConstructorWhenWalletRoleFeatureIsEnabled()
209 verify(mObserver).getDefaultWalletRoleHolder(anyInt()); in testConstructorWhenWalletRoleFeatureIsEnabled()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/android/car/app/
DCarTaskViewControllerHostLifecycleFactoryTest.java31 private final FakeCarTaskViewControllerHostLifecycleObserver mObserver = field in CarTaskViewControllerHostLifecycleFactoryTest
49 lifecycle.registerObserver(mObserver); in forActivity_activityResumed_callsObserver()
56 assertThat(mObserver.mHostAppearedCalled).isTrue(); in forActivity_activityResumed_callsObserver()
64 lifecycle.registerObserver(mObserver); in forActivity_activityStarted_callsObserver()
71 assertThat(mObserver.mHostAppearedCalled).isTrue(); in forActivity_activityStarted_callsObserver()
79 lifecycle.registerObserver(mObserver); in forActivity_activityStopped_callsObserver()
86 assertThat(mObserver.mHostDisappearedCalled).isTrue(); in forActivity_activityStopped_callsObserver()
94 lifecycle.registerObserver(mObserver); in forActivity_activityDestroyed_callsObserver()
101 assertThat(mObserver.mHostDestroyedCalled).isTrue(); in forActivity_activityDestroyed_callsObserver()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/map/
DBluetoothMapMasInstance.java92 BluetoothMapContentObserver mObserver; field in BluetoothMapMasInstance
275 if (mObserver != null) { in startSocketListeners()
277 mObserver.deinit(); in startSocketListeners()
278 mObserver = null; in startSocketListeners()
395 mObserver = in startObexServerSession()
398 mObserver.init(); in startObexServerSession()
401 mServiceHandler, mContext, mObserver, this, mAccount, mEnableSmsMms); in startObexServerSession()
415 if (mObserver != null) { in handleSmsSendIntent()
416 return mObserver.handleSmsSendIntent(context, intent); in handleSmsSendIntent()
437 if (mObserver != null) { in shutdown()
[all …]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DContactsContentObserverTest.java62 private ContactsContentObserver mObserver; field in ContactsContentObserverTest
67 mObserver = new ContactsContentObserver(mMockManager, mContext); in setUp()
81 assertFalse(mObserver.haveContentsChanged()); in testHaveContentsChanged_NoChange()
87 assertTrue(mObserver.haveContentsChanged()); in testHaveContentsChanged_UpdatedCount()
96 assertTrue(mObserver.haveContentsChanged()); in testHaveContentsChanged_HashUpdate()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DUserBinaryDictionary.java54 private ContentObserver mObserver; field in UserBinaryDictionary
73 mObserver = new ContentObserver(null) { in UserBinaryDictionary()
89 cres.registerContentObserver(Words.CONTENT_URI, true, mObserver); in UserBinaryDictionary()
105 if (mObserver != null) { in close()
106 mContext.getContentResolver().unregisterContentObserver(mObserver); in close()
107 mObserver = null; in close()
DContactsManager.java124 private final ContactsContentObserver mObserver; field in ContactsManager
128 mObserver = new ContactsContentObserver(this /* ContactsManager */, context); in ContactsManager()
133 mObserver.registerObserver(listener); in registerForUpdates()
243 mObserver.unregister(); in close()
/packages/apps/Settings/src/com/android/settings/development/autofill/
DAbstractGlobalSettingsPreference.java39 private final AutofillDeveloperSettingsObserver mObserver; field in AbstractGlobalSettingsPreference
47 mObserver = new AutofillDeveloperSettingsObserver(context, () -> updateSummary()); in AbstractGlobalSettingsPreference()
54 mObserver.register(); in onAttached()
60 mObserver.unregister(); in onDetached()
DAutofillLoggingLevelPreferenceController.java45 private final AutofillDeveloperSettingsObserver mObserver; field in AutofillLoggingLevelPreferenceController
53 mObserver = new AutofillDeveloperSettingsObserver(mContext, () -> updateOptions()); in AutofillLoggingLevelPreferenceController()
54 mObserver.register(); in AutofillLoggingLevelPreferenceController()
63 mObserver.unregister(); in onDestroy()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/statusicon/
DStatusIconViewController.java36 private final Observer<StatusIconData> mObserver; field in StatusIconViewController
42 mObserver = this::updateIconView; in StatusIconViewController()
53 mStatusIconLiveData.observeForever(mObserver); in onViewAttached()
60 mStatusIconLiveData.removeObserver(mObserver); in onViewDetached()
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadJobService.java47 getContentResolver().registerContentObserver(ALL_DOWNLOADS_CONTENT_URI, true, mObserver); in onCreate()
53 getContentResolver().unregisterContentObserver(mObserver); in onDestroy()
110 mObserver.onChange(false); in jobFinishedInternal()
116 private ContentObserver mObserver = new ContentObserver(Helpers.getAsyncHandler()) { field in DownloadJobService
/packages/apps/DocumentsUI/src/com/android/documentsui/inspector/
DRuntimeDataSupplier.java168 private ContentObserver mObserver; field in RuntimeDataSupplier.Callbacks
190 mObserver = new InspectorContentObserver(loader::onContentChanged); in onLoadFinished()
191 cursor.registerContentObserver(mObserver); in onLoadFinished()
199 if (mObserver != null) { in onLoaderReset()
200 mUserId.getContentResolver(mContext).unregisterContentObserver(mObserver); in onLoaderReset()
205 return mObserver; in getObserver()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/cache/
DFledgeHttpCacheTest.java79 @Mock private HttpCache.CacheObserver mObserver; field in FledgeHttpCacheTest
113 mCache.addObserver(mObserver); in setup()
137 verify(mObserver).update(HttpCache.CacheEventType.PUT); in test_CachePutEntry_Succeeds()
147 verify(mObserver, never()).update(HttpCache.CacheEventType.PUT); in test_CachePutEntryNoCache_SkipsCache()
157 verify(mObserver, never()).update(HttpCache.CacheEventType.PUT); in test_CachePutEntryNoStoreCache_SkipsCache()
170 verify(mObserver).update(HttpCache.CacheEventType.GET); in test_CacheGetEntry_Succeeds()
190 verify(mObserver).update(HttpCache.CacheEventType.CLEANUP); in test_CacheCleanUp_Succeeds()
197 verify(mObserver).update(HttpCache.CacheEventType.DELETE); in test_CacheDelete_DeletesAll()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryOptimizeUtilsTest.java81 @Mock private Observer mObserver; field in BatteryOptimizeUtilsTest
92 mBatterySettingsStorage.addObserver(mObserver, MoreExecutors.directExecutor()); in setUp()
167 verify(mObserver).onChanged(DataChangeReason.UPDATE); in testSetAppUsageState_Restricted_verifyAction()
181 verify(mObserver).onChanged(DataChangeReason.UPDATE); in testSetAppUsageState_Unrestricted_verifyAction()
195 verify(mObserver).onChanged(DataChangeReason.UPDATE); in testSetAppUsageState_Optimized_verifyAction()
211 verifyNoInteractions(mObserver); in testSetAppUsageState_sameUnrestrictedMode_verifyNoAction()
304 verify(mObserver).onChanged(DataChangeReason.DELETE); in testResetAppOptimizationModeInternal_SystemOrDefault_verifyAction()
315 verify(mObserver).onChanged(DataChangeReason.DELETE); in testResetAppOptimizationModeInternal_Restricted_verifyAction()
326 verify(mObserver).onChanged(DataChangeReason.DELETE); in testResetAppOptimizationModeInternal_Unrestricted_verifyAction()
/packages/apps/Contacts/src/com/android/contacts/editor/
DAccountHeaderPresenter.java72 private Observer mObserver = Observer.NONE; field in AccountHeaderPresenter
86 mObserver = observer; in setObserver()
94 if (mObserver != null) { in setCurrentAccount()
95 mObserver.onChange(this); in setCurrentAccount()
106 mObserver.onChange(this); in setAccounts()
/packages/apps/Messaging/src/com/android/messaging/ui/
DCompositeAdapter.java93 private final Observer mObserver; field in CompositeAdapter
97 mObserver = new Observer(); in CompositeAdapter()
113 partition.getAdapter().registerDataSetObserver(mObserver); in addPartition()
124 partition.getAdapter().unregisterDataSetObserver(mObserver); in removePartition()
133 partition.getAdapter().unregisterDataSetObserver(mObserver); in clearPartitions()
/packages/modules/DnsResolver/tests/
Dresolv_tls_unit_test.cpp113 explicit FakeSocketEcho(IDnsTlsSocketObserver* observer) : mObserver(observer) {} in FakeSocketEcho()
116 std::thread(&IDnsTlsSocketObserver::onResponse, mObserver, make_echo(id, query)).detach(); in query()
122 IDnsTlsSocketObserver* const mObserver; member in android::net::FakeSocketEcho
140 explicit FakeSocketId(IDnsTlsSocketObserver* observer) : mObserver(observer) {} in FakeSocketId()
152 std::thread(&IDnsTlsSocketObserver::onResponse, mObserver, response).detach(); in query()
158 IDnsTlsSocketObserver* const mObserver; member in android::net::FakeSocketId
202 explicit FakeSocketDelay(IDnsTlsSocketObserver* observer) : mObserver(observer) {} in FakeSocketDelay()
238 mObserver->onResponse(response); in sendResponses()
245 IDnsTlsSocketObserver* const mObserver; member in android::net::FakeSocketDelay
472 : mObserver(observer), mQueries(0) {} in FakeSocketLimited()
[all …]
/packages/apps/Settings/src/com/android/settings/dream/
DDreamMainSwitchPreferenceController.java42 private final ContentObserver mObserver = new ContentObserver( field in DreamMainSwitchPreferenceController
86 /* notifyForDescendants= */ false, mObserver); in onStart() local
91 mContext.getContentResolver().unregisterContentObserver(mObserver); in onStop()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/opp/
DBluetoothOppTransferActivity.java110 private BluetoothTransferContentObserver mObserver; field in BluetoothOppTransferActivity
156 mObserver = new BluetoothTransferContentObserver(); in onCreate()
158 .registerContentObserver(BluetoothShare.CONTENT_URI, true, mObserver); in onCreate()
174 if (mObserver != null) { in onDestroy()
175 getContentResolver().unregisterContentObserver(mObserver); in onDestroy()
450 if (mObserver != null) { in updateProgressbar()
451 getContentResolver().unregisterContentObserver(mObserver); in updateProgressbar()
452 mObserver = null; in updateProgressbar()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/assist/
DAssistContextPreferenceControllerTest.java56 private AssistContextPreferenceController.SettingObserver mObserver; field in AssistContextPreferenceControllerTest
70 ReflectionHelpers.setField(mController, "mSettingObserver", mObserver); in setUp()
96 verify(mObserver).register(any(ContentResolver.class), eq(true)); in onResume_shouldUpdatePreference()

123