Home
last modified time | relevance | path

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

12345678910>>...39

/cts/tests/tests/content/src/android/content/res/cts/
DConfigTest.java17 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;
81 private static void checkValue(final Resources res, final int resId, in checkValue() argument
84 final String actual = res.getString(resId); in checkValue()
97 private static void checkValue(final Resources res, final int resId, in checkValue() argument
99 final Resources.Theme theme = res.newTheme(); in checkValue()
[all …]
DResourceNameTest.java17 package android.content.res.cts;
23 import android.content.res.Resources;
43 final Resources res = getContext().getResources(); in testGetResourceName() local
45 final String fullName = res.getResourceName(R.string.simple); in testGetResourceName()
48 final String packageName = res.getResourcePackageName(R.string.simple); in testGetResourceName()
51 final String typeName = res.getResourceTypeName(R.string.simple); in testGetResourceName()
54 final String entryName = res.getResourceEntryName(R.string.simple); in testGetResourceName()
61 final Resources res = getContext().getResources(); in testGetResourceIdentifier() local
62 int resid = res.getIdentifier( in testGetResourceIdentifier()
67 resid = res.getIdentifier("string/simple", null, in testGetResourceIdentifier()
[all …]
DPluralResourcesTest.java17 package android.content.res.cts;
21 import android.content.res.Configuration;
22 import android.content.res.Resources;
66 final Resources res = resourcesForLanguage("en"); in testPlurals() local
68 cs = res.getQuantityText(R.plurals.plurals_test, 0); in testPlurals()
74 cs = res.getQuantityText(R.plurals.plurals_test, 1); in testPlurals()
80 cs = res.getQuantityText(R.plurals.plurals_test, 2); in testPlurals()
83 cs = res.getQuantityText(R.plurals.plurals_test, 5); in testPlurals()
86 cs = res.getQuantityText(R.plurals.plurals_test, 500); in testPlurals()
94 final Resources res = resourcesForLanguage("cs"); in testCzech() local
[all …]
DArrayTest.java17 package android.content.res.cts;
23 import android.content.res.Resources;
48 private void checkEntry(final int resid, final int index, final Object res, in checkEntry() argument
51 + " at index " + index, expected, res); in checkEntry()
55 final String[] res = mResources.getStringArray(resid); in checkStringArray() local
56 assertEquals(res.length, expected.length); in checkStringArray()
58 checkEntry(resid, i, res[i], expected[i]); in checkStringArray()
63 final CharSequence[] res = mResources.getTextArray(resid); in checkTextArray() local
64 assertEquals(res.length, expected.length); in checkTextArray()
66 checkEntry(resid, i, res[i], expected[i]); in checkTextArray()
[all …]
DColorStateListTest.java16 package android.content.res.cts;
27 import android.content.res.ColorStateList;
28 import android.content.res.Resources;
29 import android.content.res.Resources.Theme;
64 final Resources res = getContext().getResources(); in testCreateFromXml() local
65 final ColorStateList c = ColorStateList.createFromXml(res, res.getXml(xmlId)); in testCreateFromXml()
78 final Resources res = getContext().getResources(); in testCreateFromXmlThemed() local
79 final Theme theme = res.newTheme(); in testCreateFromXmlThemed()
81 final ColorStateList c = ColorStateList.createFromXml(res, res.getXml(xmlId), theme); in testCreateFromXmlThemed()
92 final Resources res = getContext().getResources(); in testGetChangingConfigurations() local
[all …]
/cts/tests/tests/media/audio/jni/
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.cpp93 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/
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/security/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 = 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/
DBitmapDrawableTest.java23 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/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/contactsprovider/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_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()
/cts/tests/tests/content/HelloWorldApp/src_res_hardening_lib/com/example/helloworld/lib/
DTestUtils.java28 import android.content.res.AssetFileDescriptor;
29 import android.content.res.AssetManager;
30 import android.content.res.Resources;
31 import android.content.res.TypedArray;
32 import android.content.res.XmlResourceParser;
83 public static void checkGetIdentifier(Resources res, AssertionType type) throws Exception { in checkGetIdentifier() argument
85 () -> res.getIdentifier(RES_IDENTIFIER, "", ""), in checkGetIdentifier()
91 public static void checkGetResourceName(Resources res, AssertionType type) throws Exception { in checkGetResourceName() argument
93 () -> res.getResourceName(RES_STRING), in checkGetResourceName()
99 public static void checkGetString(Resources res, AssertionType type) throws Exception { in checkGetString() argument
[all …]
/cts/tests/tests/resourcesloader/src/android/content/res/loader/cts/
DResourcesLoaderFallthroughTest.kt17 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 …]
/cts/tests/tests/graphics/jni/
Dandroid_graphics_cts_ComputeAhbTest.cpp99 ComputePassResources res(&init); in verifyComputeShaderWrite() local
111 init.device(), &dslci, nullptr, &res.mDescriptorSetLayout); in verifyComputeShaderWrite()
117 0, 1, &res.mDescriptorSetLayout, 0, nullptr in verifyComputeShaderWrite()
120 init.device(), &plci, nullptr, &res.mPipelineLayout); in verifyComputeShaderWrite()
136 res.mPipelineLayout, in verifyComputeShaderWrite()
141 nullptr, &res.mPipeline), in verifyComputeShaderWrite()
156 vkCreateDescriptorPool(init.device(), &dpci, nullptr, &res.mDescriptorPool); in verifyComputeShaderWrite()
161 res.mDescriptorPool, in verifyComputeShaderWrite()
162 1, &res.mDescriptorSetLayout, in verifyComputeShaderWrite()
190 vkCreateCommandPool(init.device(), &pci, nullptr, &res.mCommandPool); in verifyComputeShaderWrite()
[all …]
/cts/tests/tests/content/src/android/content/cts/
DContentProviderOperationTest.java83 private ContentProviderResult res; field in ContentProviderOperationTest
103 res = op.apply(provider, null, 0); in testInsert()
104 assertEquals(TEST_URI_RESULT, res.uri); in testInsert()
121 res = op.apply(provider, null, 0); in testUpdate()
122 assertEquals(1, (int) res.count); in testUpdate()
138 res = op.apply(provider, null, 0); in testDelete()
139 assertEquals(1, (int) res.count); in testDelete()
175 res = op.apply(provider, null, 0); in testCall()
176 assertEquals(TEST_EXTRAS_RESULT, res.extras); in testCall()
188 final String[] res = op.resolveSelectionArgsBackReferences(TEST_RESULTS, in testBackReferenceSelection() local
[all …]
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DRippleDrawableTest.java26 import android.content.res.ColorStateList;
27 import android.content.res.Resources;
28 import android.content.res.Resources.Theme;
29 import android.content.res.XmlResourceParser;
82 final Resources res = mContext.getResources(); in testPreloadDensity() local
83 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity()
85 verifyPreloadDensityInner(res, densityDpi); in testPreloadDensity()
87 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity()
107 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument
111 res, R.drawable.rippledrawable_radius); in verifyPreloadDensityInner()
[all …]
/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/common/device-side/bedstead/testapp/
DAndroid.bp138 out: ["TestApp_Apps.res.zip"],
144 cmd: "mkdir -p $(genDir)/res/raw" +
145 " && cp $(location :EmptyTestApp) $(genDir)/res/raw" +
146 " && cp $(location :NotEmptyTestApp) $(genDir)/res/raw" +
147 " && cp $(location :DeviceAdminTestApp) $(genDir)/res/raw" +
148 " && cp $(location :TestOnlyDeviceAdminTestApp) $(genDir)/res/raw" +
149 " && cp $(location :LockTaskApp) $(genDir)/res/raw" +
150 " && cp $(location :DelegateTestApp) $(genDir)/res/raw" +
151 " && cp $(location :ContentTestApp) $(genDir)/res/raw" +
152 " && cp $(location :DevicePolicyManagementRoleHolderTestApp) $(genDir)/res/raw" +
[all …]
/cts/tests/tests/resourcesloader/resources/
DAndroid.bp25 resource_dirs: ["provider1/res", "provider_stable/res"],
33 resource_dirs: ["provider2/res", "provider_stable/res"],
41 resource_dirs: ["provider3/res", "provider_stable/res"],
49 resource_dirs: ["provider4/res", "provider_stable/res"],
93 resource_dirs: ["provider1/res", "provider_stable/res"],
101 resource_dirs: ["provider2/res", "provider_stable/res"],
109 resource_dirs: ["provider3/res", "provider_stable/res"],
117 resource_dirs: ["provider4/res", "provider_stable/res"],

12345678910>>...39