/frameworks/base/core/tests/hosttests/test-apps/MultiDexLegacyTestAppWithCorruptedDex/src/com/android/framework/multidexlegacycorrupteddex/ |
D | CorruptedDexTest.java | 59 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/coretests/src/android/util/ |
D | Base64Test.java | 446 ByteArrayOutputStream baos; in testOutputStream() local 454 baos = new ByteArrayOutputStream(); in testOutputStream() 455 b64os = new Base64OutputStream(baos, flags); in testOutputStream() 458 actual = baos.toByteArray(); in testOutputStream() 462 baos = new ByteArrayOutputStream(); in testOutputStream() 463 b64os = new Base64OutputStream(baos, flags); in testOutputStream() 468 actual = baos.toByteArray(); in testOutputStream() 473 baos = new ByteArrayOutputStream(); in testOutputStream() 474 b64os = new Base64OutputStream(baos, flags); in testOutputStream() 491 actual = baos.toByteArray(); in testOutputStream() [all …]
|
/frameworks/base/tests/HierarchyViewerTest/src/com/android/test/hierarchyviewer/ |
D | MainActivityTest.java | 32 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/services/tests/uiservicestests/src/com/android/server/notification/ |
D | NotificationChannelTest.java | 74 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testEmptyVibration_noException() local 75 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in testEmptyVibration_noException() 85 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testBackupEmptySound() local 86 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in testBackupEmptySound() 91 new ByteArrayInputStream(baos.toByteArray())), null); in testBackupEmptySound()
|
D | ZenModeHelperTest.java | 167 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in writeXmlAndPurge() local 168 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in writeXmlAndPurge() 174 return baos; in writeXmlAndPurge() 180 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in writeXmlAndPurgeForUser() local 181 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in writeXmlAndPurgeForUser() 189 return baos; in writeXmlAndPurgeForUser() 192 private XmlPullParser getParserForByteStream(ByteArrayOutputStream baos) throws Exception { in getParserForByteStream() argument 195 new BufferedInputStream(new ByteArrayInputStream(baos.toByteArray())), null); in getParserForByteStream() 730 ByteArrayOutputStream baos = writeXmlAndPurge(null); in testWriteXml() local 731 XmlPullParser parser = getParserForByteStream(baos); in testWriteXml() [all …]
|
D | PreferencesHelperTest.java | 186 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in writeXmlAndPurge() local 187 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in writeXmlAndPurge() 195 return baos; in writeXmlAndPurge() 273 ByteArrayOutputStream baos = writeXmlAndPurge(package10, uid10, true, 10); in testWriteXml_onlyBackupsTargetUser() local 280 loadStreamXml(baos, true, 0); in testWriteXml_onlyBackupsTargetUser() 281 loadStreamXml(baos, true, 10); in testWriteXml_onlyBackupsTargetUser() 298 ByteArrayOutputStream baos = writeXmlAndPurge(package0, uid0, true, 0); in testReadXml_onlyRestoresTargetUser() local 307 loadStreamXml(baos, true, 10); in testReadXml_onlyRestoresTargetUser() 343 ByteArrayOutputStream baos = writeXmlAndPurge(PKG_N_MR1, UID_N_MR1, false, in testChannelXml() local 349 loadStreamXml(baos, false, UserHandle.USER_ALL); in testChannelXml() [all …]
|
D | ZenModeConfigTest.java | 173 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testRuleXml() local 174 out.setOutput(new BufferedOutputStream(baos), "utf-8"); in testRuleXml() 183 new ByteArrayInputStream(baos.toByteArray())), null); in testRuleXml()
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | FastXmlSerializerTest.java | 67 try (final ByteArrayOutputStream baos = new ByteArrayOutputStream()) { in checkPreserved() argument 69 out.setOutput(baos, StandardCharsets.UTF_16.name()); in checkPreserved() 78 baos.flush(); in checkPreserved() 79 data = baos.toByteArray(); in checkPreserved() 90 try (final ByteArrayInputStream baos = new ByteArrayInputStream(data)) { in checkPreserved() argument 92 parser.setInput(baos, StandardCharsets.UTF_16.name()); in checkPreserved()
|
D | XmlUtilsTest.java | 30 ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); in testMapWithNullKeys() local 34 XmlUtils.writeMapXml(map, baos); in testMapWithNullKeys() 36 InputStream mapInput = new ByteArrayInputStream(baos.toByteArray()); in testMapWithNullKeys()
|
/frameworks/base/core/java/com/android/server/backup/ |
D | UsageStatsBackupHelper.java | 38 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getBackupPayload() local 39 DataOutputStream out = new DataOutputStream(baos); in getBackupPayload() 45 baos.reset(); in getBackupPayload() 47 return baos.toByteArray(); in getBackupPayload()
|
/frameworks/base/services/core/java/com/android/server/timezone/ |
D | CheckToken.java | 46 ByteArrayOutputStream baos = new ByteArrayOutputStream(12 /* (3 * sizeof(int)) */); in toByteArray() local 47 try (DataOutputStream dos = new DataOutputStream(baos)) { in toByteArray() 54 return baos.toByteArray(); in toByteArray()
|
/frameworks/base/packages/StatementService/src/com/android/statementservice/retriever/ |
D | URLFetcher.java | 139 ByteArrayOutputStream baos = new ByteArrayOutputStream(length); in inputStreamToString() local 144 baos.write(buffer, 0, len); in inputStreamToString() 145 if (baos.size() > sizeLimit) { in inputStreamToString() 150 return baos.toString("UTF-8"); in inputStreamToString()
|
/frameworks/opt/chips/src/com/android/ex/chips/ |
D | DefaultPhotoManager.java | 112 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in fetchPhotoAsync() 116 baos.write(buffer, 0, size); in fetchPhotoAsync() 121 return baos.toByteArray(); in fetchPhotoAsync()
|
/frameworks/layoutlib/bridge/src/android/graphics/ |
D | NinePatch_Delegate.java | 77 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in serialize() local 80 oos = new ObjectOutputStream(baos); in serialize() 95 byte[] array = baos.toByteArray(); in serialize()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | UserManagerServiceUserInfoTest.java | 78 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testWriteReadUserInfo() local 79 DataOutputStream out = new DataOutputStream(baos); in testWriteReadUserInfo() 81 byte[] bytes = baos.toByteArray(); in testWriteReadUserInfo()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cdma/ |
D | CdmaServiceCategoryProgramHandler.java | 164 ByteArrayOutputStream baos = new ByteArrayOutputStream(100); 165 DataOutputStream dos = new DataOutputStream(baos); 185 mCi.sendCdmaSms(baos.toByteArray(), null);
|
/frameworks/base/services/tests/servicestests/src/com/android/server/display/ |
D | PersistentDataStoreTest.java | 157 final ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testStoreAndReloadOfBrightnessConfigurations() local 158 mInjector.setWriteStream(baos); in testStoreAndReloadOfBrightnessConfigurations() 164 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); in testStoreAndReloadOfBrightnessConfigurations()
|
D | AmbientBrightnessStatsTrackerTest.java | 333 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in testWriteThenReadAmbientBrightnessStats() local 334 statsTracker.writeStats(baos); in testWriteThenReadAmbientBrightnessStats() 335 baos.flush(); in testWriteThenReadAmbientBrightnessStats() 337 ByteArrayInputStream input = new ByteArrayInputStream(baos.toByteArray()); in testWriteThenReadAmbientBrightnessStats()
|
/frameworks/base/telephony/java/android/telephony/ |
D | UiccAccessRule.java | 72 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in encodeRules() local 73 DataOutputStream output = new DataOutputStream(baos); in encodeRules() 88 return baos.toByteArray(); in encodeRules()
|
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/common/ |
D | BitmapUtils.java | 242 ByteArrayOutputStream baos = new ByteArrayOutputStream(65536); in compressToBytes() local 243 bitmap.compress(CompressFormat.JPEG, quality, baos); in compressToBytes() 244 return baos.toByteArray(); in compressToBytes()
|
/frameworks/base/services/usage/java/com/android/server/usage/ |
D | UsageStatsDatabase.java | 931 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getBackupPayload() local 934 DataOutputStream out = new DataOutputStream(baos); in getBackupPayload() 970 if (DEBUG) Slog.i(TAG, "Written " + baos.size() + " bytes of data"); in getBackupPayload() 973 baos.reset(); in getBackupPayload() 976 return baos.toByteArray(); in getBackupPayload() 1097 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in serializeIntervalStats() local 1098 DataOutputStream out = new DataOutputStream(baos); in serializeIntervalStats() 1104 baos.reset(); in serializeIntervalStats() 1106 return baos.toByteArray(); in serializeIntervalStats()
|
/frameworks/base/core/java/android/net/ |
D | NetworkPolicy.java | 253 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getBytesForBackup() local 254 DataOutputStream out = new DataOutputStream(baos); in getBytesForBackup() 266 return baos.toByteArray(); in getBytesForBackup()
|
D | NetworkTemplate.java | 511 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getBytesForBackup() local 512 DataOutputStream out = new DataOutputStream(baos); in getBytesForBackup() 520 return baos.toByteArray(); in getBytesForBackup()
|
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
D | SettingsBackupAgent.java | 541 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getLockSettings() local 542 DataOutputStream out = new DataOutputStream(baos); in getLockSettings() 563 return baos.toByteArray(); in getLockSettings() 866 ByteArrayOutputStream baos = new ByteArrayOutputStream(); in getNetworkPolicies() local 868 DataOutputStream out = new DataOutputStream(baos); in getNetworkPolicies() 887 baos.reset(); in getNetworkPolicies() 890 return baos.toByteArray(); in getNetworkPolicies()
|
/frameworks/base/telephony/java/com/android/internal/telephony/cdma/ |
D | SmsMessage.java | 903 ByteArrayOutputStream baos = new ByteArrayOutputStream(100); in privateGetSubmitPdu() local 904 DataOutputStream dos = new DataOutputStream(baos); in privateGetSubmitPdu() 923 pdu.encodedMessage = baos.toByteArray(); in privateGetSubmitPdu() 940 ByteArrayOutputStream baos = new ByteArrayOutputStream(100); in createPdu() local 941 DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(baos)); in createPdu() 973 mPdu = baos.toByteArray(); in createPdu()
|