/frameworks/base/core/tests/coretests/src/android/os/ |
D | ParcelNullabilityTest.java | 41 Parcel p = Parcel.obtain(); in nullByteArray() local 42 p.writeByteArray(null); in nullByteArray() 44 assertNull(throughBytes(p).createByteArray()); in nullByteArray() 49 Parcel p = Parcel.obtain(); in nullBlob() local 50 p.writeBlob(null); in nullBlob() 52 assertNull(throughBytes(p).readBlob()); in nullBlob() 57 Parcel p = Parcel.obtain(); in nullString() local 58 p.writeString(null); in nullString() 60 assertNull(throughBytes(p).readString()); in nullString() 65 Parcel p = Parcel.obtain(); in nullCharSequence() local [all …]
|
D | ParcelTest.java | 38 Parcel p = Parcel.obtain(); in testCallingWorkSourceUidAfterWrite() local 41 assertEquals(false, p.replaceCallingWorkSourceUid(WORK_SOURCE_1)); in testCallingWorkSourceUidAfterWrite() 42 assertEquals(Binder.UNSET_WORKSOURCE, p.readCallingWorkSourceUid()); in testCallingWorkSourceUidAfterWrite() 45 p.writeInterfaceToken(INTERFACE_TOKEN_1); in testCallingWorkSourceUidAfterWrite() 46 assertEquals(true, p.replaceCallingWorkSourceUid(WORK_SOURCE_1)); in testCallingWorkSourceUidAfterWrite() 47 assertEquals(WORK_SOURCE_1, p.readCallingWorkSourceUid()); in testCallingWorkSourceUidAfterWrite() 50 assertEquals(true, p.replaceCallingWorkSourceUid(Binder.UNSET_WORKSOURCE)); in testCallingWorkSourceUidAfterWrite() 51 assertEquals(Binder.UNSET_WORKSOURCE, p.readCallingWorkSourceUid()); in testCallingWorkSourceUidAfterWrite() 53 p.recycle(); in testCallingWorkSourceUidAfterWrite() 58 Parcel p = Parcel.obtain(); in testCallingWorkSourceUidAfterEnforce() local [all …]
|
D | BundleTest.java | 51 final Parcel p = Parcel.obtain(); in createBundleParcel() local 53 source.writeToParcel(p, 0); in createBundleParcel() 54 p.setDataPosition(0); in createBundleParcel() 56 return p; in createBundleParcel() 95 Parcel p; in testCreateFromParcel() local 102 p = createBundleParcel(withFd); in testCreateFromParcel() 103 checkBundle(new Bundle(p), withFd); in testCreateFromParcel() 104 p.recycle(); in testCreateFromParcel() 107 p = createBundleParcel(withFd); in testCreateFromParcel() 108 length = p.readInt(); in testCreateFromParcel() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | ATResponseParserTest.java | 25 ATResponseParser p = new ATResponseParser("+CREG: 0"); in testBasic() local 27 assertEquals(0, p.nextInt()); in testBasic() 29 assertFalse(p.hasMore()); in testBasic() 32 p.nextInt(); in testBasic() 38 p = new ATResponseParser("+CREG: 0,1"); in testBasic() 39 assertEquals(0, p.nextInt()); in testBasic() 40 assertEquals(1, p.nextInt()); in testBasic() 41 assertFalse(p.hasMore()); in testBasic() 43 p = new ATResponseParser("+CREG: 0, 1"); in testBasic() 44 assertEquals(0, p.nextInt()); in testBasic() [all …]
|
D | CellIdentityTdscdmaTest.java | 112 Parcel p = Parcel.obtain(); in testParcel() local 113 ci.writeToParcel(p, 0); in testParcel() 114 p.setDataPosition(0); in testParcel() 116 CellIdentityTdscdma newCi = CellIdentityTdscdma.CREATOR.createFromParcel(p); in testParcel() 126 Parcel p = Parcel.obtain(); in testParcelWithUnknowMccMnc() local 127 p.writeInt(CellInfo.TYPE_TDSCDMA); in testParcelWithUnknowMccMnc() 128 p.writeString(String.valueOf(Integer.MAX_VALUE)); in testParcelWithUnknowMccMnc() 129 p.writeString(String.valueOf(Integer.MAX_VALUE)); in testParcelWithUnknowMccMnc() 130 p.writeString(ALPHA_LONG); in testParcelWithUnknowMccMnc() 131 p.writeString(ALPHA_SHORT); in testParcelWithUnknowMccMnc() [all …]
|
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
D | SettingsProtoDumpUtil.java | 92 @NonNull ProtoOutputStream p, long fieldId, @NonNull SettingsState s) { in dumpProtoGlobalSettingsLocked() 93 final long token = p.start(fieldId); in dumpProtoGlobalSettingsLocked() 94 s.dumpHistoricalOperations(p, GlobalSettingsProto.HISTORICAL_OPERATIONS); in dumpProtoGlobalSettingsLocked() 97 dumpSetting(s, p, in dumpProtoGlobalSettingsLocked() 100 dumpSetting(s, p, in dumpProtoGlobalSettingsLocked() 103 dumpSetting(s, p, in dumpProtoGlobalSettingsLocked() 107 final long airplaneModeToken = p.start(GlobalSettingsProto.AIRPLANE_MODE); in dumpProtoGlobalSettingsLocked() 108 dumpSetting(s, p, in dumpProtoGlobalSettingsLocked() 116 dumpSetting(s, p, in dumpProtoGlobalSettingsLocked() 119 dumpSetting(s, p, in dumpProtoGlobalSettingsLocked() [all …]
|
/frameworks/rs/script_api/ |
D | GenerateTestFiles.cpp | 138 void writeJavaArrayInitialization(const ParameterDefinition& p) const; 141 void writeJavaTestAndSetValid(const ParameterDefinition& p, const string& argsIndex, 143 void writeJavaTestOneValue(const ParameterDefinition& p, const string& argsIndex, 146 void writeJavaVectorComparison(const ParameterDefinition& p) const; 149 void writeJavaAppendOutputToMessage(const ParameterDefinition& p, const string& argsIndex, 151 void writeJavaAppendInputToMessage(const ParameterDefinition& p, const string& actual) const; 153 void writeJavaAppendVectorInputToMessage(const ParameterDefinition& p) const; 154 void writeJavaAppendVectorOutputToMessage(const ParameterDefinition& p) const; 192 for (auto p : permutation.getParams()) { in PermutationWriter() local 193 mAllInputsAndOutputs.push_back(p); in PermutationWriter() [all …]
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | Lines2Activity.java | 75 private void drawLines(Canvas canvas, Paint p, float xOffset, float yOffset) { in drawLines() argument 76 canvas.drawLine(10 + xOffset, yOffset, 10 + xOffset, 40 + yOffset, p); in drawLines() 77 canvas.drawLine(30 + xOffset, yOffset, 40 + xOffset, 40 + yOffset, p); in drawLines() 78 canvas.drawLine(40 + xOffset, yOffset, 75 + xOffset, 35 + yOffset, p); in drawLines() 79 canvas.drawLine(50 + xOffset, 5+ yOffset, 100 + xOffset, 15 + yOffset, p); in drawLines() 80 canvas.drawLine(60 + xOffset, yOffset, 110 + xOffset, 2 + yOffset, p); in drawLines() 81 canvas.drawLine(60 + xOffset, 40 + yOffset, 110 + xOffset, 40 + yOffset, p); in drawLines() 86 canvas.drawLines(copyPoints, 0, 12, p); in drawLines() 89 private void drawVerticalLine(Canvas canvas, Paint p, float length, float x, float y) { in drawVerticalLine() argument 90 canvas.drawLine(x, y, x, y + length, p); in drawVerticalLine() [all …]
|
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/ |
D | mandelbulb.rs | 42 static float3 nylander3(float3 p) { 44 float xy2 = p.x * p.x + p.y * p.y; 46 float z23x2y2 = (3 * p.z * p.z - p.x * p.x - p.y * p.y); 47 out.x = (z23x2y2 * p.x * (p.x * p.x - 3 * p.y * p.y)) / xy2; 48 out.y = (z23x2y2 * p.y * (3 * p.x * p.x - p.y * p.y)) / xy2; 49 out.z = p.z * (p.z * p.z - 3 * p.x * p.x - 3 * p.y * p.y); 62 float3 p = c; 66 p = nylander3(p) + c; 67 len = fast_length(p); 72 len = length(p);
|
/frameworks/av/media/libaudioprocessing/ |
D | AudioResamplerCubic.h | 50 static inline int32_t interp(state* p, int32_t x) { in interp() argument 51 return (((((p->a * x >> 14) + p->b) * x >> 14) + p->c) * x >> 14) + p->y1; in interp() 53 static inline void advance(state* p, int16_t in) { in advance() argument 54 p->y0 = p->y1; in advance() 55 p->y1 = p->y2; in advance() 56 p->y2 = p->y3; in advance() 57 p->y3 = in; in advance() 58 p->a = (3 * (p->y1 - p->y2) - p->y0 + p->y3) >> 1; in advance() 59 p->b = (p->y2 << 1) + p->y0 - (((5 * p->y1 + p->y3)) >> 1); in advance() 60 p->c = (p->y2 - p->y0) >> 1; in advance()
|
/frameworks/base/core/tests/coretests/src/android/service/euicc/ |
D | EuiccProfileInfoTest.java | 42 EuiccProfileInfo p = in testWriteToParcel() local 61 p.writeToParcel(parcel, 0); in testWriteToParcel() 66 assertEquals(p, fromParcel); in testWriteToParcel() 71 EuiccProfileInfo p = in testWriteToParcelNullCarrierId() local 86 p.writeToParcel(parcel, 0); in testWriteToParcelNullCarrierId() 91 assertEquals(p, fromParcel); in testWriteToParcelNullCarrierId() 96 EuiccProfileInfo p = in testBuilderAndGetters() local 112 assertEquals("21430000000000006587", p.getIccid()); in testBuilderAndGetters() 113 assertEquals("profile nickname", p.getNickname()); in testBuilderAndGetters() 114 assertEquals("profile name", p.getProfileName()); in testBuilderAndGetters() [all …]
|
/frameworks/base/tests/net/common/java/android/net/ |
D | IpPrefixTest.java | 57 IpPrefix p; in testConstructor() local 59 p = new IpPrefix((byte[]) null, 9); in testConstructor() 64 p = new IpPrefix((InetAddress) null, 10); in testConstructor() 69 p = new IpPrefix((String) null); in testConstructor() 76 p = new IpPrefix(b2, 29); in testConstructor() 81 p = new IpPrefix("1.2.3.4"); in testConstructor() 86 p = new IpPrefix("1.2.3.4/"); in testConstructor() 91 p = new IpPrefix("foo/32"); in testConstructor() 96 p = new IpPrefix("1/32"); in testConstructor() 101 p = new IpPrefix("1.2.3.256/32"); in testConstructor() [all …]
|
/frameworks/base/core/java/android/os/ |
D | MessageQueue.java | 487 Message p = mMessages; in postSyncBarrier() local 489 while (p != null && p.when <= when) { in postSyncBarrier() 490 prev = p; in postSyncBarrier() 491 p = p.next; in postSyncBarrier() 495 msg.next = p; in postSyncBarrier() 498 msg.next = p; in postSyncBarrier() 521 Message p = mMessages; in removeSyncBarrier() local 522 while (p != null && (p.target != null || p.arg1 != token)) { in removeSyncBarrier() 523 prev = p; in removeSyncBarrier() 524 p = p.next; in removeSyncBarrier() [all …]
|
/frameworks/native/libs/vr/libbufferhub/ |
D | buffer_hub-test.cpp | 50 pollfd p = {buffer->event_fd(), POLLIN, 0}; in PollBufferEvent() local 51 return poll(&p, 1, timeout_ms); in PollBufferEvent() 57 std::unique_ptr<ProducerBuffer> p = ProducerBuffer::Create( in TEST_F() local 59 ASSERT_TRUE(p.get() != nullptr); in TEST_F() 61 ConsumerBuffer::Import(p->CreateConsumer()); in TEST_F() 69 EXPECT_EQ(p->client_state_mask(), kFirstClientBitMask); in TEST_F() 74 EXPECT_EQ(0, RETRY_EINTR(PollBufferEvent(p))); in TEST_F() 78 EXPECT_EQ(0, p->GainAsync()); in TEST_F() 79 EXPECT_EQ(0, p->Post(LocalHandle())); in TEST_F() 82 EXPECT_EQ(0, RETRY_EINTR(PollBufferEvent(p))); in TEST_F() [all …]
|
/frameworks/base/core/tests/coretests/src/android/graphics/ |
D | PaintTest.java | 124 Paint p = new Paint(); in testHasGlyph_variationSelectors() local 125 p.setTypeface(fontTypeface); in testHasGlyph_variationSelectors() 157 assertTrue(signature + " is expected to be true", p.hasGlyph(testString)); in testHasGlyph_variationSelectors() 159 assertFalse(signature + " is expected to be false", p.hasGlyph(testString)); in testHasGlyph_variationSelectors() 186 Paint p = new Paint(); in assertGetTextRunAdvances() local 192 final float advance = p.getTextRunAdvances(chars, start, count, in assertGetTextRunAdvances() 195 final float firstPartAdvance = p.getTextRunAdvances(chars, start, c, in assertGetTextRunAdvances() 197 final float secondPartAdvance = p.getTextRunAdvances(chars, start + c, count - c, in assertGetTextRunAdvances() 208 assertEquals(advance, p.measureText(str, start, end), 1.0f); in assertGetTextRunAdvances() 209 assertEquals(advance, p.getRunAdvance( in assertGetTextRunAdvances() [all …]
|
/frameworks/native/cmds/installd/ |
D | CacheItem.cpp | 33 CacheItem::CacheItem(FTSENT* p) { in CacheItem() argument 34 level = p->fts_level; in CacheItem() 35 directory = S_ISDIR(p->fts_statp->st_mode); in CacheItem() 36 size = p->fts_statp->st_blocks * 512; in CacheItem() 37 modified = p->fts_statp->st_mtime; in CacheItem() 39 mParent = static_cast<CacheItem*>(p->fts_parent->fts_pointer); in CacheItem() 43 mName = p->fts_name; in CacheItem() 48 mName = p->fts_path; in CacheItem() 74 FTSENT *p; in purge() local 80 while ((p = fts_read(fts)) != nullptr) { in purge() [all …]
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/ |
D | GlifPatternDrawable.java | 178 Path p = patternPaths[0] = new Path(); in renderOnCanvas() local 179 p.moveTo(1029.4f, 357.5f); in renderOnCanvas() 180 p.lineTo(1366f, 759.1f); in renderOnCanvas() 181 p.lineTo(1366f, 0f); in renderOnCanvas() 182 p.lineTo(1137.7f, 0f); in renderOnCanvas() 183 p.close(); in renderOnCanvas() 185 p = patternPaths[1] = new Path(); in renderOnCanvas() 186 p.moveTo(1138.1f, 0f); in renderOnCanvas() 187 p.rLineTo(-144.8f, 768f); in renderOnCanvas() 188 p.rLineTo(372.7f, 0f); in renderOnCanvas() [all …]
|
/frameworks/wilhelm/tests/sandbox/ |
D | multiplay.c | 95 Player *p = (Player *) context; in prefetch_callback() local 96 assert(p->mPlayerPrefetchStatus == caller); in prefetch_callback() 107 p->mPlayerErrorInCallback = SL_BOOLEAN_TRUE; in prefetch_callback() 178 Player *p; in main() local 186 p = &players[i]; in main() 192 result = (*engineEngine)->CreateAudioPlayer(engineEngine, &p->mPlayerObject, &audioSrc, in main() 195 result = (*p->mPlayerObject)->Realize(p->mPlayerObject, SL_BOOLEAN_FALSE); in main() 197 result = (*p->mPlayerObject)->GetInterface(p->mPlayerObject, SL_IID_PLAY, &p->mPlayerPlay); in main() 199 result = (*p->mPlayerObject)->GetInterface(p->mPlayerObject, SL_IID_VOLUME, in main() 200 &p->mPlayerVolume); in main() [all …]
|
/frameworks/base/tools/aapt2/xml/ |
D | XmlUtil_test.cpp | 30 Maybe<xml::ExtractedPackage> p = in TEST() local 32 ASSERT_TRUE(p); in TEST() 33 EXPECT_EQ(std::string("a"), p.value().package); in TEST() 34 EXPECT_FALSE(p.value().private_namespace); in TEST() 36 p = xml::ExtractPackageFromNamespace("http://schemas.android.com/apk/prv/res/android"); in TEST() 37 ASSERT_TRUE(p); in TEST() 38 EXPECT_EQ(std::string("android"), p.value().package); in TEST() 39 EXPECT_TRUE(p.value().private_namespace); in TEST() 41 p = xml::ExtractPackageFromNamespace("http://schemas.android.com/apk/prv/res/com.test"); in TEST() 42 ASSERT_TRUE(p); in TEST() [all …]
|
/frameworks/base/startop/iorap/src/com/google/android/startop/iorap/ |
D | AppLaunchEvent.java | 113 protected void writeToParcelImpl(Parcel p, int flags) { in writeToParcelImpl() argument 114 super.writeToParcelImpl(p, flags); in writeToParcelImpl() 115 IntentProtoParcelable.write(p, intent, flags); in writeToParcelImpl() 118 IntentStarted(Parcel p) { in IntentStarted() argument 119 super(p); in IntentStarted() 120 intent = IntentProtoParcelable.create(p); in IntentStarted() 137 IntentFailed(Parcel p) { in IntentFailed() argument 138 super(p); in IntentFailed() 170 protected void writeToParcelImpl(Parcel p, int flags) { in writeToParcelImpl() argument 171 super.writeToParcelImpl(p, flags); in writeToParcelImpl() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/ |
D | AccessibilityGestureDetectorTest.java | 74 testPath(p(-d, +0), AccessibilityService.GESTURE_SWIPE_LEFT); in testRecognizeGesturePath() 75 testPath(p(+d, +0), AccessibilityService.GESTURE_SWIPE_RIGHT); in testRecognizeGesturePath() 76 testPath(p(+0, -d), AccessibilityService.GESTURE_SWIPE_UP); in testRecognizeGesturePath() 77 testPath(p(+0, +d), AccessibilityService.GESTURE_SWIPE_DOWN); in testRecognizeGesturePath() 79 testPath(p(-d, +0), p((-d - d), +0), AccessibilityService.GESTURE_SWIPE_LEFT); in testRecognizeGesturePath() 80 testPath(p(-d, +0), p(+0, +0), AccessibilityService.GESTURE_SWIPE_LEFT_AND_RIGHT); in testRecognizeGesturePath() 81 testPath(p(-d, +0), p(-d, -d), AccessibilityService.GESTURE_SWIPE_LEFT_AND_UP); in testRecognizeGesturePath() 82 testPath(p(-d, +0), p(-d, +d), AccessibilityService.GESTURE_SWIPE_LEFT_AND_DOWN); in testRecognizeGesturePath() 84 testPath(p(+d, +0), p(+0, +0), AccessibilityService.GESTURE_SWIPE_RIGHT_AND_LEFT); in testRecognizeGesturePath() 85 testPath(p(+d, +0), p((+d + d), +0), AccessibilityService.GESTURE_SWIPE_RIGHT); in testRecognizeGesturePath() [all …]
|
/frameworks/base/tests/net/java/com/android/server/connectivity/ |
D | MetricsTestUtil.java | 30 static ConnectivityMetricsEvent ev(Parcelable p) { in ev() argument 33 ev.data = p; in ev() 38 Parcel p = Parcel.obtain(); in describeIpEvent() local 40 f.accept(p); in describeIpEvent() 42 p.setDataPosition(0); in describeIpEvent() 43 return ev(p.readParcelable(ClassLoader.getSystemClassLoader())); in describeIpEvent() 55 return (p) -> p.writeByte(b); in aByte() 59 return (p) -> p.writeInt(i); in anInt() 63 return (p) -> p.writeLong(l); in aLong() 67 return (p) -> p.writeString(s); in aString() [all …]
|
/frameworks/native/libs/vr/libdvr/include/dvr/ |
D | dvr_deleter.h | 46 void operator()(DvrBuffer* p) { dvrBufferDestroy(p); } in operator() 47 void operator()(DvrReadBuffer* p) { dvrReadBufferDestroy(p); } in operator() 48 void operator()(DvrWriteBuffer* p) { dvrWriteBufferDestroy(p); } in operator() 49 void operator()(DvrReadBufferQueue* p) { dvrReadBufferQueueDestroy(p); } in operator() 50 void operator()(DvrWriteBufferQueue* p) { dvrWriteBufferQueueDestroy(p); } in operator() 51 void operator()(DvrDisplayManager* p) { dvrDisplayManagerDestroy(p); } in operator() 52 void operator()(DvrSurfaceState* p) { dvrSurfaceStateDestroy(p); } in operator() 53 void operator()(DvrSurface* p) { dvrSurfaceDestroy(p); } in operator() 54 void operator()(DvrHwcClient* p) { dvrHwcClientDestroy(p); } in operator() 55 void operator()(DvrHwcFrame* p) { dvrHwcFrameDestroy(p); } in operator()
|
/frameworks/base/core/tests/coretests/src/android/text/ |
D | PackedIntVectorTest.java | 40 PackedIntVector p = new PackedIntVector(width); in testBasic() local 44 assertEquals(p.width(), width); in testBasic() 54 at = p.size() - i; in testBasic() 62 p.insertAt(at, null); in testBasic() 64 p.insertAt(at, ins); in testBasic() 67 assertEquals(p.size(), i + 1); in testBasic() 71 assertEquals(0, p.getValue(at, j)); in testBasic() 73 assertEquals(p.getValue(at, j), i + j); in testBasic() 82 p.setValue(i, j, i * j); in testBasic() 84 assertEquals(p.getValue(i, j), i * j); in testBasic() [all …]
|
/frameworks/base/services/net/java/android/net/shared/ |
D | IpConfigurationParcelableUtil.java | 38 final DhcpResultsParcelable p = new DhcpResultsParcelable(); in toStableParcelable() 39 p.baseConfiguration = results.toStaticIpConfiguration(); in toStableParcelable() 40 p.leaseDuration = results.leaseDuration; in toStableParcelable() 41 p.mtu = results.mtu; in toStableParcelable() 42 p.serverAddress = parcelAddress(results.serverAddress); in toStableParcelable() 43 p.vendorInfo = results.vendorInfo; in toStableParcelable() 44 p.serverHostName = results.serverHostName; in toStableParcelable() 45 return p; in toStableParcelable() 51 public static DhcpResults fromStableParcelable(@Nullable DhcpResultsParcelable p) { in fromStableParcelable() argument 52 if (p == null) return null; in fromStableParcelable() [all …]
|