Home
last modified time | relevance | path

Searched refs:instance (Results 1 – 25 of 241) sorted by relevance

12345678910

/cts/tests/tests/nfc/src/android/nfc/cts/
DNfcFCardEmulationTest.java55 NfcFCardEmulation instance = NfcFCardEmulation.getInstance(mAdapter); in setUp() local
56 FieldReader serviceField = new FieldReader(instance, in setUp()
57 instance.getClass().getDeclaredField("sService")); in setUp()
64 NfcFCardEmulation instance = NfcFCardEmulation.getInstance(mAdapter); in tearDown()
65 FieldSetter.setField(instance, in tearDown()
66 instance.getClass().getDeclaredField("sService"), mOldService); in tearDown()
71 NfcFCardEmulation instance = NfcFCardEmulation.getInstance(mAdapter); in getNonNullInstance() local
72 Assert.assertNotNull(instance); in getNonNullInstance()
77 NfcFCardEmulation instance = createMockedInstance(); in testGetSystemCodeForService() local
81 String result = instance.getSystemCodeForService(mService); in testGetSystemCodeForService()
[all …]
DCardEmulationTest.java106 CardEmulation instance = CardEmulation.getInstance(mAdapter); in setUp() local
107 FieldReader serviceField = new FieldReader(instance, in setUp()
108 instance.getClass().getDeclaredField("sService")); in setUp()
119 CardEmulation instance = CardEmulation.getInstance(mAdapter); in restoreOriginalService() local
120 FieldSetter.setField(instance, in restoreOriginalService()
121 instance.getClass().getDeclaredField("sService"), mOldService); in restoreOriginalService()
125 CardEmulation instance = CardEmulation.getInstance(mAdapter); in setMockService() local
126 FieldSetter.setField(instance, instance.getClass().getDeclaredField("sService"), in setMockService()
132 CardEmulation instance = CardEmulation.getInstance(mAdapter); in getNonNullInstance() local
133 Assert.assertNotNull(instance); in getNonNullInstance()
[all …]
/cts/tests/tests/networksecurityconfig/networksecurityconfig-attributes/src/android/security/net/config/cts/
DTestAttributes.java34 NetworkSecurityPolicy instance = NetworkSecurityPolicy.getInstance(); in testCleartextTrafficPermitted() local
37 assertFalse(instance.isCleartextTrafficPermitted()); in testCleartextTrafficPermitted()
39 assertFalse(instance.isCleartextTrafficPermitted("foo.bar")); in testCleartextTrafficPermitted()
41 assertTrue(instance.isCleartextTrafficPermitted("example.foo.bar")); in testCleartextTrafficPermitted()
44 assertTrue(instance.isCleartextTrafficPermitted("android.com")); in testCleartextTrafficPermitted()
45 assertTrue(instance.isCleartextTrafficPermitted("foo.android.com")); in testCleartextTrafficPermitted()
47 assertTrue(instance.isCleartextTrafficPermitted("example.com")); in testCleartextTrafficPermitted()
48 assertTrue(instance.isCleartextTrafficPermitted("test.example.com")); in testCleartextTrafficPermitted()
50 assertTrue(instance.isCleartextTrafficPermitted("example.com")); in testCleartextTrafficPermitted()
/cts/tests/tests/systemui/src/android/systemui/cts/
DNotificationListener.kt36 instance = this in onListenerConnected()
41 instance = null in onListenerDisconnected()
56 private var instance: NotificationListener? = null variable
59 if (instance != null) { in startNotificationListener()
65 return wait { instance != null } in startNotificationListener()
69 if (instance == null) { in stopNotificationListener()
74 return wait { instance == null } in stopNotificationListener()
80 instance?.let { in waitForNotificationToAppear()
90 return instance?.let { in waitForNotificationToDisappear()
/cts/tests/tests/graphics/jni/
Dandroid_graphics_cts_VulkanFeaturesTest.cpp89 VkInstance instance = VK_NULL_HANDLE; in android_graphics_cts_VulkanFeaturesTest_nativeGetABPSupport() local
90 result = vpCreateInstance(&vpInstanceCreateInfo, nullptr, &instance); in android_graphics_cts_VulkanFeaturesTest_nativeGetABPSupport()
98 result = vkEnumeratePhysicalDevices(instance, &count, nullptr); in android_graphics_cts_VulkanFeaturesTest_nativeGetABPSupport()
100 vkDestroyInstance(instance, nullptr); in android_graphics_cts_VulkanFeaturesTest_nativeGetABPSupport()
107 result = vkEnumeratePhysicalDevices(instance, &count, devices.data()); in android_graphics_cts_VulkanFeaturesTest_nativeGetABPSupport()
109 vkDestroyInstance(instance, nullptr); in android_graphics_cts_VulkanFeaturesTest_nativeGetABPSupport()
117 result = vpGetPhysicalDeviceProfileSupport(instance, devices[i], &profile, &supported); in android_graphics_cts_VulkanFeaturesTest_nativeGetABPSupport()
186 VkInstance instance = VK_NULL_HANDLE; in android_graphics_cts_VulkanFeaturesTest_nativeGetABPCpuOnlySupport() local
187 result = vpCreateInstance(&vpInstanceCreateInfo, nullptr, &instance); in android_graphics_cts_VulkanFeaturesTest_nativeGetABPCpuOnlySupport()
195 result = vkEnumeratePhysicalDevices(instance, &count, nullptr); in android_graphics_cts_VulkanFeaturesTest_nativeGetABPCpuOnlySupport()
[all …]
/cts/tests/tests/companion/common/src/android/companion/cts/common/
DCompanionService.kt63 instanceHolder.instance = this as T in onCreate()
134 instanceHolder.instance = null in onDestroy()
150 var instance: T? = null variable in android.companion.cts.common.InstanceHolder
156 get() = instance?.isBound ?: false
159 get() = instance?.connectedDevices ?: emptySet()
162 get() = instance?.connectedDevices ?: emptySet()
165 get() = instance?.connectedUuidDevices ?: emptySet()
168 get() = instance?.associationIdsForConnectedDevices ?: emptySet()
171 get() = instance?.associationIdsForBtBondDevices ?: emptySet()
241 instance?.removeConnectedDevice(associationId)
[all …]
DCompanionActivity.kt56 val instance: CompanionActivity constant
70 instance.startIntentSenderForResult(intentSender, 0, null, 0, 0, 0) in startIntentSender()
74 instance.result in startIntentSender()
76 instance.result = null in startIntentSender()
80 fun finish() = instance.finish() in finish()
/cts/hostsidetests/media/app/ProxyMediaRouterWithMediaContentControlApp/src/android/media/router/cts/proxymediacontentcontrolapp/
DMediaRouter2DeviceTest.java119 MediaRouter2 instance = MediaRouter2.getInstance(mContext, mContext.getPackageName()); in requestScan_withScreenOnScanning_triggersScanning() local
120 assertThat(instance).isNotNull(); in requestScan_withScreenOnScanning_triggersScanning()
137 instance.registerRouteCallback(mExecutor, onRoutesUpdated, RouteDiscoveryPreference.EMPTY); in requestScan_withScreenOnScanning_triggersScanning()
139 MediaRouter2.ScanToken token = instance.requestScan(new ScanRequest.Builder().build()); in requestScan_withScreenOnScanning_triggersScanning()
145 instance.cancelScanRequest(token); in requestScan_withScreenOnScanning_triggersScanning()
147 instance.unregisterRouteCallback(onRoutesUpdated); in requestScan_withScreenOnScanning_triggersScanning()
154 MediaRouter2 instance = MediaRouter2.getInstance(mContext, mContext.getPackageName()); in cancelScanRequest_callTwice_throwsIllegalArgumentException() local
155 assertThat(instance).isNotNull(); in cancelScanRequest_callTwice_throwsIllegalArgumentException()
156 MediaRouter2.ScanToken token = instance.requestScan(new ScanRequest.Builder().build()); in cancelScanRequest_callTwice_throwsIllegalArgumentException()
157 instance.cancelScanRequest(token); in cancelScanRequest_callTwice_throwsIllegalArgumentException()
[all …]
/cts/tests/tests/networksecurityconfig/networksecurityconfig-nested-domains/src/android/security/net/config/cts/
DNestedDomainConfigTest.java35 NetworkSecurityPolicy instance = NetworkSecurityPolicy.getInstance(); in testRootDomainConfig() local
36 assertTrue(instance.isCleartextTrafficPermitted("android.com")); in testRootDomainConfig()
42 NetworkSecurityPolicy instance = NetworkSecurityPolicy.getInstance(); in testNestedDomainConfig() local
43 assertFalse(instance.isCleartextTrafficPermitted("developer.android.com")); in testNestedDomainConfig()
/cts/tools/vm-tests-tf/src/dot/junit/opcodes/instance_of/d/T_instance_of_2.smalis/
DT_instance_of_2.smali37 new-instance v10, Ldot/junit/opcodes/instance_of/d/T_instance_of_2/SubClass;
41 instance-of v15, v10, Ldot/junit/opcodes/instance_of/d/T_instance_of_2/SuperClass;
50 instance-of v15, v10, [Ldot/junit/opcodes/instance_of/d/T_instance_of_2/SuperClass;
57 instance-of v15, v10, Ljava/lang/Object;
62 new-instance v10, Ldot/junit/opcodes/instance_of/d/T_instance_of_2/SubClass;
66 instance-of v15, v10, Ldot/junit/opcodes/instance_of/d/T_instance_of_2/SuperInterface;
71 new-instance v10, Ldot/junit/opcodes/instance_of/d/T_instance_of_2/SuperClass;
75 instance-of v15, v10, Ldot/junit/opcodes/instance_of/d/T_instance_of_2/SubClass;
80 new-instance v10, Ldot/junit/opcodes/instance_of/d/T_instance_of_2/SubClass;
84 instance-of v15, v10, Ldot/junit/opcodes/instance_of/d/T_instance_of_2/SuperInterface2;
[all …]
/cts/common/device-side/bedstead/testapp/src/library/main/java/com/android/bedstead/testapp/
DTestAppActivities.java33 static TestAppActivities create(TestAppInstance instance) { in create() argument
34 TestAppActivities activities = new TestAppActivities(instance); in create()
39 private TestAppActivities(TestAppInstance instance) { in TestAppActivities() argument
40 mInstance = instance; in TestAppActivities()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DNotificationListener.java35 private static NotificationListener instance; field in NotificationListener
45 if (instance == null) { in getInstance()
48 return instance; in getInstance()
70 instance = this; in onListenerConnected()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DActivityTest.java70 try (TestAppInstance instance = sTestApp.install(sDeviceState.workProfile())) { in startActivityForResultAsUser_differentUser_startedSuccessfully() argument
72 instance.activities().query() in startActivityForResultAsUser_differentUser_startedSuccessfully()
93 try (TestAppInstance instance = sTestApp.install(sDeviceState.workProfile())) { in startActivityForResultAsUser_requestCodeAndResultPassedSuccessfully() argument
95 instance.activities().query() in startActivityForResultAsUser_requestCodeAndResultPassedSuccessfully()
127 try (TestAppInstance instance = sTestApp.install(sDeviceState.workProfile())) { in startActivityForResultAsUser_noPermissions_throwsSecurityException() argument
129 instance.activities().query() in startActivityForResultAsUser_noPermissions_throwsSecurityException()
150 try (TestAppInstance instance = sTestApp.install(sDeviceState.workProfile())) { in startActivityAsUser_differentUser_startedSuccessfully() argument
152 instance.activities().query() in startActivityAsUser_differentUser_startedSuccessfully()
174 try (TestAppInstance instance = sTestApp.install(sDeviceState.workProfile())) { in startActivityAsUser_noPermissions_throwsSecurityException() argument
176 instance.activities().query() in startActivityAsUser_noPermissions_throwsSecurityException()
/cts/tests/tests/appop/AppForDiscreteTest/src/android/app/appops/cts/appfordiscretetest/
DAppOpsForegroundControlActivity.kt29 private var instance: AppOpsForegroundControlActivity? = null variable
59 instance?.finish() in finish()
72 instance = this in onCreate()
100 instance = null in onDestroy()
DAppOpsForegroundControlForegroundService.kt32 private var instance: AppOpsForegroundControlForegroundService? = null variable
44 instance?.stopSelf() in stop()
65 instance = this in onStartCommand()
75 instance = null in onUnbind()
DAppOpsForegroundControlLocationForegroundService.kt33 private var instance: AppOpsForegroundControlLocationForegroundService? = null variable
45 instance?.stopSelf() in stop()
67 instance = this in onStartCommand()
77 instance = null in onUnbind()
/cts/tests/tests/appop/AppThatCanBeForcedIntoForegroundStates/src/android/app/appops/cts/appthatcanbeforcedintoforegroundstates/
DAppOpsForegroundControlActivity.kt29 private var instance: AppOpsForegroundControlActivity? = null variable
59 instance?.finish() in finish()
72 instance = this in onCreate()
100 instance = null in onDestroy()
DAppOpsForegroundControlForegroundService.kt32 private var instance: AppOpsForegroundControlForegroundService? = null variable
44 instance?.stopSelf() in stop()
65 instance = this in onStartCommand()
75 instance = null in onUnbind()
DAppOpsForegroundControlLocationForegroundService.kt33 private var instance: AppOpsForegroundControlLocationForegroundService? = null variable
45 instance?.stopSelf() in stop()
67 instance = this in onStartCommand()
77 instance = null in onUnbind()
/cts/tests/sensor/jni/
Dandroid_hardware_cts_SensorNativeTest.cpp34 void tearDown(JNIEnv*, jclass, jlong instance) { in tearDown() argument
35 delete reinterpret_cast<SensorTest *>(instance); in tearDown()
38 void test(JNIEnv* env, jclass, jlong instance) { in test() argument
39 SensorTest *test = reinterpret_cast<SensorTest *>(instance); in test()
/cts/tests/tests/multiuser/src/android/multiuser/cts/
DUserVisibilityTestCase.java101 runTestOnDisplay(DEFAULT_DISPLAY, (user, displayId, instance) -> test.run(user, instance)); in runTestOnDefaultDisplay()
117 try (TestAppInstance instance = testApp.install(user)) { in runTestOnDisplay() argument
118 test.run(user, displayId, instance); in runTestOnDisplay()
152 try (TestAppInstance instance = testApp.install(profile)) { in runTestOnSecondaryDisplay() argument
153 tester.run(user, profile, displayId, instance); in runTestOnSecondaryDisplay()
163 void run(UserReference user, int displayId, TestAppInstance instance); in run() argument
168 TestAppInstance instance); in run() argument
172 void run(UserReference user, TestAppInstance instance); in run() argument
/cts/apps/CtsVerifier/src/com/android/cts/verifier/vr/
DMockVrListenerService.java51 public final VrListenerService instance; field in MockVrListenerService.Event
56 instance = i; in Event()
61 public static Event build(VrListenerService instance, EventType type, Object argument1) { in build() argument
62 return new Event(instance, type, argument1); in build()
65 public static Event build(VrListenerService instance, EventType type) { in build() argument
66 return new Event(instance, type, null); in build()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/notifications/
DNeneNotificationListenerService.kt32 instance.set(this) in onListenerConnected()
38 instance.set(null) in onListenerDisconnected()
52 val instance = AtomicReference<NeneNotificationListenerService?>() constant
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/
DShortcutManagerNegativeTest.java51 private static Object readField(Object instance, String field) in readField() argument
53 final Field f = instance.getClass().getDeclaredField(field); in readField()
55 final Object ret = f.get(instance); in readField()
62 private static void callMethodExpectingSecurityException(Object instance, String name, in callMethodExpectingSecurityException() argument
67 for (Method method : instance.getClass().getDeclaredMethods()) { in callMethodExpectingSecurityException()
79 m.invoke(instance, args); in callMethodExpectingSecurityException()
/cts/tests/tests/time/src/android/app/time/cts/
DParcelableTestSupport.java50 public static <T extends Parcelable> void assertRoundTripParcelable(T instance) { in assertRoundTripParcelable() argument
51 assertEquals(instance, roundTripParcelable(instance)); in assertRoundTripParcelable()

12345678910