/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | DrawableContainerTest.java | 106 Drawable dr = spy(new ColorDrawable(Color.WHITE)); in testDraw() local 107 addAndSelectDrawable(dr); in testDraw() 109 reset(dr); in testDraw() 110 doNothing().when(dr).draw(any()); in testDraw() 112 verify(dr, times(1)).draw(any()); in testDraw() 114 reset(dr); in testDraw() 115 doNothing().when(dr).draw(any()); in testDraw() 117 verify(dr, times(1)).draw(any()); in testDraw() 251 Drawable dr = spy(new ColorDrawable(Color.BLUE)); in testSetDither() local 252 addAndSelectDrawable(dr); in testSetDither() [all …]
|
D | CustomAnimationScaleListDrawableTest.java | 67 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()
|
D | AnimationDrawableTest.java | 290 AnimationDrawable dr = new AnimationDrawable(); in testInflateCorrect() local 291 dr.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateCorrect() 293 assertFalse(dr.isVisible()); in testInflateCorrect() 295 assertTrue(dr.isOneShot()); in testInflateCorrect() 298 (DrawableContainerState) dr.getConstantState(); in testInflateCorrect() 300 assertEquals(2, dr.getNumberOfFrames()); in testInflateCorrect() 301 assertEquals(2000, dr.getDuration(0)); in testInflateCorrect() 302 assertEquals(1000, dr.getDuration(1)); in testInflateCorrect() 303 assertSame(dr.getFrame(0), dr.getCurrent()); in testInflateCorrect() 309 AnimationDrawable dr = new AnimationDrawable(); in testInflateMissingDrawable() local [all …]
|
D | RippleDrawableTest.java | 148 RippleDrawable dr = new RippleDrawable(ColorStateList.valueOf(Color.RED), null, null); in testSetColor() local 149 dr.setCallback(cb); in testSetColor() 151 dr.setColor(ColorStateList.valueOf(Color.BLACK)); in testSetColor() 152 verify(cb, times(1)).invalidateDrawable(dr); in testSetColor() 157 RippleDrawable dr = new RippleDrawable(ColorStateList.valueOf(Color.RED), null, null); in testWindowFocusChanged() local 158 dr.setBackgroundActive(false, true, false, true); in testWindowFocusChanged() 159 float bgOpacity = dr.getTargetBackgroundOpacity(); in testWindowFocusChanged() 160 dr.setBackgroundActive(false, true, false, false); in testWindowFocusChanged() 162 bgOpacity > dr.getTargetBackgroundOpacity()); in testWindowFocusChanged()
|
D | CustomDrawableTest.java | 49 Drawable dr = InstrumentationRegistry.getTargetContext().getDrawable( in testInflation() local 51 assertTrue(dr instanceof CustomDrawable); in testInflation() 52 assertEquals(Color.RED, ((CustomDrawable) dr).getColor()); in testInflation()
|
D | NinePatchDrawableTest.java | 440 void setTargetDensity(NinePatchDrawable dr, int density); in setTargetDensity() argument 505 verifySetTargetDensityOuter((dr, density) -> dr.setTargetDensity(density)); in testSetTargetDensity() 512 verifySetTargetDensityOuter((dr, density) -> { in testSetTargetDensity_Canvas() argument 515 dr.setTargetDensity(c); in testSetTargetDensity_Canvas() 523 verifySetTargetDensityOuter((dr, density) -> { in testSetTargetDensity_DisplayMetrics() argument 526 dr.setTargetDensity(dm); in testSetTargetDensity_DisplayMetrics() 677 private void compareOrSave(Drawable dr, int densityDpi, int sourceResId, int goldenResId) { in compareOrSave() argument 678 final int width = dr.getIntrinsicWidth(); in compareOrSave() 679 final int height = dr.getIntrinsicHeight(); in compareOrSave() 684 dr.setBounds(0, 0, width, height); in compareOrSave() [all …]
|
D | LayerDrawableTest.java | 1493 LayerDrawable dr; in testChildIntrinsicSize() local 1496 dr = (LayerDrawable) mContext.getDrawable(R.drawable.layer_drawable_intrinsic); in testChildIntrinsicSize() 1497 assertEquals(-1, dr.getIntrinsicWidth()); in testChildIntrinsicSize() 1498 assertEquals(-1, dr.getIntrinsicHeight()); in testChildIntrinsicSize() 1501 dr = new LayerDrawable(new Drawable[] { new ColorDrawable(Color.RED) }); in testChildIntrinsicSize() 1502 dr.setLayerInset(0, 10, 10, 10, 10); in testChildIntrinsicSize() 1503 assertEquals(-1, dr.getIntrinsicWidth()); in testChildIntrinsicSize() 1504 assertEquals(-1, dr.getIntrinsicHeight()); in testChildIntrinsicSize() 1507 dr = (LayerDrawable) mContext.getDrawable(R.drawable.layer_drawable_intrinsic_mixed); in testChildIntrinsicSize() 1508 int width = dr.getLayerInsetLeft(0) + dr.getLayerInsetRight(0) in testChildIntrinsicSize() [all …]
|
D | ScaleDrawableTest.java | 303 ScaleDrawable dr = new ScaleDrawable(null, Gravity.CENTER, 1, 1); in testInitialLevel() local 309 dr.inflate(res, parser, attrs); in testInitialLevel() 310 assertEquals(5000, dr.getLevel()); in testInitialLevel() 312 dr.setLevel(0); in testInitialLevel() 313 assertEquals(0, dr.getLevel()); in testInitialLevel() 316 ScaleDrawable clone = (ScaleDrawable) dr.getConstantState().newDrawable(res); in testInitialLevel() 320 dr.setLevel(1000); in testInitialLevel() 321 assertEquals(1000, dr.getLevel()); in testInitialLevel()
|
D | DrawableContainerStateTest.java | 278 DrawableContainer dr = new LevelListDrawable(); in testCanConstantState() local 279 DrawableContainerState cs = (DrawableContainerState) dr.getConstantState(); in testCanConstantState() 290 DrawableContainer dr = new LevelListDrawable(); in testGrowArray() local 291 DrawableContainerState cs = (DrawableContainerState) dr.getConstantState(); in testGrowArray()
|
D | AdaptiveIconDrawableTest.java | 63 AdaptiveIconDrawable dr = new AdaptiveIconDrawable(null, null); in testInflate() local 70 dr.inflate(r, parser, attrs); in testInflate() 75 AdaptiveIconDrawable dr = new AdaptiveIconDrawable(null, null); in testInflateNull() local 76 dr.inflate(null, null, null); in testInflateNull() 82 AdaptiveIconDrawable dr = new AdaptiveIconDrawable(null, null); in testDraw() local 83 dr.draw(c); in testDraw()
|
D | ClipDrawableTest.java | 164 Drawable dr = spy(new ColorDrawable(Color.GREEN)); in testGetOpacity() local 165 doReturn(PixelFormat.OPAQUE).when(dr).getOpacity(); in testGetOpacity() 167 ClipDrawable clipDrawable = new ClipDrawable(dr, Gravity.BOTTOM, ClipDrawable.HORIZONTAL); in testGetOpacity() 178 doReturn(PixelFormat.TRANSLUCENT).when(dr).getOpacity(); in testGetOpacity() 179 clipDrawable = new ClipDrawable(dr, Gravity.BOTTOM, ClipDrawable.HORIZONTAL); in testGetOpacity()
|
D | DrawableWrapperTest.java | 64 public MyWrapper(Drawable dr) { in MyWrapper() argument 65 super(dr); in MyWrapper() 160 Drawable dr = new MockDrawable(); in testCallbackIsSet() local 162 DrawableWrapper wrapper = new MyWrapper(dr); in testCallbackIsSet() 163 assertEquals(wrapper, dr.getCallback()); in testCallbackIsSet()
|
D | AnimatedImageDrawableTest.java | 576 Drawable dr = ImageDecoder.decodeDrawable(source, (decoder, info, src) -> { in testPostProcess() local 583 assertTrue(dr instanceof AnimatedImageDrawable); in testPostProcess() 584 testDrawable = (AnimatedImageDrawable) dr; in testPostProcess()
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | BitmapDrawableTest.java | 129 private void runTest(Drawable dr) { in runTest() argument 130 final Rect drBounds = new Rect(0, 0, dr.getIntrinsicWidth(), dr.getIntrinsicHeight()); in runTest() 134 dr.setBounds(drBounds); in runTest() 135 dr.draw(canvas); in runTest()
|
/cts/hostsidetests/theme/src/android/theme/cts/ |
D | ComparisonTask.java | 101 final int dr = getAlphaScaledRed(p1) - getAlphaScaledRed(p2); in checkNeighbors() local 107 Math.abs(dr) <= threshold) { in checkNeighbors() 144 final int dr = getAlphaScaledRed(p1) - getAlphaScaledRed(p2); in compare() local 150 Math.abs(dr) > threshold) { in compare() 151 System.err.println("fail dr=" + dr+ " dg=" + dg+ " db=" + db); in compare()
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | ImageDecoderTest.java | 701 Drawable dr = Drawable.createFromResourceStream(res, value, is, null, null); in testNinepatchWithDensityNone() local 702 assertNotNull(dr); in testNinepatchWithDensityNone() 703 assertEquals(5, dr.getIntrinsicWidth()); in testNinepatchWithDensityNone() 704 assertEquals(5, dr.getIntrinsicHeight()); in testNinepatchWithDensityNone() 898 Drawable dr = ImageDecoder.decodeDrawable(src, (decoder, info, s) -> { in testSampleSize() local 902 checkSampleSize(name, record.width, sampleSize, dr.getIntrinsicWidth()); in testSampleSize() 903 checkSampleSize(name, record.height, sampleSize, dr.getIntrinsicHeight()); in testSampleSize() 922 Drawable dr = ImageDecoder.decodeDrawable(src, (decoder, info, s) -> { in testLargeSampleSize() local 926 assertEquals(1, dr.getIntrinsicWidth()); in testLargeSampleSize() 937 Drawable dr = null; in testResizeTransparency() local [all …]
|
/cts/tests/tests/content/src/android/content/res/cts/ |
D | Resources_ThemeTest.java | 183 final ColorDrawable dr = (ColorDrawable) theme.getDrawable(R.drawable.colordrawable_themed); in testGetDrawable() local 184 assertEquals(Color.BLACK, dr.getColor()); in testGetDrawable()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | ImageViewTest.java | 921 protected boolean verifyDrawable(Drawable dr) { in verifyDrawable() argument 922 return super.verifyDrawable(dr); in verifyDrawable()
|
/cts/tests/tests/security/res/raw/ |
D | cve_2019_2245.ts | 2962 …��G�N�54Pm���:�LF����W�Ȧq�뵊"㣭��������Q9���$��_���M5Ry�4�\�DƐh�������y�dr:�D���k�Z,��D�G1�TN… 3422 j�0���4�{�%dr�M9������MaƘSj�n+�jw&�٣v`��יU��(��W-�v䅴H���X��Wz�t{��R�b��۲�#{��F����_���?ks�|�l��…
|
D | cve_2018_13925.ts | 2963 …��G�N�54Pm���:�LF����W�Ȧq�뵊"㣭��������Q9���$��_���M5Ry�4�\�DƐh�������y�dr:�D���k�Z,��D�G1�TN…
|
D | cve_2019_2244.ts | 2964 …��G�N�54Pm���:�LF����W�Ȧq�뵊"㣭��������Q9���$��_���M5Ry�4�\�DƐh�������y�dr:�D���k�Z,��D�G1�TN…
|