Home
last modified time | relevance | path

Searched refs:res (Results 1 – 25 of 431) sorted by relevance

12345678910>>...18

/cts/tests/tests/content/src/android/content/res/cts/
DConfigTest.java17 package android.content.res.cts;
23 import android.content.res.AssetManager;
24 import android.content.res.Configuration;
25 import android.content.res.Resources;
26 import android.content.res.TypedArray;
27 import android.content.res.Resources.NotFoundException;
59 private static void checkValue(final Resources res, final int resId, in checkValue() argument
62 final String actual = res.getString(resId); in checkValue()
75 private static void checkValue(final Resources res, final int resId, in checkValue() argument
77 final Resources.Theme theme = res.newTheme(); in checkValue()
[all …]
DResourceNameTest.java17 package android.content.res.cts;
19 import android.content.res.Resources;
29 final Resources res = mContext.getResources(); in testGetResourceName() local
31 final String fullName = res.getResourceName(R.configVarying.simple); in testGetResourceName()
34 final String packageName = res.getResourcePackageName(R.configVarying.simple); in testGetResourceName()
37 final String typeName = res.getResourceTypeName(R.configVarying.simple); in testGetResourceName()
40 final String entryName = res.getResourceEntryName(R.configVarying.simple); in testGetResourceName()
46 final Resources res = mContext.getResources(); in testGetResourceIdentifier() local
47 int resid = res.getIdentifier( in testGetResourceIdentifier()
52 resid = res.getIdentifier("configVarying/simple", null, in testGetResourceIdentifier()
[all …]
DArrayTest.java17 package android.content.res.cts;
19 import android.content.res.Resources;
34 private void checkEntry(final int resid, final int index, final Object res, in checkEntry() argument
37 + " at index " + index, expected, res); in checkEntry()
41 final String[] res = mResources.getStringArray(resid); in checkStringArray() local
42 assertEquals(res.length, expected.length); in checkStringArray()
44 checkEntry(resid, i, res[i], expected[i]); in checkStringArray()
49 final CharSequence[] res = mResources.getTextArray(resid); in checkTextArray() local
50 assertEquals(res.length, expected.length); in checkTextArray()
52 checkEntry(resid, i, res[i], expected[i]); in checkTextArray()
[all …]
DPluralResourcesTest.java17 package android.content.res.cts;
22 import android.content.res.Configuration;
23 import android.content.res.Resources;
52 final Resources res = resourcesForLanguage("en"); in testPlurals() local
54 cs = res.getQuantityText(R.plurals.plurals_test, 0); in testPlurals()
60 cs = res.getQuantityText(R.plurals.plurals_test, 1); in testPlurals()
66 cs = res.getQuantityText(R.plurals.plurals_test, 2); in testPlurals()
69 cs = res.getQuantityText(R.plurals.plurals_test, 5); in testPlurals()
72 cs = res.getQuantityText(R.plurals.plurals_test, 500); in testPlurals()
79 final Resources res = resourcesForLanguage("cs"); in testCzech() local
[all …]
DColorStateListTest.java16 package android.content.res.cts;
24 import android.content.res.ColorStateList;
25 import android.content.res.Resources;
26 import android.content.res.Resources.NotFoundException;
27 import android.content.res.Resources.Theme;
50 final Resources res = getContext().getResources(); in testCreateFromXml() local
51 final ColorStateList c = ColorStateList.createFromXml(res, res.getXml(xmlId)); in testCreateFromXml()
63 final Resources res = getContext().getResources(); in testCreateFromXmlThemed() local
64 final Theme theme = res.newTheme(); in testCreateFromXmlThemed()
66 final ColorStateList c = ColorStateList.createFromXml(res, res.getXml(xmlId), theme); in testCreateFromXmlThemed()
[all …]
DResources_ThemeTest.java17 package android.content.res.cts;
22 import android.content.res.Configuration;
23 import android.content.res.Resources;
24 import android.content.res.TypedArray;
25 import android.content.res.Resources.Theme;
126 Resources res = getContext().getResources(); in testRebase() local
127 Configuration config = res.getConfiguration(); in testRebase()
129 res.updateConfiguration(config, null); in testRebase()
134 Resources.Theme theme = res.newTheme(); in testRebase()
142 res.updateConfiguration(config, null); in testRebase()
[all …]
/cts/tests/tests/media/libaudiojni/
Dappendix-b-1-1-buffer-queue.cpp59 SLresult res; in BufferQueueCallback() local
62 res = (*queueItf)->Enqueue(queueItf, (void *)pCntxt->pData, in BufferQueueCallback()
64 ALOGE_IF(res != SL_RESULT_SUCCESS, "error: %s", android::getSLErrStr(res)); in BufferQueueCallback()
75 SLresult res; in TestPlayMusicBufferQueue() local
101 res = (*sl)->GetInterface(sl, SL_IID_ENGINE, (void *)&EngineItf); in TestPlayMusicBufferQueue()
102 CheckErr(res); in TestPlayMusicBufferQueue()
129 res = (*EngineItf)->CreateOutputMix(EngineItf, &OutputMix, interfaces, in TestPlayMusicBufferQueue()
131 CheckErr(res); in TestPlayMusicBufferQueue()
134 res = (*OutputMix)->Realize(OutputMix, SL_BOOLEAN_FALSE); in TestPlayMusicBufferQueue()
135 CheckErr(res); in TestPlayMusicBufferQueue()
[all …]
Dappendix-b-1-2-recording.cpp53 SLresult res; in TestAudioRecording() local
70 res = (*sl)->GetInterface(sl, SL_IID_ENGINE, (void *)&EngineItf); in TestAudioRecording()
71 CheckErr(res); in TestAudioRecording()
76 res = (*sl)->GetInterface(sl, SL_IID_AUDIOIODEVICECAPABILITIES, in TestAudioRecording()
81 res = (*AudioIODeviceCapabilitiesItf)->GetAvailableAudioInputs( in TestAudioRecording()
83 CheckErr(res); in TestAudioRecording()
87 res = (*AudioIODeviceCapabilitiesItf)->QueryAudioInputCapabilities( in TestAudioRecording()
89 CheckErr(res); in TestAudioRecording()
127 res = (*sl)->GetInterface(sl, SL_IID_DEVICEVOLUME, in TestAudioRecording()
132 res = (*devicevolumeItf)->SetVolume(devicevolumeItf, mic_deviceID, -300); in TestAudioRecording()
[all …]
Daudio-track-native.cpp83 SLresult res; in open() local
86 res = (*mEngineObj)->GetInterface(mEngineObj, SL_IID_ENGINE, (void *)&mEngine); in open()
87 if (res != SL_RESULT_SUCCESS) break; in open()
90 res = (*mEngine)->CreateOutputMix( in open()
93 if (res != SL_RESULT_SUCCESS) break; in open()
96 res = (*mOutputMixObj)->Realize(mOutputMixObj, SL_BOOLEAN_FALSE /* async */); in open()
97 if (res != SL_RESULT_SUCCESS) break; in open()
137 res = (*mEngine)->CreateAudioPlayer(mEngine, &mPlayerObj, in open()
139 if (res != SL_RESULT_SUCCESS) break; in open()
141 res = (*mPlayerObj)->Realize(mPlayerObj, SL_BOOLEAN_FALSE /* async */); in open()
[all …]
Daudio-record-native.cpp91 SLresult res; in open() local
94 res = (*mEngineObj)->GetInterface(mEngineObj, SL_IID_ENGINE, (void *)&mEngine); in open()
95 if (res != SL_RESULT_SUCCESS) break; in open()
146 res = (*mEngine)->CreateAudioRecorder(mEngine, &mRecordObj, in open()
148 if (res != SL_RESULT_SUCCESS) break; in open()
152 res = (*mRecordObj)->Realize(mRecordObj, SL_BOOLEAN_FALSE /* async */); in open()
153 if (res != SL_RESULT_SUCCESS) break; in open()
157 res = (*mRecordObj)->GetInterface(mRecordObj, SL_IID_RECORD, (void *)&mRecord); in open()
158 if (res != SL_RESULT_SUCCESS) break; in open()
162 res = (*mRecordObj)->GetInterface(mRecordObj, SL_IID_ANDROIDSIMPLEBUFFERQUEUE, in open()
[all …]
/cts/tests/tests/mediastress/jni/
Dnative-media-jni.cpp115 XAresult res = (*playerBQItf)->Enqueue(playerBQItf, NULL /*pBufferContext*/, in enqueueInitialBuffers() local
117 assert(XA_RESULT_SUCCESS == res); in enqueueInitialBuffers()
133 XAresult res; in AndroidBufferQueueCallback() local
169 res = (*caller)->Enqueue(caller, NULL /*pBufferContext*/, in AndroidBufferQueueCallback()
174 assert(XA_RESULT_SUCCESS == res); in AndroidBufferQueueCallback()
182 res = (*caller)->Enqueue(caller, (void *)&kEosBufferCntxt /*pBufferContext*/, in AndroidBufferQueueCallback()
187 assert(XA_RESULT_SUCCESS == res); in AndroidBufferQueueCallback()
214 XAresult res; in StreamChangeCallback() local
216 res = (*caller)->QueryStreamType(caller, streamIndex, &domain); in StreamChangeCallback()
217 assert(XA_RESULT_SUCCESS == res); in StreamChangeCallback()
[all …]
/cts/tests/tests/nativemedia/xa/src/
DXAObjectCreationTest.cpp35 bool IsOk(XAresult res) { in IsOk() argument
36 if (XA_RESULT_SUCCESS != res) { in IsOk()
37 fprintf(stderr, "IsOk failure: 0x%x, exiting\n", res); in IsOk()
47 XAresult res; member in XAObjectCreationTest
73 res = XA_RESULT_UNKNOWN_ERROR; in SetUp()
79 res = xaCreateEngine(&engineObj, 0, NULL, 0, NULL, NULL); in SetUp()
80 ASSERT_TRUE(IsOk(res)); in SetUp()
81 res = (*engineObj)->Realize(engineObj, XA_BOOLEAN_FALSE); in SetUp()
82 ASSERT_TRUE(IsOk(res)); in SetUp()
83 res = (*engineObj)->GetInterface(engineObj, XA_IID_ENGINE, &engineItf); in SetUp()
[all …]
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DRippleDrawableTest.java25 import android.content.res.ColorStateList;
26 import android.content.res.Resources;
27 import android.content.res.Resources.Theme;
28 import android.content.res.XmlResourceParser;
79 final Resources res = mContext.getResources(); in testPreloadDensity() local
80 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity()
82 verifyPreloadDensityInner(res, densityDpi); in testPreloadDensity()
84 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity()
88 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument
92 res, R.drawable.rippledrawable_radius); in verifyPreloadDensityInner()
[all …]
/cts/tests/tests/net/jni/
DNativeMultinetworkJni.c43 struct addrinfo *res = NULL; in Java_android_net_cts_MultinetworkApiTest_runGetaddrinfoCheck() local
46 int rval = android_getaddrinfofornetwork(handle, kHostname, NULL, NULL, &res); in Java_android_net_cts_MultinetworkApiTest_runGetaddrinfoCheck()
48 freeaddrinfo(res); in Java_android_net_cts_MultinetworkApiTest_runGetaddrinfoCheck()
125 struct addrinfo *res = NULL; in Java_android_net_cts_MultinetworkApiTest_runDatagramCheck() local
129 int rval = android_getaddrinfofornetwork(handle, kHostname, kPort, &kHints, &res); in Java_android_net_cts_MultinetworkApiTest_runDatagramCheck()
133 freeaddrinfo(res); in Java_android_net_cts_MultinetworkApiTest_runDatagramCheck()
138 int fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); in Java_android_net_cts_MultinetworkApiTest_runDatagramCheck()
141 res->ai_family, res->ai_socktype, res->ai_protocol, errno); in Java_android_net_cts_MultinetworkApiTest_runDatagramCheck()
142 freeaddrinfo(res); in Java_android_net_cts_MultinetworkApiTest_runDatagramCheck()
151 freeaddrinfo(res); in Java_android_net_cts_MultinetworkApiTest_runDatagramCheck()
[all …]
DNativeDnsJni.c35 int res = getaddrinfo(node, service, NULL, &answer); in Java_android_net_cts_DnsTest_testNativeDns() local
36 ALOGD("getaddrinfo(www.google.com) gave res=%d (%s)", res, gai_strerror(res)); in Java_android_net_cts_DnsTest_testNativeDns()
37 if (res != 0) return JNI_FALSE; in Java_android_net_cts_DnsTest_testNativeDns()
69 res = getaddrinfo(node, service, NULL, &answer); in Java_android_net_cts_DnsTest_testNativeDns()
70 ALOGD("getaddrinfo(ipv6.google.com) gave res=%d", res); in Java_android_net_cts_DnsTest_testNativeDns()
71 if (res != 0) return JNI_FALSE; in Java_android_net_cts_DnsTest_testNativeDns()
117 res = getnameinfo((const struct sockaddr*)&sa4, sizeof(sa4), buf, sizeof(buf), NULL, 0, flags); in Java_android_net_cts_DnsTest_testNativeDns()
118 if (res != 0) { in Java_android_net_cts_DnsTest_testNativeDns()
119 ALOGD("getnameinfo(%s (GoogleDNS) ) gave error %d (%s)", GoogleDNSIpV4Address, res, in Java_android_net_cts_DnsTest_testNativeDns()
120 gai_strerror(res)); in Java_android_net_cts_DnsTest_testNativeDns()
[all …]
/cts/tests/tests/keystore/src/android/keystore/cts/
DAttestationApplicationId.java116 int res = Integer.compare(packageInfos.size(), other.packageInfos.size()); in compareTo() local
117 if (res != 0) return res; in compareTo()
119 res = packageInfos.get(i).compareTo(other.packageInfos.get(i)); in compareTo()
120 if (res != 0) return res; in compareTo()
122 res = Integer.compare(signatureDigests.size(), other.signatureDigests.size()); in compareTo()
123 if (res != 0) return res; in compareTo()
126 res = cmp.compare(signatureDigests.get(i), other.signatureDigests.get(i)); in compareTo()
127 if (res != 0) return res; in compareTo()
129 return res; in compareTo()
173 int res = Integer.compare(a.length, b.length); in compare() local
[all …]
DAttestationPackageInfo.java71 int res = packageName.compareTo(other.packageName); in compareTo() local
72 if (res != 0) return res; in compareTo()
73 res = Integer.compare(version, other.version); in compareTo()
74 if (res != 0) return res; in compareTo()
75 return res; in compareTo()
/cts/tests/tests/nativemedia/sl/src/
DSLObjectCreationTest.cpp47 bool IsOk(SLresult res) { in IsOk() argument
48 if (SL_RESULT_SUCCESS != res) { in IsOk()
49 const char *str = slesutResultToString(res); in IsOk()
52 fprintf(stderr, "IsOk failure: %s (0x%x), exiting\n", str, res); in IsOk()
62 SLresult res; member in SLObjectCreationTest
84 res = SL_RESULT_UNKNOWN_ERROR; in SetUp()
90 res = slCreateEngine(&engineObj, 0, NULL, 0, NULL, NULL); in SetUp()
91 ASSERT_TRUE(IsOk(res)); in SetUp()
92 res = (*engineObj)->Realize(engineObj, SL_BOOLEAN_FALSE); in SetUp()
93 ASSERT_TRUE(IsOk(res)); in SetUp()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DContactsContract_CommonDataKinds_ImTest.java19 import android.content.res.Resources;
56 int res = Im.getProtocolLabelResource(type); in assertGetProtocolLabel() local
57 assertTrue(res != 0); in assertGetProtocolLabel()
59 String label = mResources.getString(res); in assertGetProtocolLabel()
64 int res = Im.getProtocolLabelResource(Im.PROTOCOL_CUSTOM); in assertCustomProtocolLabel() local
65 assertTrue(res != 0); in assertCustomProtocolLabel()
70 int res = Im.getTypeLabelResource(type); in assertGetTypeLabel() local
71 assertTrue(res != 0); in assertGetTypeLabel()
73 String label = mResources.getString(res); in assertGetTypeLabel()
78 int res = Im.getTypeLabelResource(Im.TYPE_CUSTOM); in assertCustomTypeLabel() local
[all …]
DContactsContract_CommonDataKinds_StructuredPostalTest.java19 import android.content.res.Resources;
42 int res = StructuredPostal.getTypeLabelResource(type); in assertGetTypeLabel() local
43 assertTrue(res != 0); in assertGetTypeLabel()
45 String label = mResources.getString(res); in assertGetTypeLabel()
50 int res = StructuredPostal.getTypeLabelResource(StructuredPostal.TYPE_CUSTOM); in assertCustomTypeLabel() local
51 assertTrue(res != 0); in assertCustomTypeLabel()
DContactsContract_CommonDataKinds_SipAddressTest.java19 import android.content.res.Resources;
42 int res = SipAddress.getTypeLabelResource(type); in assertGetTypeLabel() local
43 assertTrue(res != 0); in assertGetTypeLabel()
45 String label = mResources.getString(res); in assertGetTypeLabel()
50 int res = SipAddress.getTypeLabelResource(SipAddress.TYPE_CUSTOM); in assertCustomTypeLabel() local
51 assertTrue(res != 0); in assertCustomTypeLabel()
DContactsContract_CommonDataKinds_EmailTest.java19 import android.content.res.Resources;
43 int res = Email.getTypeLabelResource(type); in assertGetTypeLabel() local
44 assertTrue(res != 0); in assertGetTypeLabel()
46 String label = mResources.getString(res); in assertGetTypeLabel()
51 int res = Email.getTypeLabelResource(Email.TYPE_CUSTOM); in assertCustomTypeLabel() local
52 assertTrue(res != 0); in assertCustomTypeLabel()
DContactsContract_CommonDataKinds_OrganizationTest.java21 import android.content.res.Resources;
45 int res = Organization.getTypeLabelResource(type); in assertGetTypeLabel() local
46 assertTrue(res != 0); in assertGetTypeLabel()
48 String label = mResources.getString(res); in assertGetTypeLabel()
53 int res = Organization.getTypeLabelResource(Im.TYPE_CUSTOM); in assertCustomTypeLabel() local
54 assertTrue(res != 0); in assertCustomTypeLabel()
/cts/tests/tests/telecom/src/android/telecom/cts/
DNumberDialingTest.java42 final Object[] res = new Object[1]; in testEndInPound() local
51 res[0] = request.getAddress(); in testEndInPound()
52 synchronized(res) { in testEndInPound()
53 res.notify(); in testEndInPound()
61 synchronized(res) { in testEndInPound()
62 res.wait(CS_WAIT_MILLIS); in testEndInPound()
64 assertEquals(address, res[0]); in testEndInPound()
/cts/tests/tests/nativehardware/jni/
DAHardwareBufferTest.cpp83 int res = AHardwareBuffer_allocate(&desc, NULL); in testAHardwareBuffer_allocate_FailsWithNullInput() local
84 ASSERT_EQ(BAD_VALUE, res); in testAHardwareBuffer_allocate_FailsWithNullInput()
85 res = AHardwareBuffer_allocate(NULL, &buffer); in testAHardwareBuffer_allocate_FailsWithNullInput()
86 ASSERT_EQ(BAD_VALUE, res); in testAHardwareBuffer_allocate_FailsWithNullInput()
87 res = AHardwareBuffer_allocate(NULL, NULL); in testAHardwareBuffer_allocate_FailsWithNullInput()
88 ASSERT_EQ(BAD_VALUE, res); in testAHardwareBuffer_allocate_FailsWithNullInput()
101 int res = AHardwareBuffer_allocate(&desc, &buffer); in testAHardwareBuffer_allocate_BlobFormatRequiresHeight1() local
102 ASSERT_EQ(BAD_VALUE, res); in testAHardwareBuffer_allocate_BlobFormatRequiresHeight1()
105 res = AHardwareBuffer_allocate(&desc, &buffer); in testAHardwareBuffer_allocate_BlobFormatRequiresHeight1()
106 ASSERT_EQ(NO_ERROR, res); in testAHardwareBuffer_allocate_BlobFormatRequiresHeight1()
[all …]

12345678910>>...18