/packages/apps/Car/libs/car-arch-common/tests/robotests/src/com/android/car/arch/common/ |
D | LiveDataFunctionsTest.java | 61 CaptureObserver<Object> observer = new CaptureObserver<>(); in testNullLiveData() local 62 nullLiveData().observe(mLifecycleOwner, observer); in testNullLiveData() 64 assertThat(observer.hasBeenNotified()).isTrue(); in testNullLiveData() 65 assertThat(observer.getObservedValue()).isNull(); in testNullLiveData() 71 CaptureObserver<Boolean> observer = new CaptureObserver<>(); in testTrueLiveData() local 72 trueLiveData().observe(mLifecycleOwner, observer); in testTrueLiveData() 74 assertThat(observer.hasBeenNotified()).isTrue(); in testTrueLiveData() 75 assertThat(observer.getObservedValue()).isTrue(); in testTrueLiveData() 81 CaptureObserver<Boolean> observer = new CaptureObserver<>(); in testFalseLiveData() local 82 falseLiveData().observe(mLifecycleOwner, observer); in testFalseLiveData() [all …]
|
/packages/apps/Car/libs/car-media-common/tests/robotests/src/com/android/car/media/common/playback/ |
D | PlaybackViewModelTest.java | 95 CaptureObserver<MediaItemMetadata> observer = new CaptureObserver<>(); in testGetMetadata() local 96 mPlaybackViewModel.getMetadata().observe(mLifecycleOwner, observer); in testGetMetadata() 97 observer.reset(); in testGetMetadata() 102 assertThat(observer.hasBeenNotified()).isTrue(); in testGetMetadata() 103 MediaItemMetadata observedValue = observer.getObservedValue(); in testGetMetadata() 110 CaptureObserver<PlaybackViewModel.PlaybackStateWrapper> observer = new CaptureObserver<>(); in testGetPlaybackState() local 111 mPlaybackViewModel.getPlaybackStateWrapper().observe(mLifecycleOwner, observer); in testGetPlaybackState() 112 observer.reset(); in testGetPlaybackState() 118 assertThat(observer.hasBeenNotified()).isTrue(); in testGetPlaybackState() 119 assertThat(observer.getObservedValue().getStateCompat()).isEqualTo(mPlaybackState); in testGetPlaybackState() [all …]
|
/packages/apps/Contacts/tests/src/com/android/contacts/widget/ |
D | CompositeListAdapterTest.java | 217 TestDataSetObserver observer = new TestDataSetObserver(); in testNotifyDataSetChangedPropagated() local 218 adapter.registerDataSetObserver(observer); in testNotifyDataSetChangedPropagated() 221 assertEquals(1, observer.changeCount); in testNotifyDataSetChangedPropagated() 222 assertEquals(0, observer.invalidationCount); in testNotifyDataSetChangedPropagated() 229 assertEquals(2, observer.changeCount); in testNotifyDataSetChangedPropagated() 230 assertEquals(0, observer.invalidationCount); in testNotifyDataSetChangedPropagated() 243 TestDataSetObserver observer = new TestDataSetObserver(); in testNotifyDataSetChangedOnAddingAdapter() local 244 adapter.registerDataSetObserver(observer); in testNotifyDataSetChangedOnAddingAdapter() 247 assertEquals(1, observer.changeCount); in testNotifyDataSetChangedOnAddingAdapter() 248 assertEquals(0, observer.invalidationCount); in testNotifyDataSetChangedOnAddingAdapter() [all …]
|
/packages/apps/Car/libs/car-media-common/tests/robotests/src/com/android/car/media/common/source/ |
D | MediaSourceViewModelTest.java | 131 CaptureObserver<MediaSource> observer = new CaptureObserver<>(); in testGetSelectedMediaSource_none() local 133 mViewModel.getPrimaryMediaSource().observe(mLifecycleOwner, observer); in testGetSelectedMediaSource_none() 135 assertThat(observer.getObservedValue()).isNull(); in testGetSelectedMediaSource_none() 140 CaptureObserver<MediaControllerCompat> observer = new CaptureObserver<>(); in testGetMediaController_connectedBrowser() local 148 mViewModel.getMediaController().observe(mLifecycleOwner, observer); in testGetMediaController_connectedBrowser() 150 assertThat(observer.getObservedValue()).isSameAs(mMediaControllerFromBrowser); in testGetMediaController_connectedBrowser() 156 CaptureObserver<MediaControllerCompat> observer = new CaptureObserver<>(); in testGetMediaController_noActiveSession_notConnected() local 163 mViewModel.getMediaController().observe(mLifecycleOwner, observer); in testGetMediaController_noActiveSession_notConnected() 165 assertThat(observer.hasBeenNotified()).isTrue(); in testGetMediaController_noActiveSession_notConnected() 166 assertThat(observer.getObservedValue()).isNull(); in testGetMediaController_noActiveSession_notConnected()
|
/packages/modules/NetworkStack/src/com/android/server/ |
D | NetworkObserverRegistry.java | 63 public void registerObserver(@NonNull NetworkObserver observer, @NonNull Handler handler) { in registerObserver() argument 67 mObservers.put(observer, Optional.of(handler)); in registerObserver() 76 public void registerObserverForNonblockingCallback(@NonNull NetworkObserver observer) { in registerObserverForNonblockingCallback() argument 77 mObservers.put(observer, Optional.empty()); in registerObserverForNonblockingCallback() 84 public void unregisterObserver(@NonNull NetworkObserver observer) { in unregisterObserver() argument 85 mObservers.remove(observer); in unregisterObserver() 97 final NetworkObserver observer = entry.getKey(); in invokeForAllObservers() local 100 handler.get().post(() -> callback.sendCallback(observer)); in invokeForAllObservers() 105 callback.sendCallback(observer); in invokeForAllObservers()
|
/packages/apps/Car/Media/src/com/android/car/media/browse/ |
D | BrowseAdapter.java | 125 public void registerObserver(Observer observer) { in registerObserver() argument 126 mObservers.add(observer); in registerObserver() 132 public void unregisterObserver(Observer observer) { in unregisterObserver() argument 133 mObservers.remove(observer); in unregisterObserver() 212 for (Observer observer : mObservers) { 213 notification.accept(observer); 288 observer -> observer.onBrowsableItemClicked(item)); 291 observer -> observer.onPlayableItemClicked(item));
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/ |
D | InstallPackageTaskTest.java | 145 IntentSender observer = verifyPackageInstalled( in testSuccess() local 152 observer.sendIntent(getContext(), 0, fillIn, null, null); in testSuccess() 170 IntentSender observer = verifyPackageInstalled( in testSuccess_allowTestOnly() local 178 observer.sendIntent(getContext(), 0, fillIn, null, null); in testSuccess_allowTestOnly() 195 IntentSender observer = verifyPackageInstalled( in testInstallFailedVersionDowngrade() local 204 observer.sendIntent(getContext(), 0, fillIn, null, null); in testInstallFailedVersionDowngrade() 220 IntentSender observer = verifyPackageInstalled( in testInstallFailedOtherError() local 229 observer.sendIntent(getContext(), 0, fillIn, null, null); in testInstallFailedOtherError() 245 IntentSender observer = verifyPackageInstalled( in testDifferentPackageName() local 251 observer.sendIntent(getContext(), 0, fillIn, null, null); in testDifferentPackageName()
|
/packages/modules/DnsResolver/ |
D | resolv_tls_unit_test.cpp | 113 IDnsTlsSocketObserver* observer, in createDnsTlsSocket() argument 115 return std::make_unique<T>(observer); in createDnsTlsSocket() 131 explicit FakeSocketEcho(IDnsTlsSocketObserver* observer) : mObserver(observer) {} in FakeSocketEcho() argument 157 explicit FakeSocketId(IDnsTlsSocketObserver* observer) : mObserver(observer) {} in FakeSocketId() argument 218 explicit FakeSocketDelay(IDnsTlsSocketObserver* observer) : mObserver(observer) {} in FakeSocketDelay() argument 420 IDnsTlsSocketObserver* observer ATTRIBUTE_UNUSED, in createDnsTlsSocket() 440 explicit FakeSocketClose(IDnsTlsSocketObserver* observer) in FakeSocketClose() argument 441 : mCloser(&IDnsTlsSocketObserver::onClosed, observer) {} in FakeSocketClose() 470 explicit FakeSocketLimited(IDnsTlsSocketObserver* observer) in FakeSocketLimited() argument 471 : mObserver(observer), mQueries(0) {} in FakeSocketLimited() [all …]
|
D | DnsTlsSocketFactory.h | 36 IDnsTlsSocketObserver* _Nonnull observer, in createDnsTlsSocket() argument 38 auto socket = std::make_unique<DnsTlsSocket>(server, mark, observer, cache); in createDnsTlsSocket()
|
/packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/ |
D | SpecialAppAccessViewModel.java | 87 @NonNull ManageRoleHolderStateObserver observer) { in observeManageRoleHolderState() argument 92 liveData.observe(owner, state -> observer.onManageRoleHolderStateChanged(liveData, in observeManageRoleHolderState() 108 @NonNull LifecycleOwner owner, @NonNull ManageRoleHolderStateObserver observer) { in getManageRoleHolderStateLiveData() argument 113 liveData.observe(owner, state -> observer.onManageRoleHolderStateChanged(finalLiveData, in getManageRoleHolderStateLiveData() 132 @NonNull ManageRoleHolderStateObserver observer) { in setSpecialAppAccessAsUser() argument 134 observer); in setSpecialAppAccessAsUser()
|
/packages/apps/Dialer/java/com/android/dialer/searchfragment/cp2/ |
D | ContactFilterCursor.java | 498 public void registerContentObserver(ContentObserver observer) { in registerContentObserver() argument 499 cursor.registerContentObserver(observer); in registerContentObserver() 503 public void unregisterContentObserver(ContentObserver observer) { in unregisterContentObserver() argument 504 cursor.unregisterContentObserver(observer); in unregisterContentObserver() 508 public void registerDataSetObserver(DataSetObserver observer) { in registerDataSetObserver() argument 509 cursor.registerDataSetObserver(observer); in registerDataSetObserver() 513 public void unregisterDataSetObserver(DataSetObserver observer) { in unregisterDataSetObserver() argument 514 cursor.unregisterDataSetObserver(observer); in unregisterDataSetObserver()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
D | SuggestionCursorWrapper.java | 63 public void registerDataSetObserver(DataSetObserver observer) { in registerDataSetObserver() argument 65 mCursor.registerDataSetObserver(observer); in registerDataSetObserver() 69 public void unregisterDataSetObserver(DataSetObserver observer) { in unregisterDataSetObserver() argument 71 mCursor.unregisterDataSetObserver(observer); in unregisterDataSetObserver()
|
D | Suggestions.java | 110 public void registerDataSetObserver(DataSetObserver observer) { in registerDataSetObserver() argument 114 mDataSetObservable.registerObserver(observer); in registerDataSetObserver() 121 public void unregisterDataSetObserver(DataSetObserver observer) { in unregisterDataSetObserver() argument 122 mDataSetObservable.unregisterObserver(observer); in unregisterDataSetObserver()
|
D | ListSuggestionCursor.java | 119 public void registerDataSetObserver(DataSetObserver observer) { in registerDataSetObserver() argument 120 mDataSetObservable.registerObserver(observer); in registerDataSetObserver() 129 public void unregisterDataSetObserver(DataSetObserver observer) { in unregisterDataSetObserver() argument 130 mDataSetObservable.unregisterObserver(observer); in unregisterDataSetObserver()
|
D | SuggestionCursor.java | 72 void registerDataSetObserver(DataSetObserver observer); in registerDataSetObserver() argument 80 void unregisterDataSetObserver(DataSetObserver observer); in unregisterDataSetObserver() argument
|
/packages/apps/Messaging/src/com/android/messaging/ui/ |
D | BugleActionBarActivity.java | 155 for (final ImeUtil.ImeStateObserver observer : mImeStateObservers) { in onDisplayHeightChanged() 156 observer.onImeStateChanged(mImeOpen); in onDisplayHeightChanged() 162 public void registerImeStateObserver(final ImeUtil.ImeStateObserver observer) { in registerImeStateObserver() argument 163 mImeStateObservers.add(observer); in registerImeStateObserver() 167 public void unregisterImeStateObserver(final ImeUtil.ImeStateObserver observer) { in unregisterImeStateObserver() argument 168 mImeStateObservers.remove(observer); in unregisterImeStateObserver()
|
/packages/apps/Gallery2/src/com/android/photos/views/ |
D | HeaderGridView.java | 434 public void registerDataSetObserver(DataSetObserver observer) { in registerDataSetObserver() argument 435 mDataSetObservable.registerObserver(observer); in registerDataSetObserver() 437 mAdapter.registerDataSetObserver(observer); in registerDataSetObserver() 442 public void unregisterDataSetObserver(DataSetObserver observer) { in unregisterDataSetObserver() argument 443 mDataSetObservable.unregisterObserver(observer); in unregisterDataSetObserver() 445 mAdapter.unregisterDataSetObserver(observer); in unregisterDataSetObserver()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
D | WirelessDebuggingEnablerTest.java | 96 final ContentObserver observer = in adbWifiEnabled_switchBarShouldBeChecked() local 98 observer.onChange(true, Global.getUriFor(Global.ADB_WIFI_ENABLED)); in adbWifiEnabled_switchBarShouldBeChecked() 116 final ContentObserver observer = in adbWifiEnabled_switchBarShouldNotBeChecked() local 118 observer.onChange(true, Global.getUriFor(Global.ADB_WIFI_ENABLED)); in adbWifiEnabled_switchBarShouldNotBeChecked()
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
D | SectionedAlbumDataAdapter.java | 167 public void registerDataSetObserver(DataSetObserver observer) { in registerDataSetObserver() argument 168 mAlbumData.registerDataSetObserver(observer); in registerDataSetObserver() 172 public void unregisterDataSetObserver(DataSetObserver observer) { in unregisterDataSetObserver() argument 173 mAlbumData.unregisterDataSetObserver(observer); in unregisterDataSetObserver()
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
D | ParticipantRefresh.java | 171 final ContactContentObserver observer = Factory.get().getContactContentObserver(); in getNeedFullRefresh() local 172 if (observer == null) { in getNeedFullRefresh() 180 observer.initialize(); in getNeedFullRefresh() 186 return observer.getContactChanged(); in getNeedFullRefresh() 190 final ContactContentObserver observer = Factory.get().getContactContentObserver(); in resetNeedFullRefresh() local 191 if (observer != null) { in resetNeedFullRefresh() 192 observer.resetContactChanged(); in resetNeedFullRefresh()
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/ |
D | PrimaryImage.java | 223 public void addObserver(ImageShow observer) { in addObserver() argument 224 if (mObservers.contains(observer)) { in addObserver() 227 mObservers.add(observer); in addObserver() 230 public void removeObserver(ImageShow observer) { in removeObserver() argument 231 mObservers.remove(observer); in removeObserver() 480 for (ImageShow observer : mObservers) { in notifyObservers() 481 observer.invalidate(); in notifyObservers()
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
D | PopupList.java | 93 ViewTreeObserver observer = mAnchorView.getViewTreeObserver(); 94 if (observer.isAlive()) { 97 observer.removeGlobalOnLayoutListener(mOnGLobalLayoutListener);
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/ |
D | ContactDiscoveryPreferenceControllerTest.java | 143 ContentObserver observer = getUceChangeObserver(); in testContentObserverChanged() local 144 assertNotNull(observer); in testContentObserverChanged() 147 observer.onChange(false, UCE_URI); in testContentObserverChanged()
|
/packages/apps/TV/tests/unit/src/com/android/tv/data/ |
D | ChannelDataManagerTest.java | 390 public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork) { in notifyChange() argument 391 super.notifyChange(uri, observer, syncToNetwork); in notifyChange() 398 + observer in notifyChange() 407 if (observer != null) { in notifyChange() 408 observer.dispatchChange(false, uri); in notifyChange()
|
/packages/apps/DeskClock/src/com/android/deskclock/data/ |
D | AlarmModel.kt | 43 val observer: ContentObserver = SystemAlarmAlertChangeObserver() constant 44 cr.registerContentObserver(Settings.System.DEFAULT_ALARM_ALERT_URI, false, observer)
|