/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 …]
|
D | AttestationPackageInfo.java | 71 int res = packageName.compareTo(other.packageName); in compareTo() local 72 if (res != 0) return res; in compareTo() 73 res = Long.compare(version, other.version); in compareTo() 74 if (res != 0) return res; in compareTo() 75 return res; in compareTo()
|
/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/provider/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 …]
|
D | ContactsContract_CommonDataKinds_StructuredPostalTest.java | 19 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()
|
D | ContactsContract_CommonDataKinds_SipAddressTest.java | 19 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()
|
/cts/tests/tests/net/jni/ |
D | NativeDnsJni.c | 35 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 …]
|
D | NativeMultinetworkJni.cpp | 123 int res = getAsyncResponse(env, fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersValid() local 124 if (res < 0) { in expectAnswersValid() 125 return res; in expectAnswersValid() 130 if (expectedRcode == ns_r_noerror && res > 0) { in expectAnswersValid() 131 return extractIpAddressAnswers(buf, res, family); in expectAnswersValid() 139 int res = getAsyncResponse(env, fd, TIMEOUT_MS, &rcode, buf, MAXPACKET); in expectAnswersNotValid() local 140 if (res != expectedErrno) { in expectAnswersNotValid() 141 ALOGD("res:%d, expectedErrno = %d", res, expectedErrno); in expectAnswersNotValid() 142 return (res > 0) ? -EREMOTEIO : res; in expectAnswersNotValid() 322 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()
|
/cts/tests/tests/provider/src/android/provider/cts/ |
D | DocumentsContractTest.java | 61 import android.content.res.AssetFileDescriptor; 306 final Path res = new Path(null, Arrays.asList("red", "blue")); in testFindDocumentPath() local 309 doReturn(res).when(mProvider).findDocumentPath(DOC_RED, DOC_BLUE); in testFindDocumentPath() 310 assertEquals(res, findDocumentPath(mResolver, in testFindDocumentPath() 316 final IntentSender res = PendingIntent in testCreateWebLinkIntent() local 321 doReturn(res).when(mProvider).createWebLinkIntent(DOC_RED, Bundle.EMPTY); in testCreateWebLinkIntent() 322 assertEquals(res, createWebLinkIntent(mResolver, URI_RED, Bundle.EMPTY)); in testCreateWebLinkIntent() 333 final String[] res = new String[] { MIME_TYPE }; in testGetDocumentStreamTypes() local 335 doReturn(res).when(mProvider).getDocumentStreamTypes(DOC_RED, MIME_TYPE); in testGetDocumentStreamTypes() 336 assertArrayEquals(res, mResolver.getStreamTypes(URI_RED, MIME_TYPE)); in testGetDocumentStreamTypes() [all …]
|
/cts/tests/tests/binder_ndk/libbinder_ndk_test/ |
D | test_native_aidl_client.cpp | 136 int32_t res; in TEST_P() local 138 EXPECT_OK(iface->GiveMeMyCallingPid(&res)); in TEST_P() 139 EXPECT_EQ(getpid(), res); in TEST_P() 141 EXPECT_OK(iface->GiveMeMyCallingUid(&res)); in TEST_P() 142 EXPECT_EQ(getuid(), res); in TEST_P() 144 EXPECT_OK(iface->GiveMeMyCallingPidFromOneway(&res)); in TEST_P() 147 EXPECT_EQ(0, res); in TEST_P() 149 EXPECT_EQ(getpid(), res); in TEST_P() 152 EXPECT_OK(iface->GiveMeMyCallingUidFromOneway(&res)); in TEST_P() 153 EXPECT_EQ(getuid(), res); in TEST_P() [all …]
|