Home
last modified time | relevance | path

Searched refs:receivers (Results 1 – 25 of 52) sorted by relevance

123

/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/broadcast/
DFakeBroadcastDispatcher.kt64 private val receivers: MutableSet<InternalReceiver> = ConcurrentHashMap.newKeySet() constant
74 receivers.add(InternalReceiver(receiver, filter)) in registerReceiverWithHandler()
85 receivers.add(InternalReceiver(receiver, filter)) in registerReceiver()
89 receivers.removeIf { it.receiver == receiver } in unregisterReceiver()
93 receivers.removeIf { it.receiver == receiver } in unregisterReceiverForUser()
107 receivers.forEach { in sendIntentToMatchingReceiversOnly()
125 get() = receivers.size
128 receivers.forEach { in cleanUpReceivers()
135 receivers.clear() in cleanUpReceivers()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/am/
DBroadcastRecordTest.java323 final Intent actual = r.getReceiverIntent(r.receivers.get(0)); in testGetReceiverIntent_Simple()
336 final Intent actual = r.getReceiverIntent(r.receivers.get(0)); in testGetReceiverIntent_Filtered_Partial()
351 final Intent actual = r.getReceiverIntent(r.receivers.get(0)); in testGetReceiverIntent_Filtered_Complete()
491 final List<ResolveInfo> receivers = List.of(createResolveInfo(PACKAGE1, getAppId(1))); in testMatchesDeliveryGroup() local
497 final BroadcastRecord record1 = createBroadcastRecord(receivers, UserHandle.USER_ALL, in testMatchesDeliveryGroup()
504 final BroadcastRecord record2 = createBroadcastRecord(receivers, UserHandle.USER_ALL, in testMatchesDeliveryGroup()
512 final List<ResolveInfo> receivers = List.of(createResolveInfo(PACKAGE1, getAppId(1))); in testMatchesDeliveryGroup_withMatchingKey() local
519 final BroadcastRecord record1 = createBroadcastRecord(receivers, UserHandle.USER_ALL, in testMatchesDeliveryGroup_withMatchingKey()
527 final BroadcastRecord record2 = createBroadcastRecord(receivers, UserHandle.USER_ALL, in testMatchesDeliveryGroup_withMatchingKey()
535 final BroadcastRecord record3 = createBroadcastRecord(receivers, UserHandle.USER_ALL, in testMatchesDeliveryGroup_withMatchingKey()
[all …]
DBroadcastQueueTest.java413 List<Object> receivers) { in makeBroadcastRecord() argument
415 receivers, false, null, null, UserHandle.USER_SYSTEM); in makeBroadcastRecord()
419 int userId, List<Object> receivers) { in makeBroadcastRecord() argument
421 receivers, false, null, null, userId); in makeBroadcastRecord()
425 BroadcastOptions options, List<Object> receivers) { in makeBroadcastRecord() argument
427 receivers, false, null, null, UserHandle.USER_SYSTEM); in makeBroadcastRecord()
431 List<Object> receivers, IIntentReceiver resultTo) { in makeBroadcastRecord() argument
433 receivers, false, resultTo, null, UserHandle.USER_SYSTEM); in makeBroadcastRecord()
437 List<Object> receivers, IIntentReceiver resultTo, Bundle resultExtras) { in makeOrderedBroadcastRecord() argument
439 receivers, true, resultTo, resultExtras, UserHandle.USER_SYSTEM); in makeOrderedBroadcastRecord()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/
DBroadcastReceiverTests.java53 final List<EmptyReceiver> receivers = new ArrayList<>(RECEIVER_LIMIT_PER_APP); in testReceiverLimit() local
59 receivers.add(receiver); in testReceiverLimit()
66 for (int i = receivers.size() - 1; i >= 0; i--) { in testReceiverLimit()
67 mContext.unregisterReceiver(receivers.remove(i)); in testReceiverLimit()
/frameworks/base/services/core/java/com/android/server/am/
DBroadcastRecord.java110 final @NonNull List<Object> receivers; // contains BroadcastFilter and ResolveInfo field in BroadcastRecord
254 return (receivers.get(index) instanceof BroadcastFilter) && !ordered in isAssumedDelivered()
371 final int N = receivers != null ? receivers.size() : 0; in dump()
375 Object o = receivers.get(i); in dump()
412 BroadcastOptions options, List receivers, in BroadcastRecord() argument
422 excludedPermissions, excludedPackages, appOp, options, receivers, resultToApp, in BroadcastRecord()
462 receivers = (_receivers != null) ? _receivers : EMPTY_RECEIVERS; in BroadcastRecord()
468 blockedUntilBeyondCount = calculateBlockedUntilBeyondCount(receivers, _serialized); in BroadcastRecord()
521 receivers = from.receivers; in BroadcastRecord()
756 @NonNull List<Object> receivers, boolean ordered) { in calculateBlockedUntilBeyondCount()
[all …]
DBroadcastQueue.md7 * **Normal** broadcast intents are dispatched to relevant receivers.
9 receivers, where each receiver has the opportunity to influence the final
10 "result" of a broadcast, including aborting delivery to any remaining receivers.
11 * **Sticky** broadcast intents are dispatched to relevant receivers, and are
12 then retained internally for immediate dispatch to any future receivers. (This
18 * Registered receivers (via `Context.registerReceiver()` methods) are
22 * Manifest receivers (via the `<receiver>` tag in `AndroidManifest.xml`) are
DBroadcastQueueModernImpl.java646 setDeliveryState(queue, queue.app, record, index, record.receivers.get(index), in finishOrReEnqueueActiveBroadcast()
742 return (r.receivers.get(i) instanceof BroadcastFilter); in onApplicationCleanupLocked()
801 if (DEBUG_BROADCAST) logv("Enqueuing " + r + " for " + r.receivers.size() + " receivers"); in enqueueBroadcastLocked()
825 for (int i = 0; i < r.receivers.size(); i++) { in enqueueBroadcastLocked()
826 final Object receiver = r.receivers.get(i); in enqueueBroadcastLocked()
861 if (r.receivers.isEmpty() || !enqueuedBroadcast) { in enqueueBroadcastLocked()
874 for (int rcvrIdx = 0; rcvrIdx < r.receivers.size(); ++rcvrIdx) { in skipAndCancelReplacedBroadcasts()
898 if (r.receivers.size() > 1) { in applyDeliveryGroupPolicy()
936 ? r.containsReceiver(testRecord.receivers.get(testIndex)) in applyDeliveryGroupPolicy()
939 return r.containsReceiver(testRecord.receivers.get(testIndex)); in applyDeliveryGroupPolicy()
[all …]
DBroadcastProcessQueue.java389 final Object receiver = record.receivers.get(recordIndex); in replaceBroadcastInQueue()
394 final Object testReceiver = testRecord.receivers.get(testRecordIndex); in replaceBroadcastInQueue()
737 if (record.receivers.get(recordIndex) instanceof ResolveInfo) { in onBroadcastEnqueued()
778 if (record.receivers.get(recordIndex) instanceof ResolveInfo) { in onBroadcastDequeued()
1611 final Object receiver = record.receivers.get(recordIndex); in dumpRecord()
1629 pw.println(record.receivers.size()); in dumpRecord()
DComponentAliasResolver.java219 final List<ResolveInfo> receivers = mContext.getPackageManager() in loadFromMetadataLockedInner() local
222 extractAliasesLocked(receivers); in loadFromMetadataLockedInner()
/frameworks/base/telephony/java/android/telephony/mbms/vendor/
DVendorUtils.java150 List<ResolveInfo> receivers = in getAppReceiverFromPackageName() local
152 if (receivers != null && receivers.size() > 0) { in getAppReceiverFromPackageName()
/frameworks/base/packages/SystemUI/src/com/android/systemui/demomode/
DDemoModeController.kt59 private val receivers = mutableListOf<DemoMode>() in <lambda>() constant in com.android.systemui.demomode.DemoModeController
111 synchronized(this) { receivers.add(listener) } in <lambda>()
122 receivers.remove(listener) in <lambda>()
171 synchronized(this) { copy = receivers.toList() } in <lambda>()
181 synchronized(this) { copy = receivers.toList() } in <lambda>()
213 synchronized(this) { copy = receivers.toList() } in <lambda>()
/frameworks/base/packages/Shell/src/com/android/shell/
DProfcollectUploadReceiver.java77 List<ResolveInfo> receivers = in onReceive() local
79 if (receivers == null || receivers.isEmpty()) { in onReceive()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/util/
DPartner.java141 List<ResolveInfo> receivers; in get() local
143 receivers = in get()
152 receivers = pm.queryBroadcastReceivers(intent, 0); in get()
155 for (ResolveInfo info : receivers) { in get()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DCarrierSmsUtils.java57 List<ResolveInfo> receivers = packageManager.queryIntentServices(intent, 0); in getImsRcsPackageForIntent() local
58 for (ResolveInfo info : receivers) { in getImsRcsPackageForIntent()
DCarrierServicesSmsFilter.java186 List<ResolveInfo> receivers = packageManager.queryIntentServices(intent, 0); in getSystemAppForIntent() local
189 for (ResolveInfo info : receivers) { in getSystemAppForIntent()
/frameworks/base/telephony/common/com/android/internal/telephony/
DSmsApplication.java272 HashMap<String, SmsApplicationData> receivers = new HashMap<String, SmsApplicationData>(); in getApplicationCollectionInternal() local
284 if (!receivers.containsKey(packageName)) { in getApplicationCollectionInternal()
288 receivers.put(packageName, smsApplicationData); in getApplicationCollectionInternal()
307 final SmsApplicationData smsApplicationData = receivers.get(packageName); in getApplicationCollectionInternal()
328 final SmsApplicationData smsApplicationData = receivers.get(packageName); in getApplicationCollectionInternal()
346 final SmsApplicationData smsApplicationData = receivers.get(packageName); in getApplicationCollectionInternal()
368 final SmsApplicationData smsApplicationData = receivers.get(packageName); in getApplicationCollectionInternal()
395 final SmsApplicationData smsApplicationData = receivers.get(packageName); in getApplicationCollectionInternal()
422 final SmsApplicationData smsApplicationData = receivers.get(packageName); in getApplicationCollectionInternal()
440 final SmsApplicationData smsApplicationData = receivers.get(packageName); in getApplicationCollectionInternal()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DVerifyingSession.java445 final ParceledListSlice<ResolveInfo> receivers = mPm.queryIntentReceivers(snapshot, in sendPackageVerificationRequest() local
449 Slog.d(TAG, "Found " + receivers.getList().size() + " verifiers for intent " in sendPackageVerificationRequest()
500 receivers.getList(), verificationState); in sendPackageVerificationRequest()
577 requiredVerifierPackage, receivers.getList()); in sendPackageVerificationRequest()
736 List<ResolveInfo> receivers, final PackageVerificationState verificationState) { in matchVerifiers() argument
747 receivers); in matchVerifiers()
769 List<ResolveInfo> receivers) { in matchComponentForVerifier() argument
772 final int nr = receivers.size(); in matchComponentForVerifier()
774 final ResolveInfo info = receivers.get(i); in matchComponentForVerifier()
/frameworks/base/core/java/android/content/pm/
DPackageInfo.java179 public ActivityInfo[] receivers; field in PackageInfo
603 dest.writeTypedArray(receivers, parcelableFlags); in writeToParcel()
677 receivers = source.createTypedArray(ActivityInfo.CREATOR); in PackageInfo()
/frameworks/base/services/tests/PackageManager/packageinstaller/src/com/android/packageinstaller/test/
DExportedComponentTest.kt46 val exported = it.receivers?.filter { it.exported } in verifyNoExportedReceivers()
/frameworks/base/services/core/java/com/android/server/pm/parsing/pkg/
DAndroidPackageUtils.java189 List<ParsedActivity> receivers = pkg.getReceivers(); in hasComponentClassName() local
190 int receiversSize = receivers.size(); in hasComponentClassName()
192 if (Objects.equals(className, receivers.get(index).getName())) { in hasComponentClassName()
/frameworks/base/media/java/android/media/midi/
DMidiDeviceServer.java519 MidiReceiver[] receivers = new MidiReceiver[mOutputPortCount]; in getOutputPortReceivers() local
520 System.arraycopy(mOutputPortDispatchers, 0, receivers, 0, mOutputPortCount); in getOutputPortReceivers()
521 return receivers; in getOutputPortReceivers()
/frameworks/base/services/core/java/com/android/server/pm/resolution/
DComponentResolverLocked.java161 @Nullable String resolvedType, long flags, @NonNull List<ParsedActivity> receivers, in queryReceivers() argument
164 return super.queryReceivers(computer, intent, resolvedType, flags, receivers, userId); in queryReceivers()
/frameworks/base/core/java/com/android/internal/pm/parsing/pkg/
DPackageImpl.java174 protected List<ParsedActivity> receivers = emptyList(); field in PackageImpl
656 this.receivers = CollectionUtils.add(this.receivers, parsedReceiver); in addReceiver()
1233 return receivers; in getReceivers()
2573 Collections.sort(this.receivers, ORDER_COMPARATOR);
2794 receivers = Collections.unmodifiableList(receivers);
2937 int receiversSize = receivers.size();
2939 ComponentMutateUtils.setPackageName(receivers.get(index), this.packageName);
2968 int receiversSize = receivers.size();
2970 ComponentMutateUtils.setDirectBootAware(receivers.get(index),
3050 int receiversSize = receivers.size();
[all …]
/frameworks/base/tools/aapt2/integration-tests/DumpTest/
Dcomponents_expected.txt47 other-receivers
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DDevicePolicyEngine.java1070 List<ResolveInfo> receivers = in sendPolicyResultToAdmin() local
1075 if (receivers.isEmpty()) { in sendPolicyResultToAdmin()
1092 maybeSendIntentToAdminReceivers(intent, UserHandle.of(admin.getUserId()), receivers); in sendPolicyResultToAdmin()
1123 List<ResolveInfo> receivers = in maybeSendOnPolicyChanged() local
1128 if (receivers.isEmpty()) { in maybeSendOnPolicyChanged()
1144 intent, UserHandle.of(admin.getUserId()), receivers); in maybeSendOnPolicyChanged()
1149 Intent intent, UserHandle userHandle, List<ResolveInfo> receivers) { in maybeSendIntentToAdminReceivers() argument
1150 for (ResolveInfo resolveInfo : receivers) { in maybeSendIntentToAdminReceivers()

123