Home
last modified time | relevance | path

Searched refs:receiver (Results 1 – 25 of 76) sorted by relevance

1234

/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/
DBluetoothTestUtils.java427 BluetoothReceiver receiver = getBluetoothReceiver(mask); in enable() local
433 removeReceiver(receiver); in enable()
449 removeReceiver(receiver); in enable()
457 && (receiver.getFiredFlags() & mask) == mask) { in enable()
459 long finish = receiver.getCompletedTime(); in enable()
465 removeReceiver(receiver); in enable()
471 int firedFlags = receiver.getFiredFlags(); in enable()
472 removeReceiver(receiver); in enable()
487 BluetoothReceiver receiver = getBluetoothReceiver(mask); in disable() local
493 removeReceiver(receiver); in disable()
[all …]
/frameworks/support/v4/java/android/support/v4/content/
DLocalBroadcastManager.java49 final BroadcastReceiver receiver; field in LocalBroadcastManager.ReceiverRecord
54 receiver = _receiver; in ReceiverRecord()
61 builder.append(receiver); in toString()
133 public void registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver() argument
135 ReceiverRecord entry = new ReceiverRecord(filter, receiver); in registerReceiver()
136 ArrayList<IntentFilter> filters = mReceivers.get(receiver); in registerReceiver()
139 mReceivers.put(receiver, filters); in registerReceiver()
163 public void unregisterReceiver(BroadcastReceiver receiver) { in unregisterReceiver() argument
165 ArrayList<IntentFilter> filters = mReceivers.remove(receiver); in unregisterReceiver()
176 if (receivers.get(k).receiver == receiver) { in unregisterReceiver()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/
DBroadcastInterceptingContext.java49 public BroadcastInterceptor(BroadcastReceiver receiver, IntentFilter filter) { in BroadcastInterceptor() argument
50 mReceiver = receiver; in BroadcastInterceptor()
96 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver() argument
98 mInterceptors.add(new BroadcastInterceptor(receiver, filter)); in registerReceiver()
104 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, in registerReceiver() argument
106 return registerReceiver(receiver, filter); in registerReceiver()
110 public void unregisterReceiver(BroadcastReceiver receiver) { in unregisterReceiver() argument
115 if (receiver.equals(interceptor.mReceiver)) { in unregisterReceiver()
/frameworks/base/docs/html/guide/topics/manifest/
Dreceiver-element.jd1 page.title=&lt;receiver&gt;
8 <dd><pre class="stx">&lt;receiver android:<a href="#enabled">enabled</a>=["true" | "false"]
16 &lt;/receiver&gt;</pre></dd>
26 <dd>Declares a broadcast receiver (a {@link android.content.BroadcastReceiver}
32 There are two ways to make a broadcast receiver known to the system: One is
34 the receiver dynamically in code and register it with the <code>{@link
43 <dd>Whether or not the broadcast receiver can be instantiated by the system &mdash;
52 {@code &lt;receiver&gt;} attributes must both be "{@code true}" for
53 the broadcast receiver to be enabled. If either is "{@code false}", it is
58 <dd>Whether or not the broadcast receiver can receive messages from sources
[all …]
Dintent-filter-element.jd18 <br/><code><a href="{@docRoot}guide/topics/manifest/receiver-element.html">&lt;receiver&gt;</a></co…
29 receiver can respond to. An intent filter declares the capabilities of its
31 of broadcasts a receiver can handle. It opens the component to receiving
54 receiver when that component is presented to the user as having the
/frameworks/base/core/tests/coretests/src/android/content/pm/
DPackageManagerTests.java173 public boolean invokeInstallPackage(Uri packageURI, int flags, GenericReceiver receiver) { in invokeInstallPackage() argument
176 mContext.registerReceiver(receiver, receiver.filter); in invokeInstallPackage()
181 synchronized (receiver) { in invokeInstallPackage()
201 while((!receiver.isDone()) && (waitTime < MAX_WAIT_TIME) ) { in invokeInstallPackage()
203 receiver.wait(WAIT_TIME_INCR); in invokeInstallPackage()
209 if(!receiver.isDone()) { in invokeInstallPackage()
212 return receiver.received; in invokeInstallPackage()
216 mContext.unregisterReceiver(receiver); in invokeInstallPackage()
576 GenericReceiver receiver = new DeleteReceiver(pkg.packageName); in installFromRawResource() local
577 invokeDeletePackage(pkg.packageName, 0, receiver); in installFromRawResource()
[all …]
/frameworks/base/services/java/com/android/server/am/
DReceiverList.java38 public final IIntentReceiver receiver; field in ReceiverList
50 receiver = _receiver; in ReceiverList()
66 owner.unregisterReceiver(receiver); in binderDied()
106 sb.append((receiver.asBinder() instanceof Binder) ? " local:" : " remote:"); in toString()
107 sb.append(Integer.toHexString(System.identityHashCode(receiver.asBinder()))); in toString()
DPendingThumbnailsRecord.java29 final IThumbnailReceiver receiver; // who is waiting. field in PendingThumbnailsRecord
35 receiver = _receiver; in PendingThumbnailsRecord()
DBroadcastRecord.java59 IBinder receiver; // who is currently running, null if none. field in BroadcastRecord
123 if (nextReceiver != 0 || receiver != null) { in dump()
125 pw.print(" receiver="); pw.println(receiver); in dump()
/frameworks/base/services/java/com/android/server/
DLocationManagerService.java420 Receiver receiver = mReceivers.get(binder); in locationCallbackFinished() local
421 if (receiver != null) { in locationCallbackFinished()
422 synchronized (receiver) { in locationCallbackFinished()
425 receiver.decrementPendingBroadcastsLocked(); in locationCallbackFinished()
993 Receiver receiver, int uid) { in UpdateRecord() argument
995 mReceiver = receiver; in UpdateRecord()
1045 Receiver receiver = mReceivers.get(binder); in getReceiver() local
1046 if (receiver == null) { in getReceiver()
1047 receiver = new Receiver(listener); in getReceiver()
1048 mReceivers.put(binder, receiver); in getReceiver()
[all …]
DCountryDetectorService.java152 for (Receiver receiver : mReceivers.values()) { in notifyReceivers()
154 receiver.getListener().onCountryDetected(country); in notifyReceivers()
/frameworks/base/core/tests/hosttests/src/android/content/pm/
DPackageManagerHostTestUtils.java256 InstallReceiver receiver = new InstallReceiver(); in installFileForwardLocked() local
259 mDevice.executeShellCommand(cmd, receiver); in installFileForwardLocked()
261 return receiver.getErrorMessage(); in installFileForwardLocked()
475 CollectingOutputReceiver receiver = new CollectingOutputReceiver(); in executeShellCommand() local
476 mDevice.executeShellCommand(command, receiver); in executeShellCommand()
477 String output = receiver.getOutput(); in executeShellCommand()
521 CollectingOutputReceiver receiver = new CollectingOutputReceiver(); in rebootDevice() local
522 mDevice.executeShellCommand(command, receiver); in rebootDevice()
523 String output = receiver.getOutput(); in rebootDevice()
/frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/
DDownloadManagerBaseTest.java405 MultipleDownloadsCompletedReceiver receiver = new MultipleDownloadsCompletedReceiver(); in registerNewMultipleDownloadsReceiver() local
406 mContext.registerReceiver(receiver, new IntentFilter( in registerNewMultipleDownloadsReceiver()
408 return receiver; in registerNewMultipleDownloadsReceiver()
428 WiFiChangedReceiver receiver = new WiFiChangedReceiver(mContext); in setWiFiStateOn() local
429 mContext.registerReceiver(receiver, new IntentFilter( in setWiFiStateOn()
432 synchronized (receiver) { in setWiFiStateOn()
436 while (receiver.getWiFiIsOn() != enable && !timedOut) { in setWiFiStateOn()
438 receiver.wait(DEFAULT_WAIT_POLL_TIME); in setWiFiStateOn()
452 assertEquals(enable, receiver.getWiFiIsOn()); in setWiFiStateOn()
/frameworks/base/core/tests/coretests/src/android/app/
DDownloadManagerBaseTest.java470 MultipleDownloadsCompletedReceiver receiver = new MultipleDownloadsCompletedReceiver(); in registerNewMultipleDownloadsReceiver() local
471 mContext.registerReceiver(receiver, new IntentFilter( in registerNewMultipleDownloadsReceiver()
473 return receiver; in registerNewMultipleDownloadsReceiver()
523 WiFiChangedReceiver receiver = new WiFiChangedReceiver(mContext); in setWiFiStateOn() local
524 mContext.registerReceiver(receiver, new IntentFilter( in setWiFiStateOn()
527 synchronized (receiver) { in setWiFiStateOn()
531 while (receiver.getWiFiIsOn() != enable && !timedOut) { in setWiFiStateOn()
533 receiver.wait(DEFAULT_WAIT_POLL_TIME); in setWiFiStateOn()
547 assertEquals(enable, receiver.getWiFiIsOn()); in setWiFiStateOn()
DDownloadManagerStressTest.java125 MultipleDownloadsCompletedReceiver receiver = registerNewMultipleDownloadsReceiver(); in testDownloadLargeFile() local
137 assertEquals(1, receiver.numDownloadsCompleted()); in testDownloadLargeFile()
138 mContext.unregisterReceiver(receiver); in testDownloadLargeFile()
/frameworks/base/core/java/android/content/
DContextWrapper.java340 BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver() argument
341 return mBase.registerReceiver(receiver, filter); in registerReceiver()
346 BroadcastReceiver receiver, IntentFilter filter, in registerReceiver() argument
348 return mBase.registerReceiver(receiver, filter, broadcastPermission, in registerReceiver()
353 public void unregisterReceiver(BroadcastReceiver receiver) { in unregisterReceiver() argument
354 mBase.unregisterReceiver(receiver); in unregisterReceiver()
DContext.java1126 public abstract Intent registerReceiver(BroadcastReceiver receiver, in registerReceiver() argument
1160 public abstract Intent registerReceiver(BroadcastReceiver receiver, in registerReceiver() argument
1174 public abstract void unregisterReceiver(BroadcastReceiver receiver); in unregisterReceiver() argument
/frameworks/base/services/sensorservice/tests/
Dsensorservicetest.cpp28 int receiver(int fd, int events, void* data) in receiver() function
84 loop->addFd(q->getFd(), 0, ALOOPER_EVENT_INPUT, receiver, q.get()); in main()
/frameworks/base/core/java/android/content/pm/
DRegisteredServicesCache.java107 final BroadcastReceiver receiver = new BroadcastReceiver() { in RegisteredServicesCache() local
113 mReceiver = new AtomicReference<BroadcastReceiver>(receiver); in RegisteredServicesCache()
119 mContext.registerReceiver(receiver, intentFilter); in RegisteredServicesCache()
124 mContext.registerReceiver(receiver, sdFilter); in RegisteredServicesCache()
223 final BroadcastReceiver receiver = mReceiver.getAndSet(null); in close() local
224 if (receiver != null) { in close()
225 mContext.unregisterReceiver(receiver); in close()
/frameworks/base/test-runner/src/android/test/
DIsolatedContext.java85 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver() argument
90 public void unregisterReceiver(BroadcastReceiver receiver) { in unregisterReceiver() argument
/frameworks/base/core/java/android/app/
DContextImpl.java109 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver() argument
110 return registerReceiver(receiver, filter, null, null); in registerReceiver()
114 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, in registerReceiver() argument
1023 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver() argument
1024 return registerReceiver(receiver, filter, null, null); in registerReceiver()
1028 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, in registerReceiver() argument
1030 return registerReceiverInternal(receiver, filter, broadcastPermission, in registerReceiver()
1034 private Intent registerReceiverInternal(BroadcastReceiver receiver, in registerReceiverInternal() argument
1038 if (receiver != null) { in registerReceiverInternal()
1044 receiver, context, scheduler, in registerReceiverInternal()
[all …]
DLoadedApk.java699 final BroadcastReceiver receiver = mReceiver; in run() local
714 if (receiver == null || mForgotten) { in run()
727 receiver.setPendingResult(this); in run()
728 receiver.onReceive(mContext, intent); in run()
743 if (receiver.getPendingResult() != null) { in run()
749 ReceiverDispatcher(BroadcastReceiver receiver, Context context, in ReceiverDispatcher() argument
757 mReceiver = receiver; in ReceiverDispatcher()
/frameworks/base/test-runner/src/android/test/mock/
DMockContext.java306 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver() argument
311 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, in registerReceiver() argument
317 public void unregisterReceiver(BroadcastReceiver receiver) { in unregisterReceiver() argument
/frameworks/base/core/java/android/view/
DKeyEvent.java2511 public final boolean dispatch(Callback receiver) { in dispatch() argument
2512 return dispatch(receiver, null, null); in dispatch()
2526 public final boolean dispatch(Callback receiver, DispatcherState state, in dispatch() argument
2533 boolean res = receiver.onKeyDown(mKeyCode, this); in dispatch()
2540 if (receiver.onKeyLongPress(mKeyCode, this)) { in dispatch()
2557 return receiver.onKeyUp(mKeyCode, this); in dispatch()
2561 if (receiver.onKeyMultiple(code, count, this)) { in dispatch()
2567 boolean handled = receiver.onKeyDown(code, this); in dispatch()
2570 receiver.onKeyUp(code, this); in dispatch()
/frameworks/base/core/java/android/app/admin/
DDeviceAdminInfo.java218 public DeviceAdminInfo(Context context, ResolveInfo receiver) in DeviceAdminInfo() argument
220 mReceiver = receiver; in DeviceAdminInfo()
221 ActivityInfo ai = receiver.activityInfo; in DeviceAdminInfo()

1234