Home
last modified time | relevance | path

Searched refs:filter (Results 1 – 25 of 106) sorted by relevance

12345

/cts/tests/tests/bluetooth/src/android/bluetooth/cts/
DScanFilterTest.java66 ScanFilter filter = mFilterBuilder.setDeviceName(LOCAL_NAME).build(); in testsetNameFilter() local
67 assertEquals(LOCAL_NAME, filter.getDeviceName()); in testsetNameFilter()
68 assertTrue("setName filter fails", filter.matches(mScanResult)); in testsetNameFilter()
70 filter = mFilterBuilder.setDeviceName("Pem").build(); in testsetNameFilter()
71 assertFalse("setName filter fails", filter.matches(mScanResult)); in testsetNameFilter()
76 ScanFilter filter = mFilterBuilder.setDeviceAddress(DEVICE_MAC).build(); in testDeviceAddressFilter() local
77 assertEquals(DEVICE_MAC, filter.getDeviceAddress()); in testDeviceAddressFilter()
78 assertTrue("device filter fails", filter.matches(mScanResult)); in testDeviceAddressFilter()
80 filter = mFilterBuilder.setDeviceAddress("11:22:33:44:55:66").build(); in testDeviceAddressFilter()
81 assertFalse("device filter fails", filter.matches(mScanResult)); in testDeviceAddressFilter()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DDeviceAdminTestReceiver.java56 IntentFilter filter = new IntentFilter(); in setupProfile() local
57 filter.addAction(ByodHelperActivity.ACTION_QUERY_PROFILE_OWNER); in setupProfile()
58 filter.addAction(ByodHelperActivity.ACTION_REMOVE_PROFILE_OWNER); in setupProfile()
59 filter.addAction(ByodHelperActivity.ACTION_INSTALL_APK); in setupProfile()
60 filter.addAction(ByodHelperActivity.ACTION_CHECK_INTENT_FILTERS); in setupProfile()
61 filter.addAction(ByodHelperActivity.ACTION_CAPTURE_AND_CHECK_IMAGE); in setupProfile()
62 filter.addAction(ByodHelperActivity.ACTION_CAPTURE_AND_CHECK_VIDEO); in setupProfile()
63 filter.addAction(ByodHelperActivity.ACTION_CAPTURE_AND_CHECK_AUDIO); in setupProfile()
64 filter.addAction(ByodHelperActivity.ACTION_KEYGUARD_DISABLED_FEATURES); in setupProfile()
65 filter.addAction(ByodHelperActivity.ACTION_LOCKNOW); in setupProfile()
[all …]
/cts/tests/tests/os/jni/seccomp-tests/tests/
Dseccomp_bpf_tests.c133 struct sock_filter filter[] = { in TEST() local
137 .len = (unsigned short)(sizeof(filter)/sizeof(filter[0])), in TEST()
138 .filter = filter, in TEST()
164 struct sock_filter *filter; in TEST() local
167 filter = calloc(count, sizeof(*filter)); in TEST()
168 ASSERT_NE(NULL, filter); in TEST()
171 filter[i] = allow[0]; in TEST()
177 prog.filter = filter; in TEST()
200 struct sock_filter *filter; in TEST() local
203 filter = calloc(count, sizeof(*filter)); in TEST()
[all …]
Dsigsegv.c68 struct sock_filter filter[] = { in FIXTURE_SETUP() local
85 self->prog.filter = malloc(sizeof(filter)); in FIXTURE_SETUP()
86 ASSERT_NE(NULL, self->prog.filter); in FIXTURE_SETUP()
87 memcpy(self->prog.filter, filter, sizeof(filter)); in FIXTURE_SETUP()
88 self->prog.len = (unsigned short)(sizeof(filter)/sizeof(filter[0])); in FIXTURE_SETUP()
93 if (self->prog.filter) in FIXTURE_TEARDOWN()
94 free(self->prog.filter); in FIXTURE_TEARDOWN()
Dresumption.c92 struct sock_filter filter[] = { in FIXTURE_SETUP() local
116 self->prog.filter = malloc(sizeof(filter)); in FIXTURE_SETUP()
117 ASSERT_NE(NULL, self->prog.filter); in FIXTURE_SETUP()
118 memcpy(self->prog.filter, filter, sizeof(filter)); in FIXTURE_SETUP()
119 self->prog.len = (unsigned short)(sizeof(filter)/sizeof(filter[0])); in FIXTURE_SETUP()
124 if (self->prog.filter) in FIXTURE_TEARDOWN()
125 free(self->prog.filter); in FIXTURE_TEARDOWN()
/cts/tests/tests/text/src/android/text/method/cts/
DDigitsKeyListenerTest.java53 assertNull(digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
58 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
63 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
68 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
75 Spanned filtered = (Spanned) digitsKeyListener.filter(spannableSource, in testFilter1()
82 assertNull(digitsKeyListener.filter("", 0, 0, dest, 0, dest.length())); in testFilter1()
110 assertNull(digitsKeyListener.filter(source, 0, source.length(), in testFilter2()
115 assertNull(digitsKeyListener.filter(source, 0, source.length(), in testFilter2()
120 assertEquals("-123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter2()
125 assertEquals("-123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter2()
[all …]
/cts/tests/tests/text/src/android/text/cts/
DLoginFilterTest.java45 assertNull(loginFilter.filter(source1, 0, source1.length(), dest1, 0, dest1.length())); in testFilter()
51 assertNull(loginFilter.filter(source1, 0, source1.length(), dest2, 5, 6)); in testFilter()
57 assertNull(loginFilter.filter(source2, 0, source2.length(), in testFilter()
64 assertNull(loginFilter.filter(spannedSource, 0, spannedSource.length(), in testFilter()
71 result = loginFilter.filter(source2, 0, source2.length(), dest1, 0, dest1.length()); in testFilter()
79 result = loginFilter.filter(spannedSource, 0, spannedSource.length(), in testFilter()
87 loginFilter.filter(null, 0, source1.length(), dest1, 0, dest1.length()); in testFilter()
94 loginFilter.filter(source1, -1, source1.length() + 1, dest1, 0, dest1.length()); in testFilter()
102 loginFilter.filter(source1, source1.length(), 0, dest1, 0, dest1.length())); in testFilter()
105 loginFilter.filter(source1, 0, source1.length(), null, 2, dest1.length()); in testFilter()
[all …]
/cts/tools/tradefed-host/tests/src/com/android/cts/tradefed/testtype/
DTestFilterTest.java52 assertEquals(mTestList.size(), mFilter.filter(mTestList).size()); in testFilter_empty()
60 Collection<TestIdentifier> filteredList = mFilter.filter(mTestList); in testFilter_excludeTest()
72 Collection<TestIdentifier> filteredList = mFilter.filter(mTestList); in testFilter_excludeClass()
82 Collection<TestIdentifier> filteredList = mFilter.filter(mTestList); in testFilter_includeClass()
94 Collection<TestIdentifier> filteredList = mFilter.filter(mTestList); in testFilter_includeTest()
105 Collection<TestIdentifier> filteredList = mFilter.filter(mTestList); in testFilter_includeClasses()
116 Collection<TestIdentifier> filteredList = mFilter.filter(mTestList); in testFilter_includeTests()
131 assertTrue(mFilter.filter(mTestList).isEmpty()); in testFilter_includeAndExcludeClasses()
141 assertTrue(mFilter.filter(mTestList).isEmpty()); in testFilter_includeAndExcludeTests()
151 assertTrue(mFilter.filter(mTestList).isEmpty()); in testFilter_includeTestAndExcludeClass()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
DBleClientStartActivity.java66 IntentFilter filter = new IntentFilter(); in onResume() local
67 filter.addAction(BleClientService.BLE_BLUETOOTH_CONNECTED); in onResume()
68 filter.addAction(BleClientService.BLE_BLUETOOTH_DISCONNECTED); in onResume()
69 filter.addAction(BleClientService.BLE_SERVICES_DISCOVERED); in onResume()
70 filter.addAction(BleClientService.BLE_CHARACTERISTIC_READ); in onResume()
71 filter.addAction(BleClientService.BLE_CHARACTERISTIC_WRITE); in onResume()
72 filter.addAction(BleClientService.BLE_CHARACTERISTIC_CHANGED); in onResume()
73 filter.addAction(BleClientService.BLE_DESCRIPTOR_READ); in onResume()
74 filter.addAction(BleClientService.BLE_DESCRIPTOR_WRITE); in onResume()
75 filter.addAction(BleClientService.BLE_RELIABLE_WRITE_COMPLETED); in onResume()
[all …]
DBleServerStartActivity.java65 IntentFilter filter = new IntentFilter(); in onResume() local
66 filter.addAction(BleServerService.BLE_SERVICE_ADDED); in onResume()
67 filter.addAction(BleServerService.BLE_SERVER_CONNECTED); in onResume()
68 filter.addAction(BleServerService.BLE_CHARACTERISTIC_READ_REQUEST); in onResume()
69 filter.addAction(BleServerService.BLE_CHARACTERISTIC_WRITE_REQUEST); in onResume()
70 filter.addAction(BleServerService.BLE_DESCRIPTOR_READ_REQUEST); in onResume()
71 filter.addAction(BleServerService.BLE_DESCRIPTOR_WRITE_REQUEST); in onResume()
72 filter.addAction(BleServerService.BLE_EXECUTE_WRITE); in onResume()
73 filter.addAction(BleServerService.BLE_SERVER_DISCONNECTED); in onResume()
74 filter.addAction(BleServerService.BLE_OPEN_FAIL); in onResume()
[all …]
DBleAdvertiserHardwareScanFilterActivity.java85 IntentFilter filter = new IntentFilter(); in onResume() local
86 filter.addAction(BleAdvertiserService.BLE_ADV_NOT_SUPPORT); in onResume()
87 filter.addAction(BleAdvertiserService.BLE_START_SCANNABLE); in onResume()
88 filter.addAction(BleAdvertiserService.BLE_START_UNSCANNABLE); in onResume()
89 filter.addAction(BleAdvertiserService.BLE_STOP_SCANNABLE); in onResume()
90 filter.addAction(BleAdvertiserService.BLE_STOP_UNSCANNABLE); in onResume()
91 registerReceiver(onBroadcast, filter); in onResume()
DBleAdvertiserPowerLevelActivity.java67 IntentFilter filter = new IntentFilter(); in onResume() local
68 filter.addAction(BleAdvertiserService.BLE_START_POWER_LEVEL); in onResume()
69 filter.addAction(BleAdvertiserService.BLE_STOP_POWER_LEVEL); in onResume()
70 filter.addAction(BleAdvertiserService.BLE_ADV_NOT_SUPPORT); in onResume()
71 registerReceiver(onBroadcast, filter); in onResume()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DPersistentIntentResolvingTest.java36 IntentFilter filter = new IntentFilter(); in setUp() local
37 filter.addAction(ExampleIntentReceivingActivity1.CONFIRM_ACTION); in setUp()
38 filter.addAction(ExampleIntentReceivingActivity2.CONFIRM_ACTION); in setUp()
41 mContext.registerReceiver(mReceiver, filter); in setUp()
121 IntentFilter filter = new IntentFilter(); in addPersistentPreferredActivity() local
122 filter.addAction(EXAMPLE_ACTION); in addPersistentPreferredActivity()
123 filter.addCategory(Intent.CATEGORY_DEFAULT); in addPersistentPreferredActivity()
126 mDevicePolicyManager.addPersistentPreferredActivity(ADMIN_RECEIVER_COMPONENT, filter, in addPersistentPreferredActivity()
/cts/tests/tests/content/src/android/content/cts/
DIntentFilterTest.java77 IntentFilter filter = new IntentFilter(); in testConstructor() local
78 verifyContent(filter, null, null); in testConstructor()
80 filter = new IntentFilter(ACTION); in testConstructor()
81 verifyContent(filter, ACTION, null); in testConstructor()
86 filter = new IntentFilter(actionTypeFilter); in testConstructor()
87 verifyContent(filter, ACTION, DATA_TYPE); in testConstructor()
103 private void verifyContent(IntentFilter filter, String action, String dataType) { in verifyContent() argument
105 assertEquals(1, filter.countActions()); in verifyContent()
106 assertEquals(action, filter.getAction(0)); in verifyContent()
108 assertEquals(0, filter.countActions()); in verifyContent()
[all …]
/cts/tools/tradefed-host/src/com/android/cts/tradefed/testtype/
DTestPlan.java70 TestFilter filter = parseTestList( in startElement() local
75 mIdFilterMap.put(AbiUtils.createId(entryAbiValue, entryNameValue), filter); in startElement() local
78 mIdFilterMap.put(AbiUtils.createId(abi, entryNameValue), filter); in startElement() local
95 TestFilter filter = new TestFilter(); in parseTestList() local
101 filter.addExcludedTest(new TestIdentifier(classMethodPair[0], in parseTestList()
104 filter.addExcludedClass(testString); in parseTestList()
113 filter.addIncludedTest(new TestIdentifier(classMethodPair[0], in parseTestList()
116 filter.addIncludedClass(testString); in parseTestList()
121 return filter; in parseTestList()
191 TestFilter filter = mIdFilterMap.get(id); in addExcludedTest() local
[all …]
/cts/tests/tests/os/jni/
Dandroid_os_cts_OSFeatures.cpp51 struct sock_filter filter[] = { DENY }; in test_seccomp() local
54 prog.len = sizeof(filter) / sizeof(filter[0]); in test_seccomp()
55 prog.filter = filter; in test_seccomp()
/cts/tests/tests/assist/src/android/assist/cts/
DLifecycleTest.java77 IntentFilter filter = new IntentFilter(); in setUpAndRegisterReceiver() local
78 filter.addAction(action_hasResumed); in setUpAndRegisterReceiver()
79 filter.addAction(action_onPause); in setUpAndRegisterReceiver()
80 filter.addAction(action_onStop); in setUpAndRegisterReceiver()
81 filter.addAction(action_onDestroy); in setUpAndRegisterReceiver()
82 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
83 mContext.registerReceiver(mLifecycleTestBroadcastReceiver, filter); in setUpAndRegisterReceiver()
DWebViewTest.java71 IntentFilter filter = new IntentFilter(); in setUpAndRegisterReceiver() local
72 filter.addAction(Utils.APP_3P_HASRESUMED); in setUpAndRegisterReceiver()
73 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
74 filter.addAction(Utils.TEST_ACTIVITY_LOADED); in setUpAndRegisterReceiver()
75 mContext.registerReceiver(mReceiver, filter); in setUpAndRegisterReceiver()
DFocusChangeTest.java66 IntentFilter filter = new IntentFilter(); in setUpAndRegisterReceiver() local
67 filter.addAction(Utils.GAINED_FOCUS); in setUpAndRegisterReceiver()
68 filter.addAction(Utils.LOST_FOCUS); in setUpAndRegisterReceiver()
69 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
70 mContext.registerReceiver(mReceiver, filter); in setUpAndRegisterReceiver()
DFlagSecureTest.java66 IntentFilter filter = new IntentFilter(); in setUpAndRegisterReceiver() local
67 filter.addAction(Utils.FLAG_SECURE_HASRESUMED); in setUpAndRegisterReceiver()
68 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
69 mContext.registerReceiver(mReceiver, filter); in setUpAndRegisterReceiver()
DLargeViewHierarchyTest.java68 IntentFilter filter = new IntentFilter(); in setUpAndRegisterReceiver() local
69 filter.addAction(Utils.APP_3P_HASRESUMED); in setUpAndRegisterReceiver()
70 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
71 mContext.registerReceiver(mReceiver, filter); in setUpAndRegisterReceiver()
DAssistStructureTest.java69 IntentFilter filter = new IntentFilter(); in setUpAndRegisterReceiver() local
70 filter.addAction(Utils.APP_3P_HASRESUMED); in setUpAndRegisterReceiver()
71 filter.addAction(Utils.ASSIST_RECEIVER_REGISTERED); in setUpAndRegisterReceiver()
72 mContext.registerReceiver(mReceiver, filter); in setUpAndRegisterReceiver()
/cts/tests/tests/graphics/src/android/graphics/cts/
DPorterDuffColorFilterTest.java44 PorterDuffColorFilter filter = new PorterDuffColorFilter(filterColor, PorterDuff.Mode.SRC); in testPorterDuffColorFilter() local
47 p.setColorFilter(filter); in testPorterDuffColorFilter()
57 filter = new PorterDuffColorFilter(filterColor, PorterDuff.Mode.DST); in testPorterDuffColorFilter()
60 p.setColorFilter(filter); in testPorterDuffColorFilter()
67 filter = new PorterDuffColorFilter(Color.GREEN, PorterDuff.Mode.SCREEN); in testPorterDuffColorFilter()
70 p.setColorFilter(filter); in testPorterDuffColorFilter()
DColorMatrixColorFilterTest.java34 ColorMatrixColorFilter filter; in testColorMatrixColorFilter() local
43 filter = new ColorMatrixColorFilter(cm); in testColorMatrixColorFilter()
48 paint.setColorFilter(filter); in testColorMatrixColorFilter()
68 filter = new ColorMatrixColorFilter(transparentRedAddBlue); in testColorMatrixColorFilter()
69 paint.setColorFilter(filter); in testColorMatrixColorFilter()
/cts/tests/tests/widget/src/android/widget/cts/
DFilterTest.java53 MockFilter filter = new MockFilter(); in testConvertResultToString()
54 assertEquals("", filter.convertResultToString(null)); in testConvertResultToString()
55 assertEquals(testStr, filter.convertResultToString(testStr)); in testConvertResultToString()
64 mMockFilter.filter(TEST_CONSTRAINT); in testFilter1()
92 mMockFilter.filter(TEST_CONSTRAINT, mockFilterListener); in testFilter2()

12345