Home
last modified time | relevance | path

Searched refs:baos (Results 1 – 25 of 48) sorted by relevance

12

/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DNotificationHistoryProtoHelperTest.java93 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testReadWriteNotifications() local
94 NotificationHistoryProtoHelper.write(baos, history, 1); in testReadWriteNotifications()
98 new BufferedInputStream(new ByteArrayInputStream(baos.toByteArray())), in testReadWriteNotifications()
119 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testReadWriteNotifications_stringFieldsPersistedEvenIfNoPool() local
120 NotificationHistoryProtoHelper.write(baos, history, 1); in testReadWriteNotifications_stringFieldsPersistedEvenIfNoPool()
124 new BufferedInputStream(new ByteArrayInputStream(baos.toByteArray())), in testReadWriteNotifications_stringFieldsPersistedEvenIfNoPool()
157 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testReadNotificationsWithPkgFilter() local
158 NotificationHistoryProtoHelper.write(baos, history, 1); in testReadNotificationsWithPkgFilter()
166 new BufferedInputStream(new ByteArrayInputStream(baos.toByteArray())), in testReadNotificationsWithPkgFilter()
199 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testReadNotificationsWithNumberFilter() local
[all …]
DZenModeConfigTest.java564 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testRuleXml_classic() local
565 writeRuleXml(rule, baos); in testRuleXml_classic()
566 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testRuleXml_classic()
624 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testRuleXml() local
625 writeRuleXml(rule, baos); in testRuleXml()
626 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testRuleXml()
669 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testRuleXml_weirdEffects() local
670 writeRuleXml(rule, baos); in testRuleXml_weirdEffects()
671 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testRuleXml_weirdEffects()
686 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testRuleXml_pkg_component() local
[all …]
DSnoozeHelperTest.java132 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testWriteXML_afterReading_noNPE() local
134 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in testWriteXML_afterReading_noNPE()
166 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testReadValidSnoozedFromCorrectly_timeDeadline() local
167 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in testReadValidSnoozedFromCorrectly_timeDeadline()
175 new ByteArrayInputStream(baos.toByteArray())), "utf-8"); in testReadValidSnoozedFromCorrectly_timeDeadline()
190 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testReadExpiredSnoozedNotification() local
191 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in testReadExpiredSnoozedNotification()
199 new ByteArrayInputStream(baos.toByteArray())), "utf-8"); in testReadExpiredSnoozedNotification()
258 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testLongTagPersistedNotification() local
259 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in testLongTagPersistedNotification()
[all …]
DPreferencesHelperTest.java389 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in writeXmlAndPurge() local
390 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in writeXmlAndPurge()
398 return baos; in writeXmlAndPurge()
536 ByteArrayOutputStream baos = writeXmlAndPurge(package10, uid10, true, 10); in testWriteXml_onlyBackupsTargetUser() local
543 loadStreamXml(baos, true, 0); in testWriteXml_onlyBackupsTargetUser()
544 loadStreamXml(baos, true, 10); in testWriteXml_onlyBackupsTargetUser()
567 ByteArrayOutputStream baos = writeXmlAndPurge(package0, uid0, true, 0); in testReadXml_onlyRestoresTargetUser() local
576 loadStreamXml(baos, true, 10); in testReadXml_onlyRestoresTargetUser()
616 ByteArrayOutputStream baos = writeXmlAndPurge(PKG_N_MR1, UID_N_MR1, false, in testChannelXml() local
622 loadStreamXml(baos, false, UserHandle.USER_ALL); in testChannelXml()
[all …]
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/
DPersistentDataStoreTest.java158 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testSetBrightness_brightnessTagWithNoUserId_updatesToBrightnessTagWithUserId() local
159 mInjector.setWriteStream(baos); in testSetBrightness_brightnessTagWithNoUserId_updatesToBrightnessTagWithUserId()
165 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testSetBrightness_brightnessTagWithNoUserId_updatesToBrightnessTagWithUserId()
300 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testStoreAndReloadOfDisplayBrightnessConfigurations() local
301 mInjector.setWriteStream(baos); in testStoreAndReloadOfDisplayBrightnessConfigurations()
307 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testStoreAndReloadOfDisplayBrightnessConfigurations()
362 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testStoreAndReloadOfBrightnessConfigurations() local
363 mInjector.setWriteStream(baos); in testStoreAndReloadOfBrightnessConfigurations()
370 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testStoreAndReloadOfBrightnessConfigurations()
416 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testStoreAndRestoreResolution() local
[all …]
/frameworks/base/core/tests/hosttests/test-apps/MultiDexLegacyTestAppWithCorruptedDex/src/com/android/framework/multidexlegacycorrupteddex/
DCorruptedDexTest.java59 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testSupressedExceptions()
60 PrintStream ps = new PrintStream(baos); in testSupressedExceptions()
64 + baos.toString(), in testSupressedExceptions()
65 baos.toString().contains("IOException")); in testSupressedExceptions()
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DXmlUtilsTest.java45 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in testMapWithNullKeys() local
49 XmlUtils.writeMapXml(map, baos); in testMapWithNullKeys()
51 InputStream mapInput = new ByteArrayInputStream(baos.toByteArray()); in testMapWithNullKeys()
61 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in testreadWriteXmlByteArrayValue() local
63 serializer.setOutput(baos, StandardCharsets.UTF_8.name()); in testreadWriteXmlByteArrayValue()
68 InputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testreadWriteXmlByteArrayValue()
DFastXmlSerializerTest.java82 try (final ByteArrayOutputStream baos = new ByteArrayOutputStream()) { in checkPreserved() argument
84 out.setOutput(baos, StandardCharsets.UTF_16.name()); in checkPreserved()
93 baos.flush(); in checkPreserved()
94 data = baos.toByteArray(); in checkPreserved()
105 try (final ByteArrayInputStream baos = new ByteArrayInputStream(data)) { in checkPreserved() argument
107 parser.setInput(baos, StandardCharsets.UTF_16.name()); in checkPreserved()
/frameworks/base/apct-tests/perftests/core/src/android/libcore/regression/
DSerializationPerfTest.java43 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in bytes() local
44 ObjectOutputStream out = new ObjectOutputStream(baos); in bytes()
47 return baos.toByteArray(); in bytes()
111 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in timeWriteNoObjects() local
112 ObjectOutputStream out = new ObjectOutputStream(baos); in timeWriteNoObjects()
116 baos.reset(); in timeWriteNoObjects()
134 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in writeSingleObject() local
135 ObjectOutputStream out = new ObjectOutputStream(baos); in writeSingleObject()
140 baos.reset(); in writeSingleObject()
/frameworks/base/identity/java/android/security/identity/
DUtil.java64 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in publicKeyEncodeUncompressedForm() local
65 baos.write(0x04); in publicKeyEncodeUncompressedForm()
84 baos.write(0x00); in publicKeyEncodeUncompressedForm()
86 baos.write(xBytes); in publicKeyEncodeUncompressedForm()
93 baos.write(0x00); in publicKeyEncodeUncompressedForm()
95 baos.write(yBytes); in publicKeyEncodeUncompressedForm()
96 return baos.toByteArray(); in publicKeyEncodeUncompressedForm()
/frameworks/base/tests/HierarchyViewerTest/src/com/android/test/hierarchyviewer/
DMainActivityTest.java32 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024 * 1024); in encode() local
34 Object encoder = createEncoder(baos); in encode()
38 return baos.toByteArray(); in encode()
52 private Object createEncoder(ByteArrayOutputStream baos) throws ClassNotFoundException, in createEncoder() argument
57 return constructor.newInstance(baos); in createEncoder()
/frameworks/base/core/tests/coretests/src/android/util/
DBase64Test.java456 ByteArrayOutputStream baos; in testOutputStream() local
464 baos = new ByteArrayOutputStream(); in testOutputStream()
465 b64os = new Base64OutputStream(baos, flags); in testOutputStream()
468 actual = baos.toByteArray(); in testOutputStream()
472 baos = new ByteArrayOutputStream(); in testOutputStream()
473 b64os = new Base64OutputStream(baos, flags); in testOutputStream()
478 actual = baos.toByteArray(); in testOutputStream()
483 baos = new ByteArrayOutputStream(); in testOutputStream()
484 b64os = new Base64OutputStream(baos, flags); in testOutputStream()
501 actual = baos.toByteArray(); in testOutputStream()
[all …]
/frameworks/base/services/core/java/com/android/server/backup/
DUsageStatsBackupHelper.java46 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getBackupPayload() local
47 DataOutputStream out = new DataOutputStream(baos); in getBackupPayload()
56 baos.reset(); in getBackupPayload()
58 return baos.toByteArray(); in getBackupPayload()
/frameworks/base/services/companion/java/com/android/server/companion/datatransfer/contextsync/
DBitmapUtils.java61 final ByteArrayOutputStream baos = new ByteArrayOutputStream(bitmap.getByteCount()); in renderBitmapToByteArray() local
62 bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos); in renderBitmapToByteArray()
63 return baos.toByteArray(); in renderBitmapToByteArray()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserManagerServiceUserInfoTest.java115 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testWriteReadUserInfo() local
116 DataOutputStream out = new DataOutputStream(baos); in testWriteReadUserInfo()
118 byte[] bytes = baos.toByteArray(); in testWriteReadUserInfo()
141 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testWriteReadDevicePolicyUserRestrictions() local
142 DataOutputStream out = new DataOutputStream(baos); in testWriteReadDevicePolicyUserRestrictions()
144 byte[] secondaryUserBytes = baos.toByteArray(); in testWriteReadDevicePolicyUserRestrictions()
145 baos.reset(); in testWriteReadDevicePolicyUserRestrictions()
151 mUserManagerService.writeUserLP(systemUserData, baos); in testWriteReadDevicePolicyUserRestrictions()
152 systemUserBytes = baos.toByteArray(); in testWriteReadDevicePolicyUserRestrictions()
337 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testUserRestrictionsUpgradeFromV9() local
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/graphics/fonts/
DPersistentSystemFontConfigTest.java57 try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { in testWriteRead() argument
58 PersistentSystemFontConfig.writeToXml(baos, config); in testWriteRead()
60 byte[] written = baos.toByteArray(); in testWriteRead()
/frameworks/opt/chips/src/com/android/ex/chips/
DDefaultPhotoManager.java112 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in fetchPhotoAsync()
116 baos.write(buffer, 0, size); in fetchPhotoAsync()
121 return baos.toByteArray(); in fetchPhotoAsync()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/
DPackageUtil.java202 ByteArrayOutputStream baos = null; in getBytesFromBitmap() local
204 baos = new ByteArrayOutputStream(); in getBytesFromBitmap()
205 bmp.compress(CompressFormat.PNG, 100, baos); in getBytesFromBitmap()
208 if (baos != null) { in getBytesFromBitmap()
209 baos.close(); in getBytesFromBitmap()
215 return baos.toByteArray(); in getBytesFromBitmap()
/frameworks/base/core/java/android/net/
DNetworkPolicy.java281 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getBytesForBackup() local
282 DataOutputStream out = new DataOutputStream(baos); in getBytesForBackup()
294 return baos.toByteArray(); in getBytesForBackup()
335 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getNetworkTemplateBytesForBackup() local
336 final DataOutputStream out = new DataOutputStream(baos); in getNetworkTemplateBytesForBackup()
348 return baos.toByteArray(); in getNetworkTemplateBytesForBackup()
/frameworks/base/services/people/java/com/android/server/people/data/
DUserData.java144 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getBackupPayload() local
145 DataOutputStream out = new DataOutputStream(baos); in getBackupPayload()
164 return baos.toByteArray(); in getBackupPayload()
/frameworks/base/core/java/android/content/pm/
DAppSearchShortcutPerson.java189 try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { in transformToByteArray() argument
190 icon.writeToStream(baos); in transformToByteArray()
191 return baos.toByteArray(); in transformToByteArray()
DArchivedActivityInfo.java139 try (ByteArrayOutputStream baos = new ByteArrayOutputStream( in bytesFromBitmap() argument
141 bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos); in bytesFromBitmap()
142 return baos.toByteArray(); in bytesFromBitmap()
/frameworks/base/core/tests/coretests/src/android/hardware/display/
DBrightnessConfigurationTest.java164 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testWriteReadXml() local
166 out.setOutput(baos, StandardCharsets.UTF_8.name()); in testWriteReadXml()
170 baos.flush(); in testWriteReadXml()
172 ByteArrayInputStream input = new ByteArrayInputStream(baos.toByteArray()); in testWriteReadXml()
/frameworks/base/telephony/java/com/android/internal/telephony/cdma/
DSmsMessage.java1013 ByteArrayOutputStream baos = new ByteArrayOutputStream(100);
1014 DataOutputStream dos = new DataOutputStream(baos);
1033 pdu.encodedMessage = baos.toByteArray();
1079 ByteArrayOutputStream baos = new ByteArrayOutputStream(100);
1080 DataOutputStream dos = new DataOutputStream(baos);
1099 pdu.encodedMessage = baos.toByteArray();
1116 ByteArrayOutputStream baos = new ByteArrayOutputStream(100);
1117 DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(baos));
1149 mPdu = baos.toByteArray();
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DAggregatedPowerStatsTest.java83 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in xmlPersistence() local
85 serializer.setOutput(baos, "UTF-8"); in xmlPersistence()
90 parser.setInput(new ByteArrayInputStream(baos.toByteArray()), "UTF-8"); in xmlPersistence()

12