Home
last modified time | relevance | path

Searched refs:dr (Results 1 – 21 of 21) sorted by relevance

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DDrawableContainerTest.java102 Drawable dr = spy(new ColorDrawable(Color.WHITE)); in testDraw() local
103 addAndSelectDrawable(dr); in testDraw()
105 reset(dr); in testDraw()
106 doNothing().when(dr).draw(any()); in testDraw()
108 verify(dr, times(1)).draw(any()); in testDraw()
110 reset(dr); in testDraw()
111 doNothing().when(dr).draw(any()); in testDraw()
113 verify(dr, times(1)).draw(any()); in testDraw()
247 Drawable dr = spy(new ColorDrawable(Color.BLUE)); in testSetDither() local
248 addAndSelectDrawable(dr); in testSetDither()
[all …]
DCustomAnimationScaleListDrawableTest.java67 Drawable dr = mContext.getDrawable(DRAWABLE_ID); in testNonZeroDurationScale() local
68 assertTrue(dr instanceof DrawableContainer); in testNonZeroDurationScale()
69 assertTrue(dr.getCurrent() instanceof Animatable); in testNonZeroDurationScale()
77 Drawable dr = mContext.getDrawable(DRAWABLE_ID); in testZeroDurationScale() local
78 assertTrue(dr instanceof DrawableContainer); in testZeroDurationScale()
79 assertFalse(dr.getCurrent() instanceof Animatable); in testZeroDurationScale()
DAnimationDrawableTest.java281 AnimationDrawable dr = new AnimationDrawable(); in testInflateCorrect() local
282 dr.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateCorrect()
284 assertFalse(dr.isVisible()); in testInflateCorrect()
286 assertTrue(dr.isOneShot()); in testInflateCorrect()
289 (DrawableContainerState) dr.getConstantState(); in testInflateCorrect()
291 assertEquals(2, dr.getNumberOfFrames()); in testInflateCorrect()
292 assertEquals(2000, dr.getDuration(0)); in testInflateCorrect()
293 assertEquals(1000, dr.getDuration(1)); in testInflateCorrect()
294 assertSame(dr.getFrame(0), dr.getCurrent()); in testInflateCorrect()
300 AnimationDrawable dr = new AnimationDrawable(); in testInflateMissingDrawable() local
[all …]
DCustomDrawableTest.java48 Drawable dr = InstrumentationRegistry.getTargetContext().getDrawable( in testInflation() local
50 assertTrue(dr instanceof CustomDrawable); in testInflation()
51 assertEquals(Color.RED, ((CustomDrawable) dr).getColor()); in testInflation()
DRippleDrawableTest.java129 RippleDrawable dr = new RippleDrawable(ColorStateList.valueOf(Color.RED), null, null); in testSetColor() local
130 dr.setCallback(cb); in testSetColor()
132 dr.setColor(ColorStateList.valueOf(Color.BLACK)); in testSetColor()
133 verify(cb, times(1)).invalidateDrawable(dr); in testSetColor()
DNinePatchDrawableTest.java428 void setTargetDensity(NinePatchDrawable dr, int density); in setTargetDensity() argument
493 verifySetTargetDensityOuter((dr, density) -> dr.setTargetDensity(density)); in testSetTargetDensity()
500 verifySetTargetDensityOuter((dr, density) -> { in testSetTargetDensity_Canvas() argument
503 dr.setTargetDensity(c); in testSetTargetDensity_Canvas()
511 verifySetTargetDensityOuter((dr, density) -> { in testSetTargetDensity_DisplayMetrics() argument
514 dr.setTargetDensity(dm); in testSetTargetDensity_DisplayMetrics()
665 private void compareOrSave(Drawable dr, int densityDpi, int sourceResId, int goldenResId) { in compareOrSave() argument
666 final int width = dr.getIntrinsicWidth(); in compareOrSave()
667 final int height = dr.getIntrinsicHeight(); in compareOrSave()
672 dr.setBounds(0, 0, width, height); in compareOrSave()
[all …]
DDrawableContainerStateTest.java277 DrawableContainer dr = new LevelListDrawable(); in testCanConstantState() local
278 DrawableContainerState cs = (DrawableContainerState) dr.getConstantState(); in testCanConstantState()
289 DrawableContainer dr = new LevelListDrawable(); in testGrowArray() local
290 DrawableContainerState cs = (DrawableContainerState) dr.getConstantState(); in testGrowArray()
DScaleDrawableTest.java302 ScaleDrawable dr = new ScaleDrawable(null, Gravity.CENTER, 1, 1); in testInitialLevel() local
308 dr.inflate(res, parser, attrs); in testInitialLevel()
309 assertEquals(5000, dr.getLevel()); in testInitialLevel()
311 dr.setLevel(0); in testInitialLevel()
312 assertEquals(0, dr.getLevel()); in testInitialLevel()
315 ScaleDrawable clone = (ScaleDrawable) dr.getConstantState().newDrawable(res); in testInitialLevel()
319 dr.setLevel(1000); in testInitialLevel()
320 assertEquals(1000, dr.getLevel()); in testInitialLevel()
DLayerDrawableTest.java1492 LayerDrawable dr; in testChildIntrinsicSize() local
1495 dr = (LayerDrawable) mContext.getDrawable(R.drawable.layer_drawable_intrinsic); in testChildIntrinsicSize()
1496 assertEquals(-1, dr.getIntrinsicWidth()); in testChildIntrinsicSize()
1497 assertEquals(-1, dr.getIntrinsicHeight()); in testChildIntrinsicSize()
1500 dr = new LayerDrawable(new Drawable[] { new ColorDrawable(Color.RED) }); in testChildIntrinsicSize()
1501 dr.setLayerInset(0, 10, 10, 10, 10); in testChildIntrinsicSize()
1502 assertEquals(-1, dr.getIntrinsicWidth()); in testChildIntrinsicSize()
1503 assertEquals(-1, dr.getIntrinsicHeight()); in testChildIntrinsicSize()
1506 dr = (LayerDrawable) mContext.getDrawable(R.drawable.layer_drawable_intrinsic_mixed); in testChildIntrinsicSize()
1507 int width = dr.getLayerInsetLeft(0) + dr.getLayerInsetRight(0) in testChildIntrinsicSize()
[all …]
DAdaptiveIconDrawableTest.java59 AdaptiveIconDrawable dr = new AdaptiveIconDrawable(null, null); in testInflate() local
66 dr.inflate(r, parser, attrs); in testInflate()
71 AdaptiveIconDrawable dr = new AdaptiveIconDrawable(null, null); in testInflateNull() local
72 dr.inflate(null, null, null); in testInflateNull()
78 AdaptiveIconDrawable dr = new AdaptiveIconDrawable(null, null); in testDraw() local
79 dr.draw(c); in testDraw()
DClipDrawableTest.java163 Drawable dr = spy(new ColorDrawable(Color.GREEN)); in testGetOpacity() local
164 doReturn(PixelFormat.OPAQUE).when(dr).getOpacity(); in testGetOpacity()
166 ClipDrawable clipDrawable = new ClipDrawable(dr, Gravity.BOTTOM, ClipDrawable.HORIZONTAL); in testGetOpacity()
177 doReturn(PixelFormat.TRANSLUCENT).when(dr).getOpacity(); in testGetOpacity()
178 clipDrawable = new ClipDrawable(dr, Gravity.BOTTOM, ClipDrawable.HORIZONTAL); in testGetOpacity()
DAnimatedImageDrawableTest.java492 Drawable dr = ImageDecoder.decodeDrawable(source, (decoder, info, src) -> { in testPostProcess() local
499 assertTrue(dr instanceof AnimatedImageDrawable); in testPostProcess()
500 testDrawable = (AnimatedImageDrawable) dr; in testPostProcess()
DDrawableWrapperTest.java61 public MyWrapper(Drawable dr) { in MyWrapper() argument
62 super(dr); in MyWrapper()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DBitmapDrawableTest.java141 private void runTest(Drawable dr) { in runTest() argument
142 final Rect drBounds = new Rect(0, 0, dr.getIntrinsicWidth(), dr.getIntrinsicHeight()); in runTest()
146 dr.setBounds(drBounds); in runTest()
147 dr.draw(canvas); in runTest()
/cts/hostsidetests/theme/src/android/theme/cts/
DComparisonTask.java116 final int dr = getAlphaScaledRed(p1) - getAlphaScaledRed(p2); in compare() local
122 Math.abs(dr) > threshold) { in compare()
123 System.err.println("fail dr=" + dr+ " dg=" + dg+ " db=" + db); in compare()
/cts/tests/tests/graphics/src/android/graphics/cts/
DImageDecoderTest.java547 Drawable dr = Drawable.createFromResourceStream(mRes, value, is, null, null); in testNinepatchWithDensityNone() local
548 assertNotNull(dr); in testNinepatchWithDensityNone()
549 assertEquals(5, dr.getIntrinsicWidth()); in testNinepatchWithDensityNone()
550 assertEquals(5, dr.getIntrinsicHeight()); in testNinepatchWithDensityNone()
746 Drawable dr = ImageDecoder.decodeDrawable(src, (decoder, info, s) -> { in testSampleSize() local
750 checkSampleSize(name, record.width, sampleSize, dr.getIntrinsicWidth()); in testSampleSize()
751 checkSampleSize(name, record.height, sampleSize, dr.getIntrinsicHeight()); in testSampleSize()
772 Drawable dr = ImageDecoder.decodeDrawable(src, (decoder, info, s) -> { in testLargeSampleSize() local
776 assertEquals(1, dr.getIntrinsicWidth()); in testLargeSampleSize()
788 Drawable dr = null; in testResizeTransparency() local
[all …]
/cts/tests/tests/content/src/android/content/res/cts/
DResources_ThemeTest.java160 final ColorDrawable dr = (ColorDrawable) theme.getDrawable(R.drawable.colordrawable_themed); in testGetDrawable() local
161 assertEquals(Color.BLACK, dr.getColor()); in testGetDrawable()
/cts/tests/tests/widget/src/android/widget/cts/
DImageViewTest.java669 protected boolean verifyDrawable(Drawable dr) { in verifyDrawable() argument
670 return super.verifyDrawable(dr); in verifyDrawable()
/cts/tests/tests/media/assets/
DfileSequence1.ts3431 �K�G���dr���q������� ���A��� ld4�&41���;Ld�.�_�0L�t;8�"��
Dsegment000001.ts282 �6�*�Qldr
/cts/tests/tests/media/res/raw/
Dtestmp3_3.raw1 …BEYEG7fCiACAACAMyWb8CSTUCK4CmOcSelCEv7/6cKl6ixuCpLoFC93URXoYeL2830PTPX0Pb1+dr/t6v/5v26V56v1k40jQc/…