Home
last modified time | relevance | path

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

123

/frameworks/base/services/backup/java/com/android/server/backup/fullbackup/
DFullBackupTask.java30 IFullBackupRestoreObserver mObserver; field in FullBackupTask
33 mObserver = observer; in FullBackupTask()
38 if (mObserver != null) { in sendStartBackup()
40 mObserver.onStartBackup(); in sendStartBackup()
43 mObserver = null; in sendStartBackup()
49 if (mObserver != null) { in sendOnBackupPackage()
52 mObserver.onBackupPackage(name); in sendOnBackupPackage()
55 mObserver = null; in sendOnBackupPackage()
61 if (mObserver != null) { in sendEndBackup()
63 mObserver.onEndBackup(); in sendEndBackup()
[all …]
/frameworks/opt/setupwizard/library/recyclerview/test/instrumentation/src/com/android/setupwizardlib/test/
DHeaderRecyclerViewTest.java43 @Mock private RecyclerView.AdapterDataObserver mObserver; field in HeaderRecyclerViewTest
52 mHeaderAdapter.registerAdapterDataObserver(mObserver); in setUp()
60 verify(mObserver).onChanged(); in testNotifyChanged()
68 verify(mObserver).onItemRangeChanged(eq(12), eq(1), eq(null)); in testNotifyItemChangedNoHeader()
80 verify(mObserver).onItemRangeChanged(eq(13), eq(1), eq(null)); in testNotifyItemChangedWithHeader()
88 verify(mObserver).onItemRangeInserted(eq(12), eq(1)); in testNotifyItemInsertedNoHeader()
100 verify(mObserver).onItemRangeInserted(eq(13), eq(1)); in testNotifyItemInsertedWithHeader()
108 verify(mObserver).onItemRangeRemoved(eq(12), eq(1)); in testNotifyItemRemovedNoHeader()
120 verify(mObserver).onItemRangeRemoved(eq(13), eq(1)); in testNotifyItemRemovedWithHeader()
128 verify(mObserver).onItemRangeMoved(eq(12), eq(18), eq(1)); in testNotifyItemMovedNoHeader()
[all …]
/frameworks/av/media/libstagefright/foundation/
DMediaBuffer.cpp35 : mObserver(NULL), in MediaBuffer()
46 : mObserver(NULL), in MediaBuffer()
83 : mObserver(NULL), in MediaBuffer()
95 if (mObserver == NULL) { in release()
104 if (mObserver == NULL) { in release()
109 mObserver->signalBufferReturned(this); in release()
115 CHECK(mObserver != NULL); in claim()
161 CHECK(mObserver == NULL); in ~MediaBuffer()
175 CHECK(observer == NULL || mObserver == NULL); in setObserver()
176 mObserver = observer; in setObserver()
/frameworks/base/core/tests/coretests/src/android/os/
DFileObserverTest.java34 private Observer mObserver; field in FileObserverTest
78 mObserver = new Observer(mTestFile.getParent()); in testRun()
79 mObserver.startWatching(); in testRun()
91 mObserver.stopWatching(); in testRun()
94 assertTrue(mObserver.totalEvents > 3); in testRun()
101 synchronized (mObserver) { in waitForEvent()
105 mObserver.wait(2000); in waitForEvent()
111 Iterator<Map> it = mObserver.events.iterator(); in waitForEvent()
118 mObserver.events.clear(); in waitForEvent()
/frameworks/base/services/backup/java/com/android/server/backup/keyvalue/
DKeyValueBackupReporter.java67 private final IBackupObserver mObserver; field in KeyValueBackupReporter
75 mObserver = observer; in KeyValueBackupReporter()
86 return mObserver; in getObserver()
141 mObserver, packageName, BackupManager.ERROR_BACKUP_NOT_ALLOWED); in onPackageNotEligibleForBackup()
149 mObserver, packageName, BackupManager.ERROR_BACKUP_NOT_ALLOWED); in onPackageEligibleForFullBackup()
154 mObserver, packageName, BackupManager.ERROR_BACKUP_NOT_ALLOWED); in onPackageStopped()
160 mObserver, packageName, BackupManager.ERROR_PACKAGE_NOT_FOUND); in onAgentUnknown()
166 mObserver, packageName, BackupManager.ERROR_AGENT_FAILURE); in onBindAgentError()
174 mObserver, packageName, BackupManager.ERROR_AGENT_FAILURE); in onAgentError()
197 mObserver, packageName, BackupManager.ERROR_AGENT_FAILURE); in onCallAgentDoBackupError()
[all …]
/frameworks/base/services/robotests/backup/src/com/android/server/backup/restore/
DActiveRestoreSessionTest.java97 @Mock private IRestoreObserver mObserver; field in ActiveRestoreSessionTest
163 () -> restoreSession.getAvailableRestoreSets(mObserver, mMonitor)); in testGetAvailableRestoreSets_withoutPermission()
183 int result = restoreSession.getAvailableRestoreSets(mObserver, mMonitor); in testGetAvailableRestoreSets_whenTransportNotRegistered()
196 int result = restoreSession.getAvailableRestoreSets(mObserver, mMonitor); in testGetAvailableRestoreSets()
200 verify(mObserver) in testGetAvailableRestoreSets()
214 int result = restoreSession.getAvailableRestoreSets(mObserver, mMonitor); in testGetAvailableRestoreSets_forEmptyRestoreSets()
218 verify(mObserver).restoreSetsAvailable(aryEq(new RestoreSet[0])); in testGetAvailableRestoreSets_forEmptyRestoreSets()
229 int result = restoreSession.getAvailableRestoreSets(mObserver, mMonitor); in testGetAvailableRestoreSets_forNullRestoreSets()
233 verify(mObserver).restoreSetsAvailable(isNull()); in testGetAvailableRestoreSets_forNullRestoreSets()
249 int result = restoreSession.restoreAll(TOKEN_1, mObserver, mMonitor); in testRestoreAll()
[all …]
/frameworks/base/core/java/android/printservice/
DPrinterDiscoverySession.java98 private IPrintServiceClient mObserver; field in PrinterDiscoverySession
112 mObserver = observer; in setObserver()
117 mObserver.onPrintersAdded(new ParceledListSlice<PrinterInfo>(getPrinters())); in setObserver()
193 mObserver.onPrintersAdded(new ParceledListSlice<PrinterInfo>(addedPrinters)); in addPrinters()
253 mObserver.onPrintersRemoved(new ParceledListSlice<PrinterId>( in removePrinters()
296 mObserver.onPrintersAdded(new ParceledListSlice<PrinterInfo>(addedPrinters)); in sendOutOfDiscoveryPeriodPrinterChanges()
316 mObserver.onPrintersRemoved(new ParceledListSlice<PrinterId>(removedPrinterIds)); in sendOutOfDiscoveryPeriodPrinterChanges()
516 if (!mIsDestroyed && mObserver != null) { in validatePrinters()
522 if (!mIsDestroyed && mObserver != null in startPrinterStateTracking()
536 if (!mIsDestroyed && mObserver != null) { in requestCustomPrinterIcon()
[all …]
DCustomPrinterIconCallback.java33 private final @NonNull IPrintServiceClient mObserver; field in CustomPrinterIconCallback
44 mObserver = observer; in CustomPrinterIconCallback()
55 mObserver.onCustomPrinterIconLoaded(mPrinterId, icon); in onCustomPrinterIconLoaded()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/
DAboveShelfObserverTest.java42 private AboveShelfObserver mObserver; field in AboveShelfObserverTest
52 mObserver = new AboveShelfObserver(mHostLayout); in setUp()
54 row.setAboveShelfChangedListener(mObserver); in setUp()
57 row.setAboveShelfChangedListener(mObserver); in setUp()
65 mObserver.setListener(mListener); in testObserverChangesWhenGoingAbove()
74 mObserver.setListener(mListener); in testObserverChangesWhenGoingBelow()
87 mObserver.hasViewsAboveShelf()); in testStaysAboveWhenOneGoesAway()
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/
DItemTest.java58 @Mock private Observer mObserver; field in ItemTest
105 item.registerObserver(mObserver); in testProperties()
106 final InOrder inOrder = inOrder(mObserver); in testProperties()
109 inOrder.verify(mObserver).onItemRangeChanged(eq(item), eq(0), eq(1)); in testProperties()
112 inOrder.verify(mObserver).onItemRangeChanged(eq(item), eq(0), eq(1)); in testProperties()
115 inOrder.verify(mObserver).onItemRangeChanged(eq(item), eq(0), eq(1)); in testProperties()
119 inOrder.verify(mObserver).onItemRangeChanged(eq(item), eq(0), eq(1)); in testProperties()
124 inOrder.verify(mObserver).onItemRangeChanged(eq(item), eq(0), eq(1)); in testProperties()
164 item.registerObserver(mObserver); in testVisible()
170 verify(mObserver).onItemRangeRemoved(eq(item), eq(0), eq(1)); in testVisible()
[all …]
/frameworks/base/core/java/android/app/backup/
DRestoreSession.java43 RestoreObserverWrapper mObserver = null; field in RestoreSession
101 if (mObserver != null) { in restoreAll()
105 mObserver = new RestoreObserverWrapper(mContext, observer); in restoreAll()
110 err = mBinder.restoreAll(token, mObserver, monitorWrapper); in restoreAll()
157 if (mObserver != null) { in restorePackages()
161 mObserver = new RestoreObserverWrapper(mContext, observer); in restorePackages()
166 err = mBinder.restorePackages(token, mObserver, packages.toArray(new String[] {}), in restorePackages()
276 if (mObserver != null) { in restorePackage()
280 mObserver = new RestoreObserverWrapper(mContext, observer); in restorePackage()
285 err = mBinder.restorePackage(packageName, mObserver, monitorWrapper); in restorePackage()
/frameworks/base/core/java/android/database/
DCursorToBulkCursorAdaptor.java40 private ContentObserverProxy mObserver; field in CursorToBulkCursorAdaptor
249 if (mObserver != null) { in createAndRegisterObserverProxyLocked()
252 mObserver = new ContentObserverProxy(observer, this); in createAndRegisterObserverProxyLocked()
253 mCursor.registerContentObserver(mObserver); in createAndRegisterObserverProxyLocked()
258 if (mObserver != null) { in unregisterObserverProxyLocked()
259 mCursor.unregisterContentObserver(mObserver); in unregisterObserverProxyLocked()
260 mObserver.unlinkToDeath(this); in unregisterObserverProxyLocked()
261 mObserver = null; in unregisterObserverProxyLocked()
/frameworks/base/services/backup/java/com/android/server/backup/internal/
DPerformInitializeTask.java57 @Nullable private IBackupObserver mObserver; field in PerformInitializeTask
84 mObserver = observer; in PerformInitializeTask()
91 if (mObserver != null) { in notifyResult()
92 mObserver.onResult(target, status); in notifyResult()
95 mObserver = null; // don't try again in notifyResult()
101 if (mObserver != null) { in notifyFinished()
102 mObserver.backupFinished(status); in notifyFinished()
105 mObserver = null; in notifyFinished()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/internal/
DPerformInitializeTaskTest.java79 @Mock private IBackupObserver mObserver; field in PerformInitializeTaskTest
135 verify(mObserver).onResult(eq(mTransportName), eq(TRANSPORT_OK)); in testRun_callsObserverAndListenerCorrectly()
136 verify(mObserver).backupFinished(eq(TRANSPORT_OK)); in testRun_callsObserverAndListenerCorrectly()
163 verify(mObserver).onResult(eq(mTransportName), eq(TRANSPORT_ERROR)); in testRun_whenInitializeDeviceFails_callsObserverAndListenerCorrectly()
164 verify(mObserver).backupFinished(eq(TRANSPORT_ERROR)); in testRun_whenInitializeDeviceFails_callsObserverAndListenerCorrectly()
201 verify(mObserver).onResult(eq(mTransportName), eq(TRANSPORT_ERROR)); in testRun_whenFinishBackupFails_callsObserverAndListenerCorrectly()
202 verify(mObserver).backupFinished(eq(TRANSPORT_ERROR)); in testRun_whenFinishBackupFails_callsObserverAndListenerCorrectly()
257 verify(mObserver).onResult(eq(transport1.transportName), eq(TRANSPORT_ERROR)); in testRun_whenOnlyOneTransportFails()
258 verify(mObserver).onResult(eq(transport2.transportName), eq(TRANSPORT_OK)); in testRun_whenOnlyOneTransportFails()
259 verify(mObserver).backupFinished(eq(TRANSPORT_ERROR)); in testRun_whenOnlyOneTransportFails()
[all …]
/frameworks/base/core/java/android/util/
DKeyValueSettingObserver.java44 private final ContentObserver mObserver; field in KeyValueSettingObserver
50 mObserver = new SettingObserver(handler); in KeyValueSettingObserver()
57 mResolver.registerContentObserver(mSettingUri, false, mObserver); in start()
64 mResolver.unregisterContentObserver(mObserver); in stop()
/frameworks/base/core/java/android/print/
DPrinterDiscoverySession.java55 private IPrinterDiscoveryObserver mObserver; field in PrinterDiscoverySession
69 mObserver = new PrinterDiscoveryObserver(this); in PrinterDiscoverySession()
71 mPrintManager.createPrinterDiscoverySession(mObserver, mUserId); in PrinterDiscoverySession()
85 mPrintManager.startPrinterDiscovery(mObserver, priorityList, mUserId); in startPrinterDiscovery()
100 mPrintManager.stopPrinterDiscovery(mObserver, mUserId); in stopPrinterDiscovery()
183 return (mObserver == null); in isDestroyedNoCheck()
189 mPrintManager.destroyPrinterDiscoverySession(mObserver, mUserId); in destroyNoCheck()
193 mObserver = null; in destroyNoCheck()
/frameworks/base/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/
DBackupRestoreConfirmation.java70 FullObserver mObserver; field in BackupRestoreConfirmation
152 mObserver = new FullObserver(mHandler); in onCreate()
154 mObserver = (FullObserver) oldObserver; in onCreate()
155 mObserver.setHandler(mHandler); in onCreate()
228 sendAcknowledgement(mToken, true, mObserver); in setViews()
237 sendAcknowledgement(mToken, false, mObserver); in setViews()
288 return mObserver; in onRetainNonConfigurationInstance()
308 mObserver); in sendAcknowledgement()
/frameworks/base/core/java/com/android/internal/widget/
DWatchListDecorLayout.java54 private ViewTreeObserver mObserver; field in WatchListDecorLayout
85 mObserver = mListView.getViewTreeObserver(); in onAttachedToWindow()
86 mObserver.addOnScrollChangedListener(this); in onAttachedToWindow()
104 if (mObserver != null) { in onDetachedFromWindow()
105 if (mObserver.isAlive()) { in onDetachedFromWindow()
106 mObserver.removeOnScrollChangedListener(this); in onDetachedFromWindow()
108 mObserver = null; in onDetachedFromWindow()
/frameworks/base/core/java/android/text/method/
DTextKeyListener.java66 private TextKeyListener.SettingsObserver mObserver; field in TextKeyListener
254 contentResolver.unregisterContentObserver(mObserver); in release()
257 mObserver = null; in release()
266 if (mObserver == null) { in initPrefs()
267 mObserver = new SettingsObserver(); in initPrefs()
268 contentResolver.registerContentObserver(Settings.System.CONTENT_URI, true, mObserver); in initPrefs()
/frameworks/base/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/hp/
DServiceListener.java41 private final Observer mObserver; field in ServiceListener
52 mObserver = observer; in ServiceListener()
103 if (!mObserver.matchesCriteria(vendor, nsdServiceInfo)) in printerFound()
115 mObserver.dataSetChanged(); in printerFound()
128 mObserver.dataSetChanged(); in printerRemoved()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/keyvalue/
DKeyValueBackupReporterTest.java45 @Mock private IBackupObserver mObserver; field in KeyValueBackupReporterTest
52 mReporter = new KeyValueBackupReporter(mBackupManagerService, mObserver, mMonitor); in setUp()
78 assertThat(observer).isEqualTo(mObserver); in testGetObserver_returnsObserver()
DKeyValueBackupTaskTest.java178 @Mock private IBackupObserver mObserver; field in KeyValueBackupTaskTest
245 mReporter = spy(new KeyValueBackupReporter(mBackupManagerService, mObserver, mMonitor)); in setUp()
318 verify(mObserver, never()).onResult(any(), anyInt()); in testRunTask_whenQueueEmpty_notifiesCorrectly()
319 verify(mObserver).backupFinished(SUCCESS); in testRunTask_whenQueueEmpty_notifiesCorrectly()
362 verify(mObserver).backupFinished(ERROR_TRANSPORT_ABORTED); in testRunTask_whenOnePackageAndTransportUnavailable()
598 verify(mObserver).onResult(PACKAGE_1.packageName, ERROR_PACKAGE_NOT_FOUND); in testRunTask_whenPackageUnknown()
599 verify(mObserver).backupFinished(SUCCESS); in testRunTask_whenPackageUnknown()
628 verify(mObserver).onResult(PACKAGE_1.packageName, ERROR_BACKUP_NOT_ALLOWED); in testRunTask_whenPackageNotEligibleForBackup()
629 verify(mObserver).backupFinished(SUCCESS); in testRunTask_whenPackageNotEligibleForBackup()
657 verify(mObserver).onResult(packageData.packageName, ERROR_BACKUP_NOT_ALLOWED); in testRunTask_whenPackageDoesFullBackup()
[all …]
/frameworks/base/packages/PrintRecommendationService/src/com/android/printservice/recommendation/plugin/xerox/
DServiceResolver.java36 private final Observer mObserver; field in ServiceResolver
49 mObserver = observer; in ServiceResolver()
187 mObserver.dataSetChanged(); in printerFound()
194 mObserver.dataSetChanged(); in printerRemoved()
/frameworks/base/core/java/android/content/
DCursorLoader.java49 final ForceLoadContentObserver mObserver; field in CursorLoader
77 cursor.registerContentObserver(mObserver); in loadInBackground()
131 mObserver = new ForceLoadContentObserver(); in CursorLoader()
143 mObserver = new ForceLoadContentObserver(); in CursorLoader()
/frameworks/base/core/java/com/android/internal/view/
DRotationPolicy.java183 false, listener.mObserver, userHandle); in registerRotationPolicyListener()
186 false, listener.mObserver, userHandle); in registerRotationPolicyListener()
194 context.getContentResolver().unregisterContentObserver(listener.mObserver); in unregisterRotationPolicyListener()
201 final ContentObserver mObserver = new ContentObserver(new Handler()) { field in RotationPolicy.RotationPolicyListener

123