Home
last modified time | relevance | path

Searched refs:p (Results 1 – 25 of 384) sorted by relevance

12345678910>>...16

/cts/tests/tests/os/src/android/os/cts/
DParcelTest.java80 Parcel p; in testAppendFrom() local
85 p = Parcel.obtain(); in testAppendFrom()
86 d1 = p.dataPosition(); in testAppendFrom()
87 p.writeInt(7); in testAppendFrom()
88 p.writeInt(5); in testAppendFrom()
89 d2 = p.dataPosition(); in testAppendFrom()
91 p2.appendFrom(p, d1, d2 - d1); in testAppendFrom()
96 p.recycle(); in testAppendFrom()
100 Parcel p; in testDataAvail() local
102 p = Parcel.obtain(); in testDataAvail()
[all …]
/cts/tests/tests/media/src/android/media/cts/
DParamsTest.java50 SyncParams p = new SyncParams(); in testSyncParamsDefaults() local
51 try { fail("got " + p.getAudioAdjustMode()); } catch (IllegalStateException e) {} in testSyncParamsDefaults()
52 try { fail("got " + p.getSyncSource()); } catch (IllegalStateException e) {} in testSyncParamsDefaults()
53 try { fail("got " + p.getTolerance()); } catch (IllegalStateException e) {} in testSyncParamsDefaults()
54 try { fail("got " + p.getFrameRate()); } catch (IllegalStateException e) {} in testSyncParamsDefaults()
56 SyncParams q = p.allowDefaults(); in testSyncParamsDefaults()
57 assertSame(p, q); in testSyncParamsDefaults()
58 assertEquals(p.AUDIO_ADJUST_MODE_DEFAULT, p.getAudioAdjustMode()); in testSyncParamsDefaults()
59 assertEquals(p.SYNC_SOURCE_DEFAULT, p.getSyncSource()); in testSyncParamsDefaults()
60 assertTrue(p.getTolerance() >= 0.f in testSyncParamsDefaults()
[all …]
DMediaItemTest.java46 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/
DPaintTest.java87 Paint p = new Paint(); in testConstructor() local
88 new Paint(p); in testConstructor()
114 for (Paint p : new Paint[]{ new Paint(), in testDefaultColor()
119 assertEquals(Color.BLACK, p.getColor()); in testDefaultColor()
120 assertEquals(Color.TRANSPARENT, p.getShadowLayerColor()); in testDefaultColor()
122 assertEquals(Color.BLACK, Color.toArgb(p.getColorLong())); in testDefaultColor()
123 assertEquals(Color.TRANSPARENT, Color.toArgb(p.getShadowLayerColorLong())); in testDefaultColor()
133 Paint p = new Paint(); in testBreakText() local
136 p.setFlags(p.getFlags() & ~Paint.DEV_KERN_TEXT_FLAG); in testBreakText()
139 assertEquals(text.length(), p.getTextWidths(text, widths)); in testBreakText()
[all …]
DPathDashPathEffectTest.java52 Paint p = new Paint(); in testPathDashPathEffect() local
53 p.setPathEffect(effect); in testPathDashPathEffect()
54 p.setColor(Color.RED); in testPathDashPathEffect()
55 canvas.drawPath(path(), p); in testPathDashPathEffect() local
60 p = new Paint(); in testPathDashPathEffect()
61 p.setColor(Color.RED); in testPathDashPathEffect()
66 canvas.drawRect(rect, p); in testPathDashPathEffect()
81 Path p = new Path(); in path() local
82 p.moveTo(0, HEIGHT / 2); in path()
83 p.lineTo(WIDTH, HEIGHT / 2); in path()
[all …]
DPorterDuffXfermodeTest.java50 Paint p = new Paint(); in testPorterDuffXfermode() local
51 canvas.drawBitmap(b1, 0, 0, p); in testPorterDuffXfermode()
52 p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC)); in testPorterDuffXfermode()
53 canvas.drawBitmap(b2, 0, HEIGHT / 2, p); in testPorterDuffXfermode()
59 p.setXfermode(null); in testPorterDuffXfermode()
60 canvas.drawBitmap(b1, 0, 0, p); in testPorterDuffXfermode()
61 p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST)); in testPorterDuffXfermode()
62 canvas.drawBitmap(b2, 0, HEIGHT / 2, p); in testPorterDuffXfermode()
68 p.setXfermode(null); in testPorterDuffXfermode()
69 canvas.drawBitmap(b1, 0, 0, p); in testPorterDuffXfermode()
[all …]
/cts/tests/tests/text/src/android/text/style/cts/
DAlignmentSpan_StandardTest.java42 final Parcel p = Parcel.obtain(); in testConstructor() local
44 standard.writeToParcel(p, 0); in testConstructor()
45 p.setDataPosition(0); in testConstructor()
46 new Standard(p); in testConstructor()
48 p.recycle(); in testConstructor()
78 Parcel p = Parcel.obtain(); in testWriteToParcel() local
81 s.writeToParcel(p, 0); in testWriteToParcel()
82 p.setDataPosition(0); in testWriteToParcel()
83 Standard standard = new Standard(p); in testWriteToParcel()
86 p.recycle(); in testWriteToParcel()
[all …]
DLeadingMarginSpan_StandardTest.java42 final Parcel p = Parcel.obtain(); in testConstructor() local
44 standard.writeToParcel(p, 0); in testConstructor()
45 p.setDataPosition(0); in testConstructor()
46 new Standard(p); in testConstructor()
48 p.recycle(); in testConstructor()
86 Parcel p = Parcel.obtain(); in testWriteToParcel() local
89 s.writeToParcel(p, 0); in testWriteToParcel()
90 p.setDataPosition(0); in testWriteToParcel()
91 Standard standard = new Standard(p); in testWriteToParcel()
95 p.recycle(); in testWriteToParcel()
[all …]
DBackgroundColorSpanTest.java39 final Parcel p = Parcel.obtain(); in testConstructor() local
41 b.writeToParcel(p, 0); in testConstructor()
42 p.setDataPosition(0); in testConstructor()
43 new BackgroundColorSpan(p); in testConstructor()
45 p.recycle(); in testConstructor()
92 Parcel p = Parcel.obtain(); in testWriteToParcel() local
95 backgroundColorSpan.writeToParcel(p, 0); in testWriteToParcel()
96 p.setDataPosition(0); in testWriteToParcel()
97 BackgroundColorSpan b = new BackgroundColorSpan(p); in testWriteToParcel()
100 p.recycle(); in testWriteToParcel()
[all …]
DForegroundColorSpanTest.java39 final Parcel p = Parcel.obtain(); in testConstructor() local
41 f.writeToParcel(p, 0); in testConstructor()
42 p.setDataPosition(0); in testConstructor()
43 new ForegroundColorSpan(p); in testConstructor()
45 p.recycle(); in testConstructor()
94 Parcel p = Parcel.obtain(); in testWriteToParcel() local
97 foregroundColorSpan.writeToParcel(p, 0); in testWriteToParcel()
98 p.setDataPosition(0); in testWriteToParcel()
99 ForegroundColorSpan f = new ForegroundColorSpan(p); in testWriteToParcel()
102 p.recycle(); in testWriteToParcel()
[all …]
DAbsoluteSizeSpanTest.java41 final Parcel p = Parcel.obtain(); in testConstructor() local
43 asp.writeToParcel(p, 0); in testConstructor()
44 p.setDataPosition(0); in testConstructor()
45 new AbsoluteSizeSpan(p); in testConstructor()
47 p.recycle(); in testConstructor()
128 Parcel p = Parcel.obtain(); in testWriteToParcel() local
131 asp.writeToParcel(p, 0); in testWriteToParcel()
132 p.setDataPosition(0); in testWriteToParcel()
133 AbsoluteSizeSpan absoluteSizeSpan = new AbsoluteSizeSpan(p); in testWriteToParcel()
136 p.recycle(); in testWriteToParcel()
[all …]
DQuoteSpanTest.java70 final Parcel p = Parcel.obtain(); in testConstructorFromParcel() local
72 quoteSpan.writeToParcel(p, 0); in testConstructorFromParcel()
73 p.setDataPosition(0); in testConstructorFromParcel()
74 QuoteSpan span = new QuoteSpan(p); in testConstructorFromParcel()
80 p.recycle(); in testConstructorFromParcel()
106 Paint p = new Paint(); in testDrawLeadingMargin() local
107 quoteSpan.drawLeadingMargin(c, p, 0, 0, 0, 0, 0, null, 0, 0, true, null); in testDrawLeadingMargin()
131 Parcel p = Parcel.obtain(); in testWriteToParcel() local
134 quoteSpan.writeToParcel(p, 0); in testWriteToParcel()
135 p.setDataPosition(0); in testWriteToParcel()
[all …]
DEasyEditSpanTest.java40 Parcel p = Parcel.obtain(); in testConstructor() local
42 new EasyEditSpan(p); in testConstructor()
44 p.recycle(); in testConstructor()
62 Parcel p = Parcel.obtain(); in testWriteToParcel() local
65 easyEditSpan.writeToParcel(p, 0); in testWriteToParcel()
66 p.setDataPosition(0); in testWriteToParcel()
67 new EasyEditSpan(p); in testWriteToParcel()
69 p.recycle(); in testWriteToParcel()
DSuperscriptSpanTest.java38 Parcel p = Parcel.obtain(); in testConstructor() local
40 superscriptSpan.writeToParcel(p, 0); in testConstructor()
41 p.setDataPosition(0); in testConstructor()
42 new SuperscriptSpan(p); in testConstructor()
44 p.recycle(); in testConstructor()
104 Parcel p = Parcel.obtain(); in testWriteToParcel() local
107 superscriptSpan.writeToParcel(p, 0); in testWriteToParcel()
108 p.setDataPosition(0); in testWriteToParcel()
109 new SuperscriptSpan(p); in testWriteToParcel()
111 p.recycle(); in testWriteToParcel()
DSubscriptSpanTest.java39 Parcel p = Parcel.obtain(); in testConstructor() local
41 subscriptSpan.writeToParcel(p, 0); in testConstructor()
42 p.setDataPosition(0); in testConstructor()
43 new SubscriptSpan(p); in testConstructor()
45 p.recycle(); in testConstructor()
105 Parcel p = Parcel.obtain(); in testWriteToParcel() local
108 subscriptSpan.writeToParcel(p, 0); in testWriteToParcel()
109 p.setDataPosition(0); in testWriteToParcel()
110 new SubscriptSpan(p); in testWriteToParcel()
112 p.recycle(); in testWriteToParcel()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DExactCanvasTests.java56 Paint p = new Paint(); in testBlueRect() local
57 p.setAntiAlias(false); in testBlueRect()
58 p.setColor(Color.BLUE); in testBlueRect()
59 canvas.drawRect(rect, p); in testBlueRect()
68 Paint p = new Paint(); in testPoints() local
69 p.setAntiAlias(false); in testPoints()
70 p.setStrokeWidth(1f); in testPoints()
71 p.setColor(Color.BLACK); in testPoints()
73 canvas.drawPoint(i * 10, i * 10, p); in testPoints()
83 Paint p = new Paint(); in testBlackRectWithStroke() local
[all …]
/cts/tests/tests/security/src/android/security/cts/
DOutputConfigurationTest.java40 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 …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/
Dyuv.rs32 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 …]
Dset_object.rs12 *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/tests/telecom/src/android/telecom/cts/
DDataObjectUnitTests.java82 Parcel p = Parcel.obtain(); in testPhoneAccount() local
83 account.writeToParcel(p, 0); in testPhoneAccount()
84 p.setDataPosition(0); in testPhoneAccount()
85 PhoneAccount parcelAccount = PhoneAccount.CREATOR.createFromParcel(p); in testPhoneAccount()
96 p.recycle(); in testPhoneAccount()
114 Parcel p = Parcel.obtain(); in testPhoneAccountHandle() local
115 accountHandle.writeToParcel(p, 0); in testPhoneAccountHandle()
116 p.setDataPosition(0); in testPhoneAccountHandle()
117 PhoneAccountHandle unparcelled = PhoneAccountHandle.CREATOR.createFromParcel(p); in testPhoneAccountHandle()
122 p.recycle(); in testPhoneAccountHandle()
[all …]
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityGestureDetectorTest.java123 testPath(p(-dx, +0), AccessibilityService.GESTURE_SWIPE_LEFT); in testRecognizeGesturePath()
124 testPath(p(+dx, +0), AccessibilityService.GESTURE_SWIPE_RIGHT); in testRecognizeGesturePath()
125 testPath(p(+0, -dy), AccessibilityService.GESTURE_SWIPE_UP); in testRecognizeGesturePath()
126 testPath(p(+0, +dy), AccessibilityService.GESTURE_SWIPE_DOWN); in testRecognizeGesturePath()
128 testPath(p(-dx, +0), p(+0, +0), AccessibilityService.GESTURE_SWIPE_LEFT_AND_RIGHT); in testRecognizeGesturePath()
129 testPath(p(-dx, +0), p(-dx, -dy), AccessibilityService.GESTURE_SWIPE_LEFT_AND_UP); in testRecognizeGesturePath()
130 testPath(p(-dx, +0), p(-dx, +dy), AccessibilityService.GESTURE_SWIPE_LEFT_AND_DOWN); in testRecognizeGesturePath()
132 testPath(p(+dx, +0), p(+0, +0), AccessibilityService.GESTURE_SWIPE_RIGHT_AND_LEFT); in testRecognizeGesturePath()
133 testPath(p(+dx, +0), p(+dx, -dy), AccessibilityService.GESTURE_SWIPE_RIGHT_AND_UP); in testRecognizeGesturePath()
134 testPath(p(+dx, +0), p(+dx, +dy), AccessibilityService.GESTURE_SWIPE_RIGHT_AND_DOWN); in testRecognizeGesturePath()
[all …]
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/
DGestureUtils.java66 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/tv/src/android/media/tv/cts/
DTvTrackInfoTest.java49 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 …]
/cts/tests/tests/widget/src/android/widget/cts/
DRemoteViewsActivityTest.java58 Parcel p = Parcel.obtain(); in testGood() local
59 orig.writeToParcel(p, 0); in testGood()
60 p.setDataPosition(0); in testGood()
62 RemoteViews r = RemoteViews.CREATOR.createFromParcel(p); in testGood()
68 p.recycle(); in testGood()
84 Parcel p = Parcel.obtain(); in testDerivedClass() local
85 orig.writeToParcel(p, 0); in testDerivedClass()
86 p.setDataPosition(0); in testDerivedClass()
88 RemoteViews r = RemoteViews.CREATOR.createFromParcel(p); in testDerivedClass()
101 p.recycle(); in testDerivedClass()
[all …]
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DCellInfoTest.java360 Parcel p = Parcel.obtain(); in verifyCellInfoCdmaParcelandHashcode() local
361 cdma.writeToParcel(p, 0); in verifyCellInfoCdmaParcelandHashcode()
362 p.setDataPosition(0); in verifyCellInfoCdmaParcelandHashcode()
364 CellInfoCdma newCi = CellInfoCdma.CREATOR.createFromParcel(p); in verifyCellInfoCdmaParcelandHashcode()
400 Parcel p = Parcel.obtain(); in verifyCellIdentityCdmaParcel() local
401 cdma.writeToParcel(p, 0); in verifyCellIdentityCdmaParcel()
402 p.setDataPosition(0); in verifyCellIdentityCdmaParcel()
404 CellIdentityCdma newCi = CellIdentityCdma.CREATOR.createFromParcel(p); in verifyCellIdentityCdmaParcel()
441 Parcel p = Parcel.obtain(); in verifyCellSignalStrengthCdmaParcel() local
442 cdma.writeToParcel(p, 0); in verifyCellSignalStrengthCdmaParcel()
[all …]

12345678910>>...16