/packages/modules/StatsD/statsd/tests/ |
D | LogEventFilter_test.cpp | 40 bool testGuaranteedUnusedAtomsNotInUse(const LogEventFilter& filter) { in testGuaranteedUnusedAtomsNotInUse() argument 44 atLeastOneInUse |= filter.isAtomInUse(atomId); in testGuaranteedUnusedAtomsNotInUse() 52 LogEventFilter filter; in TEST() local 55 EXPECT_FALSE(filter.isAtomInUse(atomId)); in TEST() 60 LogEventFilter filter; in TEST() local 61 EXPECT_FALSE(filter.isAtomInUse(1)); in TEST() 63 EXPECT_EQ(0, filter.mTagIdsPerConsumer.size()); in TEST() 64 EXPECT_EQ(0, filter.mLocalTagIds.size()); in TEST() 65 filter.setAtomIds(std::move(emptyAtomIdsSet), reinterpret_cast<LogEventFilter::ConsumerId>(0)); in TEST() 66 EXPECT_FALSE(filter.isAtomInUse(1)); in TEST() [all …]
|
/packages/modules/Uwb/service/tests/src/com/android/server/uwb/correction/filtering/ |
D | MedAvgFilterTest.java | 29 MedAvgFilter filter = new MedAvgFilter(3, 1); in averageTest() local 30 filter.add(1, 0); in averageTest() 31 filter.add(2, 0); in averageTest() 32 filter.add(3, 0); in averageTest() 33 assertThat(filter.getResult().value).isEqualTo((1 + 2 + 3) / 3f); in averageTest() 39 MedAvgFilter filter = new MedAvgFilter(3, 1); in slideTest() local 40 filter.add(1, 0); in slideTest() 41 filter.add(2, 0); in slideTest() 42 filter.add(3, 0); in slideTest() 43 filter.add(4, 0); in slideTest() [all …]
|
D | MedAvgRotationFilterFilterTest.java | 32 MedAvgRotationFilter filter = new MedAvgRotationFilter(3, 1); in averageTest() local 33 filter.add((float) toRadians(175), 0); in averageTest() 34 filter.add((float) toRadians(-175), 0); in averageTest() 35 filter.add((float) toRadians(5), 0); in averageTest() 38 assertClose(filter.getResult().value, toRadians((175 + (360 - 175) + 5) / 3f)); in averageTest() 43 MedAvgRotationFilter filter = new MedAvgRotationFilter(3, 1); in remapTest() local 44 filter.add((float) toRadians(175), 0); in remapTest() 45 filter.add((float) toRadians(-175), 0); in remapTest() 46 filter.add((float) toRadians(5), 0); in remapTest() 49 filter.remap(b -> b + F_HALF_PI); in remapTest() [all …]
|
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/common/ble/ |
D | BleFilterTest.java | 182 BleFilter filter = mFilterBuilder.setDeviceName("Ped").build(); in setNameFilter() local 183 assertThat(filter.matches(mBleSighting)).isTrue(); in setNameFilter() 185 filter = mFilterBuilder.setDeviceName("Pem").build(); in setNameFilter() 186 assertThat(filter.matches(mBleSighting)).isFalse(); in setNameFilter() 191 BleFilter filter = in setServiceUuidFilter() local 195 assertThat(filter.matches(mBleSighting)).isTrue(); in setServiceUuidFilter() 197 filter = in setServiceUuidFilter() 201 assertThat(filter.matches(mBleSighting)).isFalse(); in setServiceUuidFilter() 203 filter = in setServiceUuidFilter() 209 assertThat(filter.matches(mBleSighting)).isTrue(); in setServiceUuidFilter() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/mapclient/ |
D | MessagesFilterTest.java | 33 MessagesFilter filter = new MessagesFilter(); in setOriginator() local 36 filter.setOriginator(originator); in setOriginator() 37 assertThat(filter.originator).isEqualTo(originator); in setOriginator() 39 filter.setOriginator(""); in setOriginator() 40 assertThat(filter.originator).isEqualTo(null); // Empty string is stored as null in setOriginator() 42 filter.setOriginator(null); in setOriginator() 43 assertThat(filter.originator).isEqualTo(null); in setOriginator() 48 MessagesFilter filter = new MessagesFilter(); in setPriority() local 51 filter.setPriority(priority); in setPriority() 53 assertThat(filter.priority).isEqualTo(priority); in setPriority() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/gatt/ |
D | ScanFilterQueue.java | 213 void addScanFilter(ScanFilter filter) { in addScanFilter() argument 214 if (filter == null) { in addScanFilter() 217 if (filter.getDeviceName() != null) { in addScanFilter() 218 addName(filter.getDeviceName()); in addScanFilter() 220 if (filter.getDeviceAddress() != null) { in addScanFilter() 226 addDeviceAddress(filter.getDeviceAddress(), (byte) filter.getAddressType(), in addScanFilter() 227 filter.getIrk()); in addScanFilter() 229 if (filter.getServiceUuid() != null) { in addScanFilter() 230 if (filter.getServiceUuidMask() == null) { in addScanFilter() 231 addUuid(filter.getServiceUuid().getUuid()); in addScanFilter() [all …]
|
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/ |
D | ReceiverTrackingContext.java | 46 public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver() argument 47 addReceiver(receiver, "registerReceiver(%s, %s)", receiver, filter); in registerReceiver() 49 return super.registerReceiver(receiver, filter); in registerReceiver() 53 public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter, in registerReceiver() argument 55 addReceiver(receiver, "registerReceiver(%s, %s, %d)", receiver, filter, flags); in registerReceiver() 57 return super.registerReceiver(receiver, filter, flags); in registerReceiver() 61 public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter, in registerReceiver() argument 64 receiver, filter, broadcastPermission, scheduler); in registerReceiver() 66 return super.registerReceiver(receiver, filter, broadcastPermission, in registerReceiver() 71 public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter, in registerReceiver() argument [all …]
|
/packages/apps/Contacts/src/com/android/contacts/list/ |
D | DefaultContactListAdapter.java | 70 final ContactListFilter filter = getFilter(); in configureLoader() local 71 configureUri(loader, directoryId, filter); in configureLoader() 90 final ContactListFilter filter = getFilter(); in configureLoader() local 91 configureUri(loader, directoryId, filter); in configureLoader() 92 if (filter != null in configureLoader() 93 && (filter.filterType == ContactListFilter.FILTER_TYPE_DEVICE_CONTACTS in configureLoader() 94 || filter.filterType == ContactListFilter.FILTER_TYPE_SIM_CONTACTS)) { in configureLoader() 99 configureSelection(loader, directoryId, filter); in configureLoader() 119 final ContactListFilter filter = getFilter(); in isGroupMembersFilter() local 120 return filter != null && filter.filterType == ContactListFilter.FILTER_TYPE_GROUP_MEMBERS; in isGroupMembersFilter() [all …]
|
D | DefaultContactBrowseListFragment.java | 314 final ContactListFilter filter = getFilter(); in bindListHeader() local 317 if (!isSearchMode() && numberOfContacts <= 0 && shouldShowEmptyView(filter)) { in bindListHeader() 318 if (filter != null && filter.isContactsFilterType()) { in bindListHeader() 328 } else if (filter.filterType == ContactListFilter.FILTER_TYPE_CUSTOM) { in bindListHeader() 330 } else if (filter.filterType != ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS) { in bindListHeader() 332 filter.accountName, filter.accountType, filter.dataSet); in bindListHeader() 345 private boolean shouldShowEmptyView(ContactListFilter filter) { in shouldShowEmptyView() argument 346 if (filter == null) { in shouldShowEmptyView() 350 if (ContactListFilter.FILTER_TYPE_DEFAULT == filter.filterType in shouldShowEmptyView() 351 || ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS == filter.filterType) { in shouldShowEmptyView() [all …]
|
D | ContactListFilter.java | 239 public static void storeToPreferences(SharedPreferences prefs, ContactListFilter filter) { in storeToPreferences() argument 240 if (filter != null && filter.filterType == FILTER_TYPE_SINGLE_CONTACT) { in storeToPreferences() 244 .putInt(KEY_FILTER_TYPE, filter == null ? FILTER_TYPE_DEFAULT : filter.filterType) in storeToPreferences() 245 .putString(KEY_ACCOUNT_NAME, filter == null ? null : filter.accountName) in storeToPreferences() 246 .putString(KEY_ACCOUNT_TYPE, filter == null ? null : filter.accountType) in storeToPreferences() 247 .putString(KEY_DATA_SET, filter == null ? null : filter.dataSet) in storeToPreferences() 256 ContactListFilter filter = restoreFromPreferences(prefs); in restoreDefaultPreferences() local 257 if (filter == null) { in restoreDefaultPreferences() 258 filter = ContactListFilter.createFilterWithType(FILTER_TYPE_ALL_ACCOUNTS); in restoreDefaultPreferences() 262 if (filter.filterType == FILTER_TYPE_GROUP || in restoreDefaultPreferences() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
D | AccountFilterUtil.java | 87 final ContactListFilter filter = (ContactListFilter) in handleAccountFilterResult() local 89 if (filter == null) { in handleAccountFilterResult() 92 if (filter.filterType == ContactListFilter.FILTER_TYPE_CUSTOM) { in handleAccountFilterResult() 95 filterController.setContactListFilter(filter, /* persistent */ in handleAccountFilterResult() 96 filter.filterType == ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS); in handleAccountFilterResult() 180 public static void startEditorIntent(Context context, Intent src, ContactListFilter filter) { 187 if (!isAllContactsFilter(filter) && filter.accountName != null 188 && filter.accountType != null) { 189 final Account account = new Account(filter.accountName, filter.accountType); 191 intent.putExtra(Intents.Insert.EXTRA_DATA_SET, filter.dataSet); [all …]
|
/packages/services/Telecomm/src/com/android/server/telecom/callfiltering/ |
D | IncomingCallFilterGraph.java | 62 public PostFilterTask(final CallFilter filter) { in PostFilterTask() argument 63 mFilter = filter; in PostFilterTask() 69 for (CallFilter filter : mFilter.getFollowings()) { in whenDone() 70 if (filter.decrementAndGetIndegree() == 0) { in whenDone() 71 scheduleFilter(filter); in whenDone() 102 public void addFilter(CallFilter filter) { in addFilter() argument 103 mFiltersList.add(filter); in addFilter() 111 for (CallFilter filter : mFiltersList) { in performFiltering() 112 addEdge(dummyStart, filter); in performFiltering() 114 for (CallFilter filter : mFiltersList) { in performFiltering() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/mapclient/obex/ |
D | RequestGetMessagesListing.java | 39 RequestGetMessagesListing(String folderName, int parameters, MessagesFilter filter, in RequestGetMessagesListing() argument 63 if (filter != null) { in RequestGetMessagesListing() 64 if (filter.messageType != MessagesFilter.MESSAGE_TYPE_ALL) { in RequestGetMessagesListing() 65 oap.add(OAP_TAGID_FILTER_MESSAGE_TYPE, filter.messageType); in RequestGetMessagesListing() 68 if (filter.periodBegin != null) { in RequestGetMessagesListing() 69 oap.add(OAP_TAGID_FILTER_PERIOD_BEGIN, filter.periodBegin); in RequestGetMessagesListing() 72 if (filter.periodEnd != null) { in RequestGetMessagesListing() 73 oap.add(OAP_TAGID_FILTER_PERIOD_END, filter.periodEnd); in RequestGetMessagesListing() 76 if (filter.readStatus != MessagesFilter.READ_STATUS_ANY) { in RequestGetMessagesListing() 77 oap.add(OAP_TAGID_FILTER_READ_STATUS, filter.readStatus); in RequestGetMessagesListing() [all …]
|
D | MessagesFilter.java | 44 public void setMessageType(byte filter) { in setMessageType() argument 45 messageType = filter; in setMessageType() 62 public void setRecipient(String filter) { in setRecipient() argument 63 if (filter != null && filter.isEmpty()) { in setRecipient() 66 recipient = filter; in setRecipient() 70 public void setOriginator(String filter) { in setOriginator() argument 71 if (filter != null && filter.isEmpty()) { in setOriginator() 74 originator = filter; in setOriginator() 78 public void setPriority(byte filter) { in setPriority() argument 79 priority = filter; in setPriority()
|
/packages/apps/Dialer/java/com/android/contacts/common/util/ |
D | AccountFilterUtil.java | 33 View filterContainer, ContactListFilter filter, boolean showTitleForAllAccounts) { in updateAccountFilterTitleForPhone() argument 34 return updateAccountFilterTitle(filterContainer, filter, showTitleForAllAccounts, true); in updateAccountFilterTitleForPhone() 39 ContactListFilter filter, in updateAccountFilterTitle() argument 47 if (filter != null) { in updateAccountFilterTitle() 49 if (filter.filterType == ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS) { in updateAccountFilterTitle() 54 } else if (filter.filterType == ContactListFilter.FILTER_TYPE_ACCOUNT) { in updateAccountFilterTitle() 56 context.getString(R.string.listAllContactsInAccount, filter.accountName)); in updateAccountFilterTitle() 58 } else if (filter.filterType == ContactListFilter.FILTER_TYPE_CUSTOM) { in updateAccountFilterTitle() 63 if (filter.filterType == ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS) { in updateAccountFilterTitle() 68 } else if (filter.filterType == ContactListFilter.FILTER_TYPE_ACCOUNT) { in updateAccountFilterTitle() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ |
D | TEST_MAPPING | 7 "include-filter": "android.permission.cts.BackgroundPermissionsTest" 10 "include-filter": "android.permission.cts.LocationAccessCheckTest" 13 "include-filter": "android.permission.cts.NotificationListenerCheckTest" 16 "include-filter": "android.permission.cts.OneTimePermissionTest" 19 "include-filter": "android.permission.cts.PermissionControllerTest" 22 "include-filter": "android.permission.cts.PlatformPermissionGroupMappingTest" 43 "include-filter": "android.permission.cts.BackgroundPermissionsTest" 46 "include-filter": "android.permission.cts.LocationAccessCheckTest" 49 "include-filter": "android.permission.cts.NotificationListenerCheckTest" 52 "include-filter": "android.permission.cts.OneTimePermissionTest" [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/ |
D | FilterEnvironment.java | 112 ImageFilter filter = mFiltersManager.getFilterForRepresentation(representation); in applyRepresentation() local 113 filter.useRepresentation(representation); in applyRepresentation() 114 filter.setEnvironment(this); in applyRepresentation() 115 if (filter.supportsAllocationInput()) { in applyRepresentation() 116 filter.apply(in, out); in applyRepresentation() 118 filter.setGeneralParameters(); in applyRepresentation() 119 filter.setEnvironment(null); in applyRepresentation() 129 ImageFilter filter = mFiltersManager.getFilterForRepresentation(representation); in applyRepresentation() local 130 if (filter == null){ in applyRepresentation() 133 filter.useRepresentation(representation); in applyRepresentation() [all …]
|
/packages/apps/Dialer/java/com/android/contacts/common/list/ |
D | ContactListFilter.java | 97 public static void storeToPreferences(SharedPreferences prefs, ContactListFilter filter) { in storeToPreferences() argument 98 if (filter != null && filter.filterType == FILTER_TYPE_SINGLE_CONTACT) { in storeToPreferences() 103 .putInt(KEY_FILTER_TYPE, filter == null ? FILTER_TYPE_DEFAULT : filter.filterType) in storeToPreferences() 104 .putString(KEY_ACCOUNT_NAME, filter == null ? null : filter.accountName) in storeToPreferences() 105 .putString(KEY_ACCOUNT_TYPE, filter == null ? null : filter.accountType) in storeToPreferences() 106 .putString(KEY_DATA_SET, filter == null ? null : filter.dataSet) in storeToPreferences() 115 ContactListFilter filter = restoreFromPreferences(prefs); in restoreDefaultPreferences() local 116 if (filter == null) { in restoreDefaultPreferences() 117 filter = ContactListFilter.createFilterWithType(FILTER_TYPE_ALL_ACCOUNTS); in restoreDefaultPreferences() 121 if (filter.filterType == FILTER_TYPE_GROUP || filter.filterType == FILTER_TYPE_SINGLE_CONTACT) { in restoreDefaultPreferences() [all …]
|
/packages/services/Car/service/src/com/android/car/user/ |
D | AppLifecycleListener.java | 60 @Nullable UserLifecycleEventFilter filter, BinderDeathCallback binderDeathCallback) { in AppLifecycleListener() argument 64 if (filter != null) { in AppLifecycleListener() 67 + " is initialized with filter %s.", receiver, packageName, filter); in AppLifecycleListener() 70 mFilters.add(filter); in AppLifecycleListener() 87 void addFilter(@Nullable UserLifecycleEventFilter filter) { in addFilter() argument 92 + " a null filter added before.", filter, this); in addFilter() 96 if (filter == null) { in addFilter() 106 filter, this); in addFilter() 108 mFilters.add(filter); in addFilter() 125 UserLifecycleEventFilter filter = mFilters.get(i); in applyFilters() local [all …]
|
/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/applications/manageapplications/ |
D | ManageApplicationsUnitTest.java | 44 AppFilter filter = in getCompositeFilter_filtersVolumeForAudio() local 55 assertThat(filter.filterApp(appEntry)).isTrue(); in getCompositeFilter_filtersVolumeForAudio() 60 AppFilter filter = in getCompositeFilter_filtersVolumeForVideo() local 71 assertThat(filter.filterApp(appEntry)).isTrue(); in getCompositeFilter_filtersVolumeForVideo() 76 ApplicationsState.AppFilter filter = in getCompositeFilter_filtersVolumeForGames() local 87 assertThat(filter.filterApp(appEntry)).isTrue(); in getCompositeFilter_filtersVolumeForGames() 92 ApplicationsState.AppFilter filter = in getCompositeFilter_isEmptyNormally() local 97 assertThat(filter).isNull(); in getCompositeFilter_isEmptyNormally() 106 AppFilter filter = in getCompositeFilter_worksWithInstantApps() local 111 AppFilter composedFilter = new CompoundFilter(ApplicationsState.FILTER_INSTANT, filter); in getCompositeFilter_worksWithInstantApps() [all …]
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | CallScreeningServiceFilterTest.java | 151 CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, null, in testNoPackageName() local 155 filter.startFilterLookup(inputResult).toCompletableFuture().get( in testNoPackageName() 165 CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, in testContextFailToBind() local 169 filter.startFilterLookup(inputResult).toCompletableFuture().get( in testContextFailToBind() 179 CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, in testNoResolveEntries() local 183 filter.startFilterLookup(inputResult).toCompletableFuture().get( in testNoResolveEntries() 192 CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, in testBadResolveEntry() local 196 filter.startFilterLookup(inputResult).toCompletableFuture().get( in testBadResolveEntry() 211 CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, in testNoBindingCondition() local 214 filter.startFilterLookup(inputResult); in testNoBindingCondition() [all …]
|
/packages/services/Car/service/src/com/android/car/pm/ |
D | TEST_MAPPING | 7 "include-filter": "com.android.car.pm.CarPackageManagerServiceTest" 10 "include-filter": "com.android.car.CarPackageManagerTest" 18 "include-filter": "com.android.car.pm.CarPackageManagerServiceUnitTest" 21 "include-filter": "com.android.car.pm.VendorServiceControllerTest" 24 "include-filter": "com.android.car.pm.VendorServiceInfoTest" 27 "include-filter": "com.android.car.pm.CarSafetyAccessibilityServiceImplTest" 30 "include-filter": "com.android.car.pm.WindowDumpParserTest" 38 "include-filter": "android.car.apitest.CarPackageManagerTest"
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/managedomainurls/ |
D | DomainUrlsUtilsTest.java | 128 IntentFilter filter = new IntentFilter(); in getHandledDomains_includeBrowsableIntentFiltersWithHttpDataScheme() local 129 filter.addCategory(Intent.CATEGORY_BROWSABLE); in getHandledDomains_includeBrowsableIntentFiltersWithHttpDataScheme() 130 filter.addDataScheme(IntentFilter.SCHEME_HTTP); in getHandledDomains_includeBrowsableIntentFiltersWithHttpDataScheme() 131 filter.addDataAuthority(new IntentFilter.AuthorityEntry(domain, port)); in getHandledDomains_includeBrowsableIntentFiltersWithHttpDataScheme() 135 .thenReturn(Arrays.asList(filter)); in getHandledDomains_includeBrowsableIntentFiltersWithHttpDataScheme() 147 IntentFilter filter = new IntentFilter(); in getHandledDomains_includeBrowsableIntentFiltersWithHttpsDataScheme() local 148 filter.addCategory(Intent.CATEGORY_BROWSABLE); in getHandledDomains_includeBrowsableIntentFiltersWithHttpsDataScheme() 149 filter.addDataScheme(IntentFilter.SCHEME_HTTPS); in getHandledDomains_includeBrowsableIntentFiltersWithHttpsDataScheme() 150 filter.addDataAuthority(new IntentFilter.AuthorityEntry(domain, port)); in getHandledDomains_includeBrowsableIntentFiltersWithHttpsDataScheme() 154 .thenReturn(Arrays.asList(filter)); in getHandledDomains_includeBrowsableIntentFiltersWithHttpsDataScheme() [all …]
|
/packages/services/Car/car-usb-handler/src/android/car/usb/handler/ |
D | UsbDeviceHandlerResolver.java | 138 UsbDeviceFilter filter = in dispatch() local 141 if (filter != null) { in dispatch() 149 ComponentName.unflattenFromString(filter.mAoapService))) { in dispatch() 151 requestAoapSwitch(device, filter); in dispatch() 158 + " handled by " + filter.mAoapService); in dispatch() 222 private void requestAoapSwitch(UsbDevice device, UsbDeviceFilter filter) throws IOException { in requestAoapSwitch() argument 233 filter.mAoapManufacturer, in requestAoapSwitch() 234 filter.mAoapModel, in requestAoapSwitch() 235 filter.mAoapDescription, in requestAoapSwitch() 236 filter.mAoapVersion, in requestAoapSwitch() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | MimeTypes.java | 169 public static boolean mimeMatches(String filter, String[] tests) { in mimeMatches() argument 174 if (mimeMatches(filter, test)) { in mimeMatches() 185 for (String filter : filters) { in mimeMatches() 186 if (mimeMatches(filter, test)) { in mimeMatches() 193 public static boolean mimeMatches(String filter, String test) { in mimeMatches() argument 196 } else if (filter == null || "*/*".equals(filter)) { in mimeMatches() 198 } else if (filter.equals(test)) { in mimeMatches() 200 } else if (filter.endsWith("/*")) { in mimeMatches() 201 return filter.regionMatches(0, test, 0, filter.indexOf('/')); in mimeMatches()
|