Lines Matching refs:res

17 package android.content.res;
44 final Resources res = getActivity().getResources(); in testGetEmpty() local
45 assertNull(mCache.getInstance(-1, res, null)); in testGetEmpty()
51 final Resources res = getActivity().getResources(); in testSetGet() local
52 assertEquals(5f, mCache.getInstance(1, res, null)); in testSetGet()
53 assertNotSame(5f, mCache.getInstance(1, res, null)); in testSetGet()
54 assertEquals(null, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGet()
60 final Resources res = getActivity().getResources(); in testSetGetThemed() local
61 assertEquals(null, mCache.getInstance(1, res, null)); in testSetGetThemed()
62 assertEquals(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGetThemed()
63 assertNotSame(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGetThemed()
70 final Resources res = getActivity().getResources(); in testMultiThreadPutGet() local
71 assertEquals(10f, mCache.getInstance(1, res, null)); in testMultiThreadPutGet()
72 assertNotSame(10f, mCache.getInstance(1, res, null)); in testMultiThreadPutGet()
73 assertEquals(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testMultiThreadPutGet()
74 assertNotSame(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testMultiThreadPutGet()
82 final Resources res = getActivity().getResources(); in testVoidConfigChange() local
83 res.getValue(R.dimen.resource_cache_test_generic, staticValue, true); in testVoidConfigChange()
84 float staticDim = TypedValue.complexToDimension(staticValue.data, res.getDisplayMetrics()); in testVoidConfigChange()
87 final Configuration cfg = res.getConfiguration(); in testVoidConfigChange()
92 int changes = calcConfigChanges(res, newCnf); in testVoidConfigChange()
93 assertEquals(staticDim, mCache.getInstance(key, res, getActivity().getTheme())); in testVoidConfigChange()
95 assertEquals(staticDim, mCache.getInstance(key, res, getActivity().getTheme())); in testVoidConfigChange()
103 final Resources res = getActivity().getResources(); in testEffectiveConfigChange() local
104 res.getValue(R.dimen.resource_cache_test_orientation_dependent, changingValue, true); in testEffectiveConfigChange()
106 res.getDisplayMetrics()); in testEffectiveConfigChange()
110 final Configuration cfg = res.getConfiguration(); in testEffectiveConfigChange()
115 int changes = calcConfigChanges(res, newCnf); in testEffectiveConfigChange()
116 assertEquals(changingDim, mCache.getInstance(key, res, getActivity().getTheme())); in testEffectiveConfigChange()
126 final Resources res = getActivity().getResources(); in testConfigChangeMultipleResources() local
127 res.getValue(R.dimen.resource_cache_test_generic, staticValue, true); in testConfigChangeMultipleResources()
128 res.getValue(R.dimen.resource_cache_test_orientation_dependent, changingValue, true); in testConfigChangeMultipleResources()
129 float staticDim = TypedValue.complexToDimension(staticValue.data, res.getDisplayMetrics()); in testConfigChangeMultipleResources()
131 res.getDisplayMetrics()); in testConfigChangeMultipleResources()
136 final Configuration cfg = res.getConfiguration(); in testConfigChangeMultipleResources()
141 int changes = calcConfigChanges(res, newCnf); in testConfigChangeMultipleResources()
142 assertEquals(staticDim, mCache.getInstance(R.dimen.resource_cache_test_generic, res, in testConfigChangeMultipleResources()
145 mCache.getInstance(R.dimen.resource_cache_test_orientation_dependent, res, in testConfigChangeMultipleResources()
148 assertEquals(staticDim, mCache.getInstance(R.dimen.resource_cache_test_generic, res, in testConfigChangeMultipleResources()
150 assertNull(mCache.getInstance(R.dimen.resource_cache_test_orientation_dependent, res, in testConfigChangeMultipleResources()
161 final Resources res = getActivity().getResources(); in testConfigChangeMultipleThemes() local
163 res.getValue(R.dimen.resource_cache_test_generic, staticValues[i], true); in testConfigChangeMultipleThemes()
165 .complexToDimension(staticValues[i].data, res.getDisplayMetrics()); in testConfigChangeMultipleThemes()
167 res.getValue(R.dimen.resource_cache_test_orientation_dependent, changingValues[i], in testConfigChangeMultipleThemes()
170 res.getDisplayMetrics()); in testConfigChangeMultipleThemes()
178 final Configuration cfg = res.getConfiguration(); in testConfigChangeMultipleThemes()
183 int changes = calcConfigChanges(res, newCnf); in testConfigChangeMultipleThemes()
187 mCache.getInstance(R.dimen.resource_cache_test_generic, res, theme)); in testConfigChangeMultipleThemes()
189 mCache.getInstance(R.dimen.resource_cache_test_orientation_dependent, res, in testConfigChangeMultipleThemes()
196 mCache.getInstance(R.dimen.resource_cache_test_generic, res, theme)); in testConfigChangeMultipleThemes()
197 assertNull(mCache.getInstance(R.dimen.resource_cache_test_orientation_dependent, res, in testConfigChangeMultipleThemes()