/cts/tests/tests/content/src/android/content/res/cts/ |
D | ConfigTest.java | 17 package android.content.res.cts; 31 import android.content.res.AssetManager; 32 import android.content.res.Configuration; 33 import android.content.res.Resources; 34 import android.content.res.Resources.NotFoundException; 35 import android.content.res.TypedArray; 78 private static void checkValue(final Resources res, final int resId, in checkValue() argument 81 final String actual = res.getString(resId); in checkValue() 94 private static void checkValue(final Resources res, final int resId, in checkValue() argument 96 final Resources.Theme theme = res.newTheme(); in checkValue() [all …]
|
D | ResourceNameTest.java | 17 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 …]
|
D | PluralResourcesTest.java | 17 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 …]
|
D | ArrayTest.java | 17 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 …]
|
D | ColorStateListTest.java | 16 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 …]
|
D | Resources_ThemeTest.java | 17 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/ |
D | appendix-b-1-1-buffer-queue.cpp | 59 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 …]
|
D | appendix-b-1-2-recording.cpp | 53 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 …]
|
D | audio-track-native.cpp | 83 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 …]
|
D | audio-record-native.cpp | 93 SLresult res; in open() local 96 res = (*mEngineObj)->GetInterface(mEngineObj, SL_IID_ENGINE, (void *)&mEngine); in open() 97 if (res != SL_RESULT_SUCCESS) break; in open() 148 res = (*mEngine)->CreateAudioRecorder(mEngine, &mRecordObj, in open() 150 if (res != SL_RESULT_SUCCESS) break; in open() 154 res = (*mRecordObj)->Realize(mRecordObj, SL_BOOLEAN_FALSE /* async */); in open() 155 if (res != SL_RESULT_SUCCESS) break; in open() 159 res = (*mRecordObj)->GetInterface(mRecordObj, SL_IID_RECORD, (void *)&mRecord); in open() 160 if (res != SL_RESULT_SUCCESS) break; in open() 164 res = (*mRecordObj)->GetInterface(mRecordObj, SL_IID_ANDROIDSIMPLEBUFFERQUEUE, in open() [all …]
|
/cts/tests/tests/mediastress/jni/ |
D | native-media-jni.cpp | 115 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/ |
D | XAObjectCreationTest.cpp | 35 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/ |
D | RippleDrawableTest.java | 25 import android.content.res.ColorStateList; 26 import android.content.res.Resources; 27 import android.content.res.Resources.Theme; 28 import android.content.res.XmlResourceParser; 80 final Resources res = mContext.getResources(); in testPreloadDensity() local 81 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() 83 verifyPreloadDensityInner(res, densityDpi); in testPreloadDensity() 85 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity() 89 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument 93 res, R.drawable.rippledrawable_radius); in verifyPreloadDensityInner() [all …]
|
/cts/tests/tests/nativemedia/sl/src/ |
D | SLObjectCreationTest.cpp | 47 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/security/src/android/keystore/cts/ |
D | AttestationApplicationId.java | 116 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 …]
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | BitmapDrawableTest.java | 23 import android.content.res.Configuration; 24 import android.content.res.Resources; 25 import android.content.res.Resources.Theme; 71 final Resources res = mContext.getResources(); in testPreloadDensity() local 72 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() 75 verifyPreloadDensityInner(res, DENSITY_IMAGES[i], DENSITY_VALUES); in testPreloadDensity() 78 setResourcesDensity(res, densityDpi); in testPreloadDensity() 82 private void verifyPreloadDensityInner(Resources res, int sourceResId, int[] densities) in verifyPreloadDensityInner() argument 88 setResourcesDensity(res, preloadDensityDpi); in verifyPreloadDensityInner() 90 final BitmapDrawable preloadedDrawable = (BitmapDrawable) res.getDrawable(sourceResId); in verifyPreloadDensityInner() [all …]
|
/cts/tests/tests/content/src/android/content/cts/ |
D | ContentProviderOperationTest.java | 81 private ContentProviderResult res; field in ContentProviderOperationTest 101 res = op.apply(provider, null, 0); in testInsert() 102 assertEquals(TEST_URI_RESULT, res.uri); in testInsert() 119 res = op.apply(provider, null, 0); in testUpdate() 120 assertEquals(1, (int) res.count); in testUpdate() 136 res = op.apply(provider, null, 0); in testDelete() 137 assertEquals(1, (int) res.count); in testDelete() 173 res = op.apply(provider, null, 0); in testCall() 174 assertEquals(TEST_EXTRAS_RESULT, res.extras); in testCall() 186 final String[] res = op.resolveSelectionArgsBackReferences(TEST_RESULTS, in testBackReferenceSelection() local [all …]
|
/cts/tests/tests/resourcesloader/src/android/content/res/loader/cts/ |
D | ResourcesLoaderFallthroughTest.kt | 17 package android.content.res.loader.cts in <lambda>() 19 import android.content.res.loader.ResourcesLoader in <lambda>() 36 "getString" to { res -> in <lambda>() method 37 res.getString(0x7f0400ff /* R.string.two_and_four_only */) in <lambda>() 39 "openAsset" to { res -> in <lambda>() method 40 res.assets.open("one_and_three_only.txt").reader().readText() in <lambda>() 42 "openAssetFd" to { res -> in <lambda>() method 43 res.assets.openFd("one_and_three_only.txt").readText() in <lambda>() 94 "layout" to { res -> in <lambda>() method 95 res.assets.openXmlResourceParser(getCookie(), "res/layout/layout.xml") in <lambda>() [all …]
|
D | ResourcesLoaderValuesTest.kt | 17 package android.content.res.loader.cts in <lambda>() 22 import android.content.res.AssetManager in <lambda>() 23 import android.content.res.Configuration in <lambda>() 24 import android.content.res.Resources in <lambda>() 25 import android.content.res.loader.ResourcesLoader in <lambda>() 62 "getOverlaid" to { res -> in <lambda>() method 63 res.getString(R.string.test) in <lambda>() 65 "getAdditional" to { res -> in <lambda>() method 66 res.getString(0x7f0400fe /* R.string.additional */) in <lambda>() 68 "getIdentifier" to { res -> in <lambda>() method [all …]
|
/cts/hostsidetests/appsecurity/res/pkgsigverify/ |
D | generate-apks.sh | 5 … -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withDSA.apk cts/hostsidete… 6 … -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withEC.apk cts/hostsidetes… 7 … -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withRSA.apk cts/hostsidete… 8 … -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha512withEC.apk cts/hostsidetes… 9 … -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha512withRSA.apk cts/hostsidete… 12 …t cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withDSA-Verity.apk cts/hostsid… 13 …ut cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withEC-Verity.apk cts/hostsid… 14 …t cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v2-Sha256withRSA-Verity.apk cts/hostsid… 17 … -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v3-Sha256withDSA.apk cts/hostsidete… 18 … -out cts/hostsidetests/appsecurity/res/pkgsigverify/v4-digest-v3-Sha256withEC.apk cts/hostsidetes… [all …]
|
/cts/tests/tests/resourcesloader/resources/ |
D | Android.bp | 21 resource_dirs: ["provider1/res", "provider_stable/res"], 29 resource_dirs: ["provider2/res", "provider_stable/res"], 37 resource_dirs: ["provider3/res", "provider_stable/res"], 45 resource_dirs: ["provider4/res", "provider_stable/res"], 89 resource_dirs: ["provider1/res", "provider_stable/res"], 97 resource_dirs: ["provider2/res", "provider_stable/res"], 105 resource_dirs: ["provider3/res", "provider_stable/res"], 113 resource_dirs: ["provider4/res", "provider_stable/res"],
|
/cts/tests/tests/contactsprovider/src/android/provider/cts/contacts/ |
D | ContactsContract_CommonDataKinds_ImTest.java | 19 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 …]
|
/cts/tests/tests/net/jni/ |
D | NativeDnsJni.c | 40 int res = getaddrinfo(node, service, NULL, &answer); in Java_android_net_cts_DnsTest_testNativeDns() local 41 LOGD("getaddrinfo(www.google.com) gave res=%d (%s)", res, gai_strerror(res)); in Java_android_net_cts_DnsTest_testNativeDns() 42 if (res != 0) return JNI_FALSE; in Java_android_net_cts_DnsTest_testNativeDns() 74 res = getaddrinfo(node, service, NULL, &answer); in Java_android_net_cts_DnsTest_testNativeDns() 75 LOGD("getaddrinfo(ipv6.google.com) gave res=%d", res); in Java_android_net_cts_DnsTest_testNativeDns() 76 if (res != 0) return JNI_FALSE; in Java_android_net_cts_DnsTest_testNativeDns() 122 res = getnameinfo((const struct sockaddr*)&sa4, sizeof(sa4), buf, sizeof(buf), NULL, 0, flags); in Java_android_net_cts_DnsTest_testNativeDns() 123 if (res != 0) { in Java_android_net_cts_DnsTest_testNativeDns() 124 LOGD("getnameinfo(%s (GoogleDNS) ) gave error %d (%s)", GoogleDNSIpV4Address, res, in Java_android_net_cts_DnsTest_testNativeDns() 125 gai_strerror(res)); in Java_android_net_cts_DnsTest_testNativeDns() [all …]
|
D | NativeMultinetworkJni.cpp | 126 int res = getAsyncResponse(env, fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersValid() local 127 if (res < 0) { in expectAnswersValid() 128 return res; in expectAnswersValid() 133 if (expectedRcode == ns_r_noerror && res > 0) { in expectAnswersValid() 134 return extractIpAddressAnswers(buf, res, family); in expectAnswersValid() 142 int res = getAsyncResponse(env, fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersNotValid() local 143 if (res != expectedErrno) { in expectAnswersNotValid() 144 LOGD("res:%d, expectedErrno = %d", res, expectedErrno); in expectAnswersNotValid() 145 return (res > 0) ? -EREMOTEIO : res; in expectAnswersNotValid() 325 struct addrinfo *res = NULL; in Java_android_net_cts_MultinetworkApiTest_runGetaddrinfoCheck() local [all …]
|
/cts/tests/tests/telecom/src/android/telecom/cts/ |
D | NumberDialingTest.java | 42 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()
|