/cts/tests/tests/os/src/android/os/cts/ |
D | ParcelTest.java | 66 Parcel p; in testAppendFrom() local 71 p = Parcel.obtain(); in testAppendFrom() 72 d1 = p.dataPosition(); in testAppendFrom() 73 p.writeInt(7); in testAppendFrom() 74 p.writeInt(5); in testAppendFrom() 75 d2 = p.dataPosition(); in testAppendFrom() 77 p2.appendFrom(p, d1, d2 - d1); in testAppendFrom() 82 p.recycle(); in testAppendFrom() 86 Parcel p; in testDataAvail() local 88 p = Parcel.obtain(); in testDataAvail() [all …]
|
/cts/tests/tests/media/src/android/media/cts/ |
D | ParamsTest.java | 51 SyncParams p = new SyncParams(); in testSyncParamsDefaults() local 52 try { fail("got " + p.getAudioAdjustMode()); } catch (IllegalStateException e) {} in testSyncParamsDefaults() 53 try { fail("got " + p.getSyncSource()); } catch (IllegalStateException e) {} in testSyncParamsDefaults() 54 try { fail("got " + p.getTolerance()); } catch (IllegalStateException e) {} in testSyncParamsDefaults() 55 try { fail("got " + p.getFrameRate()); } catch (IllegalStateException e) {} in testSyncParamsDefaults() 57 SyncParams q = p.allowDefaults(); in testSyncParamsDefaults() 58 assertSame(p, q); in testSyncParamsDefaults() 59 assertEquals(p.AUDIO_ADJUST_MODE_DEFAULT, p.getAudioAdjustMode()); in testSyncParamsDefaults() 60 assertEquals(p.SYNC_SOURCE_DEFAULT, p.getSyncSource()); in testSyncParamsDefaults() 61 assertTrue(p.getTolerance() >= 0.f in testSyncParamsDefaults() [all …]
|
D | MediaItemTest.java | 46 Parcel p = Parcel.obtain(); in testBrowsableMediaItem() local 47 mediaItem.writeToParcel(p, 0); in testBrowsableMediaItem() 48 p.setDataPosition(0); in testBrowsableMediaItem() 49 assertEquals(mediaItem.getFlags(), p.readInt()); in testBrowsableMediaItem() 51 MediaDescription.CREATOR.createFromParcel(p).toString()); in testBrowsableMediaItem() 52 p.recycle(); in testBrowsableMediaItem() 69 Parcel p = Parcel.obtain(); in testPlayableMediaItem() local 70 mediaItem.writeToParcel(p, 0); in testPlayableMediaItem() 71 p.setDataPosition(0); in testPlayableMediaItem() 72 assertEquals(mediaItem.getFlags(), p.readInt()); in testPlayableMediaItem() [all …]
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | PaintTest.java | 69 Paint p = new Paint(); in testConstructor() local 70 new Paint(p); in testConstructor() 79 Paint p = new Paint(); in testBreakText() local 82 p.setFlags(p.getFlags() & ~Paint.DEV_KERN_TEXT_FLAG); in testBreakText() 85 assertEquals(text.length(), p.getTextWidths(text, widths)); in testBreakText() 137 assertEquals(emoji.length(), p.getTextWidths(emoji, emojiWidths)); in testBreakText() 159 Paint p = new Paint(); in verifyBreakText() local 162 p.setFlags(p.getFlags() & ~Paint.DEV_KERN_TEXT_FLAG); in verifyBreakText() 175 assertEquals(expectedCount, p.breakText(textSlice, measureForwards, maxWidth, measured[0])); in verifyBreakText() 176 assertEquals(expectedCount, p.breakText(textChars, start, count, maxWidth, measured[1])); in verifyBreakText() [all …]
|
D | PathDashPathEffectTest.java | 51 Paint p = new Paint(); in testPathDashPathEffect() local 52 p.setPathEffect(effect); in testPathDashPathEffect() 53 p.setColor(Color.RED); in testPathDashPathEffect() 54 canvas.drawPath(path(), p); in testPathDashPathEffect() local 59 p = new Paint(); in testPathDashPathEffect() 60 p.setColor(Color.RED); in testPathDashPathEffect() 65 canvas.drawRect(rect, p); in testPathDashPathEffect() 80 Path p = new Path(); in path() local 81 p.moveTo(0, HEIGHT / 2); in path() 82 p.lineTo(WIDTH, HEIGHT / 2); in path() [all …]
|
D | PorterDuffXfermodeTest.java | 49 Paint p = new Paint(); in testPorterDuffXfermode() local 50 canvas.drawBitmap(b1, 0, 0, p); in testPorterDuffXfermode() 51 p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC)); in testPorterDuffXfermode() 52 canvas.drawBitmap(b2, 0, HEIGHT / 2, p); in testPorterDuffXfermode() 58 p.setXfermode(null); in testPorterDuffXfermode() 59 canvas.drawBitmap(b1, 0, 0, p); in testPorterDuffXfermode() 60 p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST)); in testPorterDuffXfermode() 61 canvas.drawBitmap(b2, 0, HEIGHT / 2, p); in testPorterDuffXfermode() 67 p.setXfermode(null); in testPorterDuffXfermode() 68 canvas.drawBitmap(b1, 0, 0, p); in testPorterDuffXfermode() [all …]
|
/cts/tests/tests/text/src/android/text/style/cts/ |
D | AlignmentSpan_StandardTest.java | 41 final Parcel p = Parcel.obtain(); in testConstructor() local 43 standard.writeToParcel(p, 0); in testConstructor() 44 p.setDataPosition(0); in testConstructor() 45 new Standard(p); in testConstructor() 47 p.recycle(); in testConstructor() 77 Parcel p = Parcel.obtain(); in testWriteToParcel() local 80 s.writeToParcel(p, 0); in testWriteToParcel() 81 p.setDataPosition(0); in testWriteToParcel() 82 Standard standard = new Standard(p); in testWriteToParcel() 85 p.recycle(); in testWriteToParcel() [all …]
|
D | LeadingMarginSpan_StandardTest.java | 41 final Parcel p = Parcel.obtain(); in testConstructor() local 43 standard.writeToParcel(p, 0); in testConstructor() 44 p.setDataPosition(0); in testConstructor() 45 new Standard(p); in testConstructor() 47 p.recycle(); in testConstructor() 85 Parcel p = Parcel.obtain(); in testWriteToParcel() local 88 s.writeToParcel(p, 0); in testWriteToParcel() 89 p.setDataPosition(0); in testWriteToParcel() 90 Standard standard = new Standard(p); in testWriteToParcel() 94 p.recycle(); in testWriteToParcel() [all …]
|
D | BackgroundColorSpanTest.java | 38 final Parcel p = Parcel.obtain(); in testConstructor() local 40 b.writeToParcel(p, 0); in testConstructor() 41 p.setDataPosition(0); in testConstructor() 42 new BackgroundColorSpan(p); in testConstructor() 44 p.recycle(); in testConstructor() 91 Parcel p = Parcel.obtain(); in testWriteToParcel() local 94 backgroundColorSpan.writeToParcel(p, 0); in testWriteToParcel() 95 p.setDataPosition(0); in testWriteToParcel() 96 BackgroundColorSpan b = new BackgroundColorSpan(p); in testWriteToParcel() 99 p.recycle(); in testWriteToParcel() [all …]
|
D | ForegroundColorSpanTest.java | 38 final Parcel p = Parcel.obtain(); in testConstructor() local 40 f.writeToParcel(p, 0); in testConstructor() 41 p.setDataPosition(0); in testConstructor() 42 new ForegroundColorSpan(p); in testConstructor() 44 p.recycle(); in testConstructor() 93 Parcel p = Parcel.obtain(); in testWriteToParcel() local 96 foregroundColorSpan.writeToParcel(p, 0); in testWriteToParcel() 97 p.setDataPosition(0); in testWriteToParcel() 98 ForegroundColorSpan f = new ForegroundColorSpan(p); in testWriteToParcel() 101 p.recycle(); in testWriteToParcel() [all …]
|
D | AbsoluteSizeSpanTest.java | 40 final Parcel p = Parcel.obtain(); in testConstructor() local 42 asp.writeToParcel(p, 0); in testConstructor() 43 p.setDataPosition(0); in testConstructor() 44 new AbsoluteSizeSpan(p); in testConstructor() 46 p.recycle(); in testConstructor() 127 Parcel p = Parcel.obtain(); in testWriteToParcel() local 130 asp.writeToParcel(p, 0); in testWriteToParcel() 131 p.setDataPosition(0); in testWriteToParcel() 132 AbsoluteSizeSpan absoluteSizeSpan = new AbsoluteSizeSpan(p); in testWriteToParcel() 135 p.recycle(); in testWriteToParcel() [all …]
|
D | QuoteSpanTest.java | 69 final Parcel p = Parcel.obtain(); in testConstructorFromParcel() local 71 quoteSpan.writeToParcel(p, 0); in testConstructorFromParcel() 72 p.setDataPosition(0); in testConstructorFromParcel() 73 QuoteSpan span = new QuoteSpan(p); in testConstructorFromParcel() 79 p.recycle(); in testConstructorFromParcel() 105 Paint p = new Paint(); in testDrawLeadingMargin() local 106 quoteSpan.drawLeadingMargin(c, p, 0, 0, 0, 0, 0, null, 0, 0, true, null); in testDrawLeadingMargin() 130 Parcel p = Parcel.obtain(); in testWriteToParcel() local 133 quoteSpan.writeToParcel(p, 0); in testWriteToParcel() 134 p.setDataPosition(0); in testWriteToParcel() [all …]
|
D | EasyEditSpanTest.java | 39 Parcel p = Parcel.obtain(); in testConstructor() local 41 new EasyEditSpan(p); in testConstructor() 43 p.recycle(); in testConstructor() 61 Parcel p = Parcel.obtain(); in testWriteToParcel() local 64 easyEditSpan.writeToParcel(p, 0); in testWriteToParcel() 65 p.setDataPosition(0); in testWriteToParcel() 66 new EasyEditSpan(p); in testWriteToParcel() 68 p.recycle(); in testWriteToParcel()
|
D | SubscriptSpanTest.java | 38 Parcel p = Parcel.obtain(); in testConstructor() local 40 subscriptSpan.writeToParcel(p, 0); in testConstructor() 41 p.setDataPosition(0); in testConstructor() 42 new SubscriptSpan(p); in testConstructor() 44 p.recycle(); in testConstructor() 104 Parcel p = Parcel.obtain(); in testWriteToParcel() local 107 subscriptSpan.writeToParcel(p, 0); in testWriteToParcel() 108 p.setDataPosition(0); in testWriteToParcel() 109 new SubscriptSpan(p); in testWriteToParcel() 111 p.recycle(); in testWriteToParcel()
|
D | SuperscriptSpanTest.java | 37 Parcel p = Parcel.obtain(); in testConstructor() local 39 superscriptSpan.writeToParcel(p, 0); in testConstructor() 40 p.setDataPosition(0); in testConstructor() 41 new SuperscriptSpan(p); in testConstructor() 43 p.recycle(); in testConstructor() 103 Parcel p = Parcel.obtain(); in testWriteToParcel() local 106 superscriptSpan.writeToParcel(p, 0); in testWriteToParcel() 107 p.setDataPosition(0); in testWriteToParcel() 108 new SuperscriptSpan(p); in testWriteToParcel() 110 p.recycle(); in testWriteToParcel()
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | ExactCanvasTests.java | 51 Paint p = new Paint(); in testBlueRect() local 52 p.setAntiAlias(false); in testBlueRect() 53 p.setColor(Color.BLUE); in testBlueRect() 54 canvas.drawRect(rect, p); in testBlueRect() 63 Paint p = new Paint(); in testPoints() local 64 p.setAntiAlias(false); in testPoints() 65 p.setStrokeWidth(1f); in testPoints() 66 p.setColor(Color.BLACK); in testPoints() 68 canvas.drawPoint(i * 10, i * 10, p); in testPoints() 78 Paint p = new Paint(); in testBlackRectWithStroke() local [all …]
|
/cts/tests/tests/security/src/android/security/cts/ |
D | OutputConfigurationTest.java | 40 Parcel p; in testSharedSurfaceOutputConfigurationBasic() local 41 p = Parcel.obtain(); in testSharedSurfaceOutputConfigurationBasic() 42 outputConfig.writeToParcel(p, 0); in testSharedSurfaceOutputConfigurationBasic() 43 p.setDataPosition(0); in testSharedSurfaceOutputConfigurationBasic() 44 OutputConfiguration parcelledOutput = OutputConfiguration.CREATOR.createFromParcel(p); in testSharedSurfaceOutputConfigurationBasic() 58 p.recycle(); in testSharedSurfaceOutputConfigurationBasic() 63 p = Parcel.obtain(); in testSharedSurfaceOutputConfigurationBasic() 64 outputConfig.writeToParcel(p, 0); in testSharedSurfaceOutputConfigurationBasic() 65 p.setDataPosition(0); in testSharedSurfaceOutputConfigurationBasic() 66 parcelledOutput = OutputConfiguration.CREATOR.createFromParcel(p); in testSharedSurfaceOutputConfigurationBasic() [all …]
|
D | AmbiguousBundlesTest.java | 99 Parcel p = Parcel.obtain(); in test_android_CVE_2017_13287() 100 p.writeInt(0); in test_android_CVE_2017_13287() 101 p.writeInt(0); in test_android_CVE_2017_13287() 114 p.writeInt(paddingVal); in test_android_CVE_2017_13287() 118 p.appendFrom(p2, BUNDLE_SKIP, p2Len); in test_android_CVE_2017_13287() 121 while (p.dataPosition() % 8 != 0) p.writeInt(0); in test_android_CVE_2017_13287() 123 p.writeInt(0); in test_android_CVE_2017_13287() 126 int len = p.dataPosition() / 2 - 1; in test_android_CVE_2017_13287() 127 p.writeInt(0); p.writeInt(0); in test_android_CVE_2017_13287() 128 p.setDataPosition(0); in test_android_CVE_2017_13287() [all …]
|
/cts/tests/tests/renderscript/src/android/renderscript/cts/ |
D | yuv.rs | 32 short4 p; 33 p.x = (Y * 298 + V * 409 + 128) >> 8; 34 p.y = (Y * 298 - U * 100 - V * 208 + 128) >> 8; 35 p.z = (Y * 298 + U * 516 + 128) >> 8; 36 p.w = 255; 37 if(p.x < 0) { 38 p.x = 0; 40 if(p.x > 255) { 41 p.x = 255; 43 if(p.y < 0) { [all …]
|
D | set_object.rs | 12 *out = ( dst.p == in->allocation.p ? 1 : 0 ); 23 *out = ( dst.p == in->element.p ? 1 : 0 ); 34 *out = ( dst.p == in->sampler.p ? 1 : 0 ); 45 *out = ( dst.p == in->script.p ? 1 : 0 ); 56 *out = ( dst.p == in->type.p ? 1 : 0 );
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityGestureDetectorTest.java | 118 testPath(p(-dx, +0), AccessibilityService.GESTURE_SWIPE_LEFT); in testRecognizeGesturePath() 119 testPath(p(+dx, +0), AccessibilityService.GESTURE_SWIPE_RIGHT); in testRecognizeGesturePath() 120 testPath(p(+0, -dy), AccessibilityService.GESTURE_SWIPE_UP); in testRecognizeGesturePath() 121 testPath(p(+0, +dy), AccessibilityService.GESTURE_SWIPE_DOWN); in testRecognizeGesturePath() 123 testPath(p(-dx, +0), p(+0, +0), AccessibilityService.GESTURE_SWIPE_LEFT_AND_RIGHT); in testRecognizeGesturePath() 124 testPath(p(-dx, +0), p(-dx, -dy), AccessibilityService.GESTURE_SWIPE_LEFT_AND_UP); in testRecognizeGesturePath() 125 testPath(p(-dx, +0), p(-dx, +dy), AccessibilityService.GESTURE_SWIPE_LEFT_AND_DOWN); in testRecognizeGesturePath() 127 testPath(p(+dx, +0), p(+0, +0), AccessibilityService.GESTURE_SWIPE_RIGHT_AND_LEFT); in testRecognizeGesturePath() 128 testPath(p(+dx, +0), p(+dx, -dy), AccessibilityService.GESTURE_SWIPE_RIGHT_AND_UP); in testRecognizeGesturePath() 129 testPath(p(+dx, +0), p(+dx, +dy), AccessibilityService.GESTURE_SWIPE_RIGHT_AND_DOWN); in testRecognizeGesturePath() [all …]
|
/cts/tests/tests/telecom/src/android/telecom/cts/ |
D | DataObjectUnitTests.java | 83 Parcel p = Parcel.obtain(); in testPhoneAccount() local 84 account.writeToParcel(p, 0); in testPhoneAccount() 85 p.setDataPosition(0); in testPhoneAccount() 86 PhoneAccount parcelAccount = PhoneAccount.CREATOR.createFromParcel(p); in testPhoneAccount() 97 p.recycle(); in testPhoneAccount() 115 Parcel p = Parcel.obtain(); in testPhoneAccountHandle() local 116 accountHandle.writeToParcel(p, 0); in testPhoneAccountHandle() 117 p.setDataPosition(0); in testPhoneAccountHandle() 118 PhoneAccountHandle unparcelled = PhoneAccountHandle.CREATOR.createFromParcel(p); in testPhoneAccountHandle() 123 p.recycle(); in testPhoneAccountHandle() [all …]
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/ |
D | GestureUtils.java | 66 float[] p = stroke.getPath().approximate(0.3f); in lastPointOf() local 67 return new PointF(p[p.length - 2], p[p.length - 1]); in lastPointOf() 129 public static PointF negate(PointF p) { in negate() argument 130 return times(-1, p); in negate() 133 public static PointF times(float mult, PointF p) { in times() argument 134 return new PointF(p.x * mult, p.y * mult); in times() 137 public static float length(PointF p) { in length() argument 138 return (float) Math.hypot(p.x, p.y); in length() 141 public static PointF ceil(PointF p) { in ceil() argument 142 return new PointF((float) Math.ceil(p.x), (float) Math.ceil(p.y)); in ceil()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | RemoteViewsActivityTest.java | 57 Parcel p = Parcel.obtain(); in testGood() local 58 orig.writeToParcel(p, 0); in testGood() 59 p.setDataPosition(0); in testGood() 61 RemoteViews r = RemoteViews.CREATOR.createFromParcel(p); in testGood() 67 p.recycle(); in testGood() 83 Parcel p = Parcel.obtain(); in testDerivedClass() local 84 orig.writeToParcel(p, 0); in testDerivedClass() 85 p.setDataPosition(0); in testDerivedClass() 87 RemoteViews r = RemoteViews.CREATOR.createFromParcel(p); in testDerivedClass() 100 p.recycle(); in testDerivedClass() [all …]
|
/cts/tests/tests/tv/src/android/media/tv/cts/ |
D | TvTrackInfoTest.java | 49 Parcel p = Parcel.obtain(); in testAudioTrackInfoOp() local 50 info.writeToParcel(p, 0); in testAudioTrackInfoOp() 51 p.setDataPosition(0); in testAudioTrackInfoOp() 52 TvTrackInfo infoFromParcel = TvTrackInfo.CREATOR.createFromParcel(p); in testAudioTrackInfoOp() 60 p.recycle(); in testAudioTrackInfoOp() 90 Parcel p = Parcel.obtain(); in testVideoTrackInfoOp() local 91 info.writeToParcel(p, 0); in testVideoTrackInfoOp() 92 p.setDataPosition(0); in testVideoTrackInfoOp() 93 TvTrackInfo infoFromParcel = TvTrackInfo.CREATOR.createFromParcel(p); in testVideoTrackInfoOp() 104 p.recycle(); in testVideoTrackInfoOp() [all …]
|