Home
last modified time | relevance | path

Searched refs:parcel (Results 1 – 25 of 268) sorted by relevance

1234567891011

/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0928/src/android/security/cts/CVE_2021_0928/
DAInjector.java33 Parcel parcel = Parcel.obtain(); in createClipData() local
38 parcel.writeString("android.content.ClipData"); in createClipData()
39 beginClipData(parcel); in createClipData()
41 parcel.writeInt(1); // Number of key-value pairs in createClipData()
42 parcel.writeInt(0); // Key in createClipData()
43 parcel.writeInt(VAL_SERIALIZABLE); // Value type in createClipData()
44 parcel.writeSerializable(injector); in createClipData()
45 finishClipData(parcel); in createClipData()
47 int a = parcel.dataPosition(); in createClipData()
48 parcel.writeInt(0); in createClipData()
[all …]
/cts/common/device-side/bedstead/queryable/src/main/java/com/android/queryable/util/
DParcelableUtils.java34 public static void writeNullableBoolean(Parcel parcel, Boolean b) { in writeNullableBoolean() argument
35 writeBoolean(parcel, b != null); in writeNullableBoolean()
37 writeBoolean(parcel, b); in writeNullableBoolean()
42 public static Boolean readNullableBoolean(Parcel parcel) { in readNullableBoolean() argument
43 if (!readBoolean(parcel)) { in readNullableBoolean()
46 return readBoolean(parcel); in readNullableBoolean()
50 public static void writeNullableInt(Parcel parcel, Integer integer) { in writeNullableInt() argument
51 writeBoolean(parcel, integer != null); in writeNullableInt()
53 parcel.writeInt(integer); in writeNullableInt()
58 public static Integer readNullableInt(Parcel parcel) { in readNullableInt() argument
[all …]
/cts/tests/tests/security/src/android/security/cts/
DAmbiguousBundlesTest.java90 private void writeContextBinder(Parcel parcel) { in test_android_CVE_2020_0082()
91 parcel.appendFrom(mContextBinder, 0, mContextBinderSize); in test_android_CVE_2020_0082()
130 Parcel parcel = Parcel.obtain(); in test_android_CVE_2020_0082()
132 int sizePosition = parcel.dataPosition(); in test_android_CVE_2020_0082()
133 parcel.writeInt(0); in test_android_CVE_2020_0082()
134 parcel.writeInt(BUNDLE_MAGIC); in test_android_CVE_2020_0082()
135 int startPosition = parcel.dataPosition(); in test_android_CVE_2020_0082()
136 parcel.writeInt(preReSerialize.size() + 2); in test_android_CVE_2020_0082()
138 parcel.writeString(key); in test_android_CVE_2020_0082()
139 parcel.writeInt(VAL_PARCELABLEARRAY); in test_android_CVE_2020_0082()
[all …]
DCVE_2022_20338.java49 Parcel parcel = Parcel.obtain(); in testPocCVE_2022_20338() local
50 parcel.writeInt(3 /* HierarchicalUri.TYPE_ID */); in testPocCVE_2022_20338()
51 parcel.writeByteArray((context.getString(R.string.cve_2022_20338_scheme)).getBytes()); in testPocCVE_2022_20338()
52 parcel.writeInt(representation); in testPocCVE_2022_20338()
53 parcel.writeByteArray( in testPocCVE_2022_20338()
55 parcel.writeInt(representation); in testPocCVE_2022_20338()
56 parcel.writeByteArray((context.getString(R.string.cve_2022_20338_path)).getBytes()); in testPocCVE_2022_20338()
57 parcel.writeInt(representation); in testPocCVE_2022_20338()
58 parcel.writeByteArray(null /* query */); in testPocCVE_2022_20338()
59 parcel.writeInt(representation); in testPocCVE_2022_20338()
[all …]
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0685/src/android/security/cts/CVE_2021_0685/
DPocAmbiguator.java66 Parcel parcel = Parcel.obtain(); in make() local
68 int sizePosition = parcel.dataPosition(); in make()
69 parcel.writeInt(0); in make()
70 parcel.writeInt(BUNDLE_MAGIC); in make()
71 int startPosition = parcel.dataPosition(); in make()
73 parcel.writeInt(preReSerialize.size() + 1); in make()
75 parcel.writeString(key); in make()
76 parcel.writeInt(VAL_OBJECTARRAY); in make()
77 parcel.writeInt(3); in make()
79 parcel.writeInt(VAL_PARCELABLE); in make()
[all …]
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/
DAdvertiseDataTest.java65 Parcel parcel = Parcel.obtain(); in emptyData() local
67 data.writeToParcel(parcel, 0); in emptyData()
68 parcel.setDataPosition(0); in emptyData()
70 AdvertiseData.CREATOR.createFromParcel(parcel); in emptyData()
83 Parcel parcel = Parcel.obtain(); in emptyServiceUuid() local
85 data.writeToParcel(parcel, 0); in emptyServiceUuid()
86 parcel.setDataPosition(0); in emptyServiceUuid()
88 AdvertiseData.CREATOR.createFromParcel(parcel); in emptyServiceUuid()
98 Parcel parcel = Parcel.obtain(); in emptyManufacturerData() local
104 data.writeToParcel(parcel, 0); in emptyManufacturerData()
[all …]
DTransportDiscoveryDataTest.java58 Parcel parcel = Parcel.obtain(); in initList() local
63 data.writeToParcel(parcel, 0); in initList()
64 parcel.setDataPosition(0); in initList()
66 TransportDiscoveryData.CREATOR.createFromParcel(parcel); in initList()
74 Parcel parcel = Parcel.obtain(); in initByteArray() local
77 data.writeToParcel(parcel, 0); in initByteArray()
78 parcel.setDataPosition(0); in initByteArray()
80 TransportDiscoveryData.CREATOR.createFromParcel(parcel); in initByteArray()
88 Parcel parcel = Parcel.obtain(); in getValues() local
91 data.writeToParcel(parcel, 0); in getValues()
[all …]
DTransportBlockTest.java58 Parcel parcel = Parcel.obtain(); in init() local
61 data.writeToParcel(parcel, 0); in init()
62 parcel.setDataPosition(0); in init()
64 TransportBlock.CREATOR.createFromParcel(parcel); in init()
72 Parcel parcel = Parcel.obtain(); in initEmpty() local
74 data.writeToParcel(parcel, 0); in initEmpty()
75 parcel.setDataPosition(0); in initEmpty()
77 TransportBlock.CREATOR.createFromParcel(parcel); in initEmpty()
85 Parcel parcel = Parcel.obtain(); in totalBytes() local
88 data.writeToParcel(parcel, 0); in totalBytes()
[all …]
/cts/tests/smartspace/src/android/smartspace/cts/
DSmartspaceSessionIdTest.java52 Parcel parcel = Parcel.obtain(); in testCreateSmartspaceSessionId() local
53 parcel.setDataPosition(0); in testCreateSmartspaceSessionId()
54 parcel.writeString("id"); in testCreateSmartspaceSessionId()
55 parcel.writeTypedObject(Process.myUserHandle(), 0); in testCreateSmartspaceSessionId()
56 parcel.setDataPosition(0); in testCreateSmartspaceSessionId()
57 SmartspaceSessionId sessionId = SmartspaceSessionId.CREATOR.createFromParcel(parcel); in testCreateSmartspaceSessionId()
58 parcel.recycle(); in testCreateSmartspaceSessionId()
63 parcel = Parcel.obtain(); in testCreateSmartspaceSessionId()
64 parcel.setDataPosition(0); in testCreateSmartspaceSessionId()
65 sessionId.writeToParcel(parcel, 0); in testCreateSmartspaceSessionId()
[all …]
DTextTest.java47 Parcel parcel = Parcel.obtain(); in testCreateText_defaultValues() local
48 parcel.setDataPosition(0); in testCreateText_defaultValues()
49 text.writeToParcel(parcel, 0); in testCreateText_defaultValues()
50 parcel.setDataPosition(0); in testCreateText_defaultValues()
51 Text copyText = Text.CREATOR.createFromParcel(parcel); in testCreateText_defaultValues()
53 parcel.recycle(); in testCreateText_defaultValues()
65 Parcel parcel = Parcel.obtain(); in testCreateText_marqueeTrunctAtType_maxLinesTwo() local
66 parcel.setDataPosition(0); in testCreateText_marqueeTrunctAtType_maxLinesTwo()
67 text.writeToParcel(parcel, 0); in testCreateText_marqueeTrunctAtType_maxLinesTwo()
68 parcel.setDataPosition(0); in testCreateText_marqueeTrunctAtType_maxLinesTwo()
[all …]
DSubItemLoggingInfoTest.java47 Parcel parcel = Parcel.obtain(); in testCreateSubItemLoggingInfo() local
48 parcel.setDataPosition(0); in testCreateSubItemLoggingInfo()
49 itemLoggingInfo.writeToParcel(parcel, 0); in testCreateSubItemLoggingInfo()
50 parcel.setDataPosition(0); in testCreateSubItemLoggingInfo()
52 parcel); in testCreateSubItemLoggingInfo()
54 parcel.recycle(); in testCreateSubItemLoggingInfo()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DParcelUtils.java31 final Parcel parcel = Parcel.obtain(); in toBytes() local
32 parcel.writeParcelable(p, 0); in toBytes()
33 byte[] data = parcel.marshall(); in toBytes()
34 parcel.recycle(); in toBytes()
43 final Parcel parcel = Parcel.obtain(); in fromBytes() local
44 parcel.unmarshall(data, 0, data.length); in fromBytes()
45 parcel.setDataPosition(0); in fromBytes()
46 T ret = parcel.readParcelable(ParcelUtils.class.getClassLoader()); in fromBytes()
47 parcel.recycle(); in fromBytes()
/cts/tests/contextualsearch/src/android/contextualsearch/cts/
DContextualSearchStateTest.kt56 val parcel = Parcel.obtain() in <lambda>() constant
57 parcel.setDataPosition(0) in <lambda>()
58 testState.writeToParcel(parcel, 0) in <lambda>()
60 parcel.setDataPosition(0) in <lambda>()
61 val copyState = ContextualSearchState.CREATOR.createFromParcel(parcel) in <lambda>()
78 val parcel = Parcel.obtain() in <lambda>() constant
79 parcel.setDataPosition(0) in <lambda>()
80 parcel.writeInt(0) // mTaskId in <lambda>()
81 testComponentName.writeToParcel(parcel, 0) in <lambda>()
82 parcel.writeInt(1) // mIsHomeActivity in <lambda>()
[all …]
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-2136/
Dpoc.cpp23 Parcel parcel; in main() local
24 parcel.writeInt32(Status::EX_HAS_REPLY_HEADER); in main()
31 parcel.writeInt32(INT32_MAX - sizeof(int32_t)); in main()
32 parcel.setDataPosition(0); in main()
34 status.readFromParcel(parcel); in main()
39 parcel.writeInt32(0); in main()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2023-21276/
Dpoc.cpp43 Parcel* parcel = &parcelObj; in main() local
55 window->writeToParcel(parcel); in main()
59 parcel->setDataPosition(0); in main()
63 FAIL_CHECK(parcel->readString8().string() == kEmptyString); in main()
64 FAIL_CHECK(parcel->readUint32(&window->mNumRows) == kSize); in main()
65 FAIL_CHECK(parcel->readUint32(&window->mNumColumns) == kSize); in main()
66 size_t compactSize = parcel->readUint32(); /* value is different with and without fix */ in main()
67 parcel->readBool(); in main()
70 const void* dest = parcel->readInplace(compactSize); in main()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DAdminPermissionControlParamsTest.java53 Parcel parcel = Parcel.obtain(); in correctParcelingAndUnparceling() local
54 params.writeToParcel(parcel, 0); in correctParcelingAndUnparceling()
55 parcel.setDataPosition(0); in correctParcelingAndUnparceling()
57 AdminPermissionControlParams.CREATOR.createFromParcel(parcel); in correctParcelingAndUnparceling()
68 Parcel parcel = Parcel.obtain(); in createViaParcel() local
69 parcel.writeString(packageName); in createViaParcel()
70 parcel.writeString(permission); in createViaParcel()
71 parcel.writeInt(grantState); in createViaParcel()
72 parcel.writeBoolean(canAdminGrant); in createViaParcel()
73 parcel.setDataPosition(0); in createViaParcel()
[all …]
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DPhoneCapabilityTest.java44 Parcel parcel = Parcel.obtain(); in parcelReadWrite() local
45 parcel.writeInt(maxActiveVoice); in parcelReadWrite()
46 parcel.writeInt(maxActiveData); in parcelReadWrite()
47 parcel.writeBoolean(false); in parcelReadWrite()
48 parcel.writeList(logicalModemList); in parcelReadWrite()
49 parcel.writeIntArray(deviceNrCapabilities); in parcelReadWrite()
51 parcel.setDataPosition(0); in parcelReadWrite()
52 PhoneCapability toCompare = PhoneCapability.CREATOR.createFromParcel(parcel); in parcelReadWrite()
DTrafficDescriptorTest.java111 Parcel parcel = Parcel.obtain(); in testParcel() local
112 td.writeToParcel(parcel, 0); in testParcel()
113 parcel.setDataPosition(0); in testParcel()
115 TrafficDescriptor parcelTd = TrafficDescriptor.CREATOR.createFromParcel(parcel); in testParcel()
117 parcel.recycle(); in testParcel()
121 parcel = Parcel.obtain(); in testParcel()
122 td.writeToParcel(parcel, 0); in testParcel()
123 parcel.setDataPosition(0); in testParcel()
125 parcelTd = TrafficDescriptor.CREATOR.createFromParcel(parcel); in testParcel()
127 parcel.recycle(); in testParcel()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/utils/
DParcelTest.java49 Parcel parcel = Parcel.obtain(); in parcelAndUnparcel() local
51 parcel.writeParcelable(obj, /* flags= */ 0); in parcelAndUnparcel()
53 int parcelSize = parcel.dataPosition(); in parcelAndUnparcel()
54 parcel.setDataPosition(0); in parcelAndUnparcel()
56 T newInstance = parcel.readParcelable(ParcelTest.class.getClassLoader()); in parcelAndUnparcel()
57 assertThat(parcel.dataPosition()).isEqualTo(parcelSize); in parcelAndUnparcel()
60 parcel.recycle(); in parcelAndUnparcel()
/cts/tests/tests/soundtrigger/src/android/soundtrigger/cts/
DSoundTriggerTest.java140 Parcel parcel = Parcel.obtain(); in testKeyphraseParcelUnparcel() local
141 keyphraseSrc.writeToParcel(parcel, 0); in testKeyphraseParcelUnparcel()
143 parcel.setDataPosition(0); in testKeyphraseParcelUnparcel()
144 SoundTrigger.Keyphrase keyphraseResult = SoundTrigger.Keyphrase.readFromParcel(parcel); in testKeyphraseParcelUnparcel()
148 parcel.setDataPosition(0); in testKeyphraseParcelUnparcel()
149 keyphraseResult = SoundTrigger.Keyphrase.CREATOR.createFromParcel(parcel); in testKeyphraseParcelUnparcel()
158 Parcel parcel = Parcel.obtain(); in testKeyphraseSoundModelParcelUnparcel() local
159 keyphraseSoundModelSrc.writeToParcel(parcel, 0); in testKeyphraseSoundModelParcelUnparcel()
161 parcel.setDataPosition(0); in testKeyphraseSoundModelParcelUnparcel()
163 SoundTrigger.KeyphraseSoundModel.readFromParcel(parcel); in testKeyphraseSoundModelParcelUnparcel()
[all …]
/cts/tests/tests/sharesheet/src/android/service/chooser/
DChooserResultTest.kt50 val parcel = Parcel.obtain() in testShortcut() constant
52 testSubject.writeToParcel(parcel, testSubject.describeContents()) in testShortcut()
53 parcel.setDataPosition(0) in testShortcut()
54 val result = ChooserResult.CREATOR.createFromParcel(parcel) in testShortcut()
68 val parcel = Parcel.obtain() in testAction() constant
70 testSubject.writeToParcel(parcel, testSubject.describeContents()) in testAction()
71 parcel.setDataPosition(0) in testAction()
72 val result = ChooserResult.CREATOR.createFromParcel(parcel) in testAction()
/cts/tests/tests/hardware/src/android/hardware/cts/
DHardwareBufferTest.java47 private static native HardwareBuffer nativeReadHardwareBuffer(Parcel parcel); in nativeReadHardwareBuffer() argument
48 private static native void nativeWriteHardwareBuffer(HardwareBuffer buffer, Parcel parcel); in nativeWriteHardwareBuffer() argument
228 Parcel parcel = Parcel.obtain(); in testWriteJavaReadNativeParcel() local
235 assertEquals(0, parcel.dataPosition()); in testWriteJavaReadNativeParcel()
236 assertEquals(0, parcel.dataAvail()); in testWriteJavaReadNativeParcel()
237 inBuffer.writeToParcel(parcel, 0); in testWriteJavaReadNativeParcel()
238 assertNotEquals(0, parcel.dataPosition()); in testWriteJavaReadNativeParcel()
239 parcel.setDataPosition(0); in testWriteJavaReadNativeParcel()
240 HardwareBuffer outBuffer = nativeReadHardwareBuffer(parcel); in testWriteJavaReadNativeParcel()
247 parcel.recycle(); in testWriteJavaReadNativeParcel()
[all …]
/cts/tests/tests/text/src/android/text/style/cts/
DSuggestionRangeSpanTest.java47 Parcel parcel = null; in testSerializationDeserialization() local
50 parcel = Parcel.obtain(); in testSerializationDeserialization()
51 original.writeToParcel(parcel, 0); in testSerializationDeserialization()
52 parcel.setDataPosition(0); in testSerializationDeserialization()
53 clone = SuggestionRangeSpan.CREATOR.createFromParcel(parcel); in testSerializationDeserialization()
55 if (parcel != null) { in testSerializationDeserialization()
56 parcel.recycle(); in testSerializationDeserialization()
/cts/tests/tests/accounts/src/android/accounts/cts/
DAccountTest.java50 Parcel parcel = Parcel.obtain(); in testWriteToParcel() local
51 parcel.setDataPosition(0); in testWriteToParcel()
52 account.writeToParcel(parcel, 0); in testWriteToParcel()
54 parcel.setDataPosition(0); in testWriteToParcel()
57 Account newAccount = new Account(parcel); in testWriteToParcel()
60 parcel.recycle(); in testWriteToParcel()
/cts/tests/tests/graphics/src/android/graphics/cts/
DANativeWindowTest.java253 Parcel parcel = Parcel.obtain(); in testWriteToParcel() local
254 assertEquals(0, parcel.dataPosition()); in testWriteToParcel()
255 assertEquals(0, parcel.dataAvail()); in testWriteToParcel()
256 nWriteToParcel(reader.getSurface(), parcel); in testWriteToParcel() local
257 assertNotEquals(0, parcel.dataPosition()); in testWriteToParcel()
258 parcel.setDataPosition(0); in testWriteToParcel()
259 final Surface outSurface = Surface.CREATOR.createFromParcel(parcel); in testWriteToParcel()
260 parcel.recycle(); in testWriteToParcel()
271 Parcel parcel = Parcel.obtain(); in testReadFromParcel() local
272 assertEquals(0, parcel.dataPosition()); in testReadFromParcel()
[all …]

1234567891011