Home
last modified time | relevance | path

Searched refs:serializer (Results 1 – 25 of 72) sorted by relevance

123

/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/
DAccessibilityNodeInfoDumper.java90 XmlSerializer serializer = Xml.newSerializer(); in dumpWindowToFile() local
92 serializer.setOutput(stringWriter); in dumpWindowToFile()
93 serializer.startDocument("UTF-8", true); in dumpWindowToFile()
94 serializer.startTag("", "hierarchy"); in dumpWindowToFile()
95 serializer.attribute("", "rotation", Integer.toString(rotation)); in dumpWindowToFile()
96 dumpNodeRec(root, serializer, 0, width, height); in dumpWindowToFile()
97 serializer.endTag("", "hierarchy"); in dumpWindowToFile()
98 serializer.endDocument(); in dumpWindowToFile()
123 XmlSerializer serializer = Xml.newSerializer(); in dumpWindowsToFile() local
125 serializer.setOutput(stringWriter); in dumpWindowsToFile()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/storage/
DBubbleXmlHelper.kt47 val serializer: XmlSerializer = FastXmlSerializer() in <lambda>() constant
48 serializer.setOutput(stream, StandardCharsets.UTF_8.name()) in <lambda>()
49 serializer.startDocument(null, true) in <lambda>()
50 serializer.startTag(null, TAG_BUBBLES) in <lambda>()
51 serializer.attribute(null, ATTR_VERSION, CURRENT_VERSION.toString()) in <lambda>()
52 bubbles.forEach { b -> writeXmlEntry(serializer, b) } in <lambda>()
53 serializer.endTag(null, TAG_BUBBLES) in <lambda>()
54 serializer.endDocument() in <lambda>()
63 private fun writeXmlEntry(serializer: XmlSerializer, bubble: BubbleEntity) { in writeXmlEntry()
65 serializer.startTag(null, TAG_BUBBLE) in writeXmlEntry()
[all …]
/frameworks/base/services/core/java/com/android/server/display/
DPersistentDataStore.java346 XmlSerializer serializer = new FastXmlSerializer(); in save() local
347 serializer.setOutput(new BufferedOutputStream(os), StandardCharsets.UTF_8.name()); in save()
348 saveToXml(serializer); in save()
349 serializer.flush(); in save()
424 private void saveToXml(XmlSerializer serializer) throws IOException { in saveToXml() argument
425 serializer.startDocument(null, true); in saveToXml()
426 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in saveToXml()
427 serializer.startTag(null, TAG_DISPLAY_MANAGER_STATE); in saveToXml()
428 serializer.startTag(null, TAG_REMEMBERED_WIFI_DISPLAYS); in saveToXml()
430 serializer.startTag(null, TAG_WIFI_DISPLAY); in saveToXml()
[all …]
/frameworks/base/apex/permission/service/java/com/android/permission/persistence/
DRuntimePermissionsPersistenceImpl.java183 XmlSerializer serializer = Xml.newSerializer(); in writeForUser() local
184 serializer.setOutput(outputStream, StandardCharsets.UTF_8.name()); in writeForUser()
185 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in writeForUser()
186 serializer.startDocument(null, true); in writeForUser()
188 serializeRuntimePermissions(serializer, runtimePermissions); in writeForUser()
190 serializer.endDocument(); in writeForUser()
201 private static void serializeRuntimePermissions(@NonNull XmlSerializer serializer, in serializeRuntimePermissions() argument
203 serializer.startTag(null, TAG_RUNTIME_PERMISSIONS); in serializeRuntimePermissions()
206 serializer.attribute(null, ATTRIBUTE_VERSION, Integer.toString(version)); in serializeRuntimePermissions()
209 serializer.attribute(null, ATTRIBUTE_FINGERPRINT, fingerprint); in serializeRuntimePermissions()
[all …]
/frameworks/base/apex/permission/service/java/com/android/role/persistence/
DRolesPersistenceImpl.java156 XmlSerializer serializer = Xml.newSerializer(); in writeForUser() local
157 serializer.setOutput(outputStream, StandardCharsets.UTF_8.name()); in writeForUser()
158 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in writeForUser()
159 serializer.startDocument(null, true); in writeForUser()
161 serializeRoles(serializer, roles); in writeForUser()
163 serializer.endDocument(); in writeForUser()
174 private static void serializeRoles(@NonNull XmlSerializer serializer, in serializeRoles() argument
176 serializer.startTag(null, TAG_ROLES); in serializeRoles()
179 serializer.attribute(null, ATTRIBUTE_VERSION, Integer.toString(version)); in serializeRoles()
182 serializer.attribute(null, ATTRIBUTE_PACKAGES_HASH, packagesHash); in serializeRoles()
[all …]
/frameworks/base/services/core/java/com/android/server/tv/
DPersistentDataStore.java203 XmlSerializer serializer = new FastXmlSerializer(); in save() local
204 serializer.setOutput(new BufferedOutputStream(os), StandardCharsets.UTF_8.name()); in save()
205 saveToXml(serializer); in save()
206 serializer.flush(); in save()
274 private void saveToXml(XmlSerializer serializer) throws IOException { in saveToXml() argument
275 serializer.startDocument(null, true); in saveToXml()
276 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in saveToXml()
277 serializer.startTag(null, TAG_TV_INPUT_MANAGER_STATE); in saveToXml()
278 serializer.startTag(null, TAG_BLOCKED_RATINGS); in saveToXml()
281 serializer.startTag(null, TAG_RATING); in saveToXml()
[all …]
/frameworks/base/services/core/java/com/android/server/input/
DPersistentDataStore.java239 XmlSerializer serializer = new FastXmlSerializer(); in save() local
240 serializer.setOutput(new BufferedOutputStream(os), StandardCharsets.UTF_8.name()); in save()
241 saveToXml(serializer); in save()
242 serializer.flush(); in save()
288 private void saveToXml(XmlSerializer serializer) throws IOException { in saveToXml() argument
289 serializer.startDocument(null, true); in saveToXml()
290 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in saveToXml()
291 serializer.startTag(null, "input-manager-state"); in saveToXml()
292 serializer.startTag(null, "input-devices"); in saveToXml()
296 serializer.startTag(null, "input-device"); in saveToXml()
[all …]
/frameworks/base/services/core/java/com/android/server/biometrics/fingerprint/
DFingerprintUserState.java108 XmlSerializer serializer = Xml.newSerializer(); in doWriteState() local
109 serializer.setOutput(out, "utf-8"); in doWriteState()
110 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in doWriteState()
111 serializer.startDocument(null, true); in doWriteState()
112 serializer.startTag(null, TAG_FINGERPRINTS); in doWriteState()
117 serializer.startTag(null, TAG_FINGERPRINT); in doWriteState()
118 serializer.attribute(null, ATTR_FINGER_ID, Integer.toString(fp.getBiometricId())); in doWriteState()
119 serializer.attribute(null, ATTR_NAME, fp.getName().toString()); in doWriteState()
120 serializer.attribute(null, ATTR_GROUP_ID, Integer.toString(fp.getGroupId())); in doWriteState()
121 serializer.attribute(null, ATTR_DEVICE_ID, Long.toString(fp.getDeviceId())); in doWriteState()
[all …]
/frameworks/base/services/core/java/com/android/server/biometrics/face/
DFaceUserState.java107 XmlSerializer serializer = Xml.newSerializer(); in doWriteState() local
108 serializer.setOutput(out, "utf-8"); in doWriteState()
109 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in doWriteState()
110 serializer.startDocument(null, true); in doWriteState()
111 serializer.startTag(null, TAG_FACES); in doWriteState()
116 serializer.startTag(null, TAG_FACE); in doWriteState()
117 serializer.attribute(null, ATTR_FACE_ID, Integer.toString(f.getBiometricId())); in doWriteState()
118 serializer.attribute(null, ATTR_NAME, f.getName().toString()); in doWriteState()
119 serializer.attribute(null, ATTR_DEVICE_ID, Long.toString(f.getDeviceId())); in doWriteState()
120 serializer.endTag(null, TAG_FACE); in doWriteState()
[all …]
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsStateTest.java96 XmlSerializer serializer = Xml.newSerializer(); in testWriteReadNoCrash() local
97 serializer.setOutput(os, StandardCharsets.UTF_8.name()); in testWriteReadNoCrash()
98 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in testWriteReadNoCrash()
99 serializer.startDocument(null, true); in testWriteReadNoCrash()
102 checkWriteSingleSetting("char=0x" + Integer.toString(ch, 16), serializer, in testWriteReadNoCrash()
105 checkWriteSingleSetting(serializer, "k", ""); in testWriteReadNoCrash()
106 checkWriteSingleSetting(serializer, "x", "abc"); in testWriteReadNoCrash()
107 checkWriteSingleSetting(serializer, "abc", CRAZY_STRING); in testWriteReadNoCrash()
108 checkWriteSingleSetting(serializer, "def", null); in testWriteReadNoCrash()
111 checkWriteSingleSetting(serializer, null, null); in testWriteReadNoCrash()
[all …]
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/
DEventResultPersister.java240 XmlSerializer serializer = Xml.newSerializer(); in writeState() local
241 serializer.setOutput(stream, StandardCharsets.UTF_8.name()); in writeState()
242 serializer.startDocument(null, true); in writeState()
243 serializer.setFeature( in writeState()
245 serializer.startTag(null, "results"); in writeState()
246 serializer.attribute(null, "counter", Integer.toString(counter)); in writeState()
250 serializer.startTag(null, "result"); in writeState()
251 serializer.attribute(null, "id", in writeState()
253 serializer.attribute(null, "status", in writeState()
255 serializer.attribute(null, "legacyStatus", in writeState()
[all …]
/frameworks/base/services/core/java/com/android/server/
DSensorPrivacyService.java104 XmlSerializer serializer = new FastXmlSerializer(); in setSensorPrivacy() local
106 serializer.setOutput(outputStream, StandardCharsets.UTF_8.name()); in setSensorPrivacy()
107 serializer.startDocument(null, true); in setSensorPrivacy()
108 serializer.startTag(null, XML_TAG_SENSOR_PRIVACY); in setSensorPrivacy()
109 serializer.attribute(null, XML_ATTRIBUTE_ENABLED, String.valueOf(enable)); in setSensorPrivacy()
110 serializer.endTag(null, XML_TAG_SENSOR_PRIVACY); in setSensorPrivacy()
111 serializer.endDocument(); in setSensorPrivacy()
179 XmlSerializer serializer = new FastXmlSerializer(); in persistSensorPrivacyState() local
181 serializer.setOutput(outputStream, StandardCharsets.UTF_8.name()); in persistSensorPrivacyState()
182 serializer.startDocument(null, true); in persistSensorPrivacyState()
[all …]
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/model/
DPrintSpoolerService.java924 XmlSerializer serializer = new FastXmlSerializer(); in doWriteStateLocked() local
925 serializer.setOutput(out, StandardCharsets.UTF_8.name()); in doWriteStateLocked()
926 serializer.startDocument(null, true); in doWriteStateLocked()
927 serializer.startTag(null, TAG_SPOOLER); in doWriteStateLocked()
939 serializer.startTag(null, TAG_JOB); in doWriteStateLocked()
941 serializer.attribute(null, ATTR_ID, printJob.getId().flattenToString()); in doWriteStateLocked()
942 serializer.attribute(null, ATTR_LABEL, printJob.getLabel().toString()); in doWriteStateLocked()
943 serializer.attribute(null, ATTR_STATE, String.valueOf(printJob.getState())); in doWriteStateLocked()
944 serializer.attribute(null, ATTR_APP_ID, String.valueOf(printJob.getAppId())); in doWriteStateLocked()
947 serializer.attribute(null, ATTR_TAG, tag); in doWriteStateLocked()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DPackageSignatures.java55 void writeXml(XmlSerializer serializer, String tagName, in writeXml() argument
60 serializer.startTag(null, tagName); in writeXml()
61 serializer.attribute(null, "count", Integer.toString(mSigningDetails.signatures.length)); in writeXml()
62 serializer.attribute(null, "schemeVersion", in writeXml()
64 writeCertsListXml(serializer, writtenSignatures, mSigningDetails.signatures, false); in writeXml()
68 serializer.startTag(null, "pastSigs"); in writeXml()
69 serializer.attribute(null, "count", in writeXml()
71 writeCertsListXml(serializer, writtenSignatures, in writeXml()
73 serializer.endTag(null, "pastSigs"); in writeXml()
75 serializer.endTag(null, tagName); in writeXml()
[all …]
DKeySetManagerService.java674 void writeKeySetManagerServiceLPr(XmlSerializer serializer) throws IOException { in writeKeySetManagerServiceLPr() argument
675 serializer.startTag(null, "keyset-settings"); in writeKeySetManagerServiceLPr()
676 serializer.attribute(null, "version", Integer.toString(CURRENT_VERSION)); in writeKeySetManagerServiceLPr()
677 writePublicKeysLPr(serializer); in writeKeySetManagerServiceLPr()
678 writeKeySetsLPr(serializer); in writeKeySetManagerServiceLPr()
679 serializer.startTag(null, "lastIssuedKeyId"); in writeKeySetManagerServiceLPr()
680 serializer.attribute(null, "value", Long.toString(lastIssuedKeyId)); in writeKeySetManagerServiceLPr()
681 serializer.endTag(null, "lastIssuedKeyId"); in writeKeySetManagerServiceLPr()
682 serializer.startTag(null, "lastIssuedKeySetId"); in writeKeySetManagerServiceLPr()
683 serializer.attribute(null, "value", Long.toString(lastIssuedKeySetId)); in writeKeySetManagerServiceLPr()
[all …]
DSettings.java1880 void writePreferredActivitiesLPr(XmlSerializer serializer, int userId, boolean full) in writePreferredActivitiesLPr() argument
1882 serializer.startTag(null, "preferred-activities"); in writePreferredActivitiesLPr()
1886 serializer.startTag(null, TAG_ITEM); in writePreferredActivitiesLPr()
1887 pa.writeToXml(serializer, full); in writePreferredActivitiesLPr()
1888 serializer.endTag(null, TAG_ITEM); in writePreferredActivitiesLPr()
1891 serializer.endTag(null, "preferred-activities"); in writePreferredActivitiesLPr()
1894 void writePersistentPreferredActivitiesLPr(XmlSerializer serializer, int userId) in writePersistentPreferredActivitiesLPr() argument
1896 serializer.startTag(null, TAG_PERSISTENT_PREFERRED_ACTIVITIES); in writePersistentPreferredActivitiesLPr()
1900 serializer.startTag(null, TAG_ITEM); in writePersistentPreferredActivitiesLPr()
1901 ppa.writeToXml(serializer); in writePersistentPreferredActivitiesLPr()
[all …]
DPreferredActivity.java48 public void writeToXml(XmlSerializer serializer, boolean full) throws IOException { in writeToXml() argument
49 mPref.writeToXml(serializer, full); in writeToXml()
50 serializer.startTag(null, "filter"); in writeToXml()
51 super.writeToXml(serializer); in writeToXml()
52 serializer.endTag(null, "filter"); in writeToXml()
DPersistentPreferredActivity.java89 public void writeToXml(XmlSerializer serializer) throws IOException { in writeToXml() argument
90 serializer.attribute(null, ATTR_NAME, mComponent.flattenToShortString()); in writeToXml()
91 serializer.attribute(null, ATTR_SET_BY_DPM, Boolean.toString(mIsSetByDpm)); in writeToXml()
92 serializer.startTag(null, ATTR_FILTER); in writeToXml()
93 super.writeToXml(serializer); in writeToXml()
94 serializer.endTag(null, ATTR_FILTER); in writeToXml()
DCrossProfileIntentFilter.java121 public void writeToXml(XmlSerializer serializer) throws IOException { in writeToXml() argument
122 serializer.attribute(null, ATTR_TARGET_USER_ID, Integer.toString(mTargetUserId)); in writeToXml()
123 serializer.attribute(null, ATTR_FLAGS, Integer.toString(mFlags)); in writeToXml()
124 serializer.attribute(null, ATTR_OWNER_PACKAGE, mOwnerPackage); in writeToXml()
125 serializer.startTag(null, ATTR_FILTER); in writeToXml()
126 super.writeToXml(serializer); in writeToXml()
127 serializer.endTag(null, ATTR_FILTER); in writeToXml()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DTransferOwnershipMetadataManager.java87 final XmlSerializer serializer = new FastXmlSerializer(); in saveMetadataFile() local
88 serializer.setOutput(stream, StandardCharsets.UTF_8.name()); in saveMetadataFile()
89 serializer.startDocument(null, true); in saveMetadataFile()
90 insertSimpleTag(serializer, TAG_USER_ID, Integer.toString(params.userId)); in saveMetadataFile()
91 insertSimpleTag(serializer, in saveMetadataFile()
93 insertSimpleTag(serializer, in saveMetadataFile()
95 insertSimpleTag(serializer, TAG_ADMIN_TYPE, params.adminType); in saveMetadataFile()
96 serializer.endDocument(); in saveMetadataFile()
108 private void insertSimpleTag(XmlSerializer serializer, String tagName, String value) in insertSimpleTag() argument
110 serializer.startTag(null, tagName); in insertSimpleTag()
[all …]
/frameworks/base/core/java/android/hardware/display/
DBrightnessConfiguration.java348 public void saveToXml(@NonNull XmlSerializer serializer) throws IOException { in saveToXml() argument
349 serializer.startTag(null, TAG_BRIGHTNESS_CURVE); in saveToXml()
351 serializer.attribute(null, ATTR_DESCRIPTION, mDescription); in saveToXml()
354 serializer.startTag(null, TAG_BRIGHTNESS_POINT); in saveToXml()
355 serializer.attribute(null, ATTR_LUX, Float.toString(mLux[i])); in saveToXml()
356 serializer.attribute(null, ATTR_NITS, Float.toString(mNits[i])); in saveToXml()
357 serializer.endTag(null, TAG_BRIGHTNESS_POINT); in saveToXml()
359 serializer.endTag(null, TAG_BRIGHTNESS_CURVE); in saveToXml()
361 serializer.startTag(null, TAG_BRIGHTNESS_CORRECTIONS); in saveToXml()
366 serializer.startTag(null, TAG_BRIGHTNESS_CORRECTION); in saveToXml()
[all …]
DBrightnessCorrection.java158 public void saveToXml(XmlSerializer serializer) throws IOException { in saveToXml() argument
159 mImplementation.saveToXml(serializer); in saveToXml()
199 void saveToXml(XmlSerializer serializer) throws IOException; in saveToXml() argument
268 public void saveToXml(XmlSerializer serializer) throws IOException { in saveToXml() argument
269 serializer.startTag(null, TAG_SCALE_AND_TRANSLATE_LOG); in saveToXml()
270 serializer.attribute(null, ATTR_SCALE, Float.toString(mScale)); in saveToXml()
271 serializer.attribute(null, ATTR_TRANSLATE, Float.toString(mTranslate)); in saveToXml()
272 serializer.endTag(null, TAG_SCALE_AND_TRANSLATE_LOG); in saveToXml()
/frameworks/base/services/core/java/com/android/server/accounts/
DAccountManagerBackupHelper.java166 final XmlSerializer serializer = new FastXmlSerializer(); in backupAccountAccessPermissions() local
167 serializer.setOutput(dataStream, StandardCharsets.UTF_8.name()); in backupAccountAccessPermissions()
168 serializer.startDocument(null, true); in backupAccountAccessPermissions()
169 serializer.startTag(null, TAG_PERMISSIONS); in backupAccountAccessPermissions()
195 serializer.startTag(null, TAG_PERMISSION); in backupAccountAccessPermissions()
196 serializer.attribute(null, ATTR_ACCOUNT_SHA_256, in backupAccountAccessPermissions()
198 serializer.attribute(null, ATTR_PACKAGE, packageName); in backupAccountAccessPermissions()
199 serializer.attribute(null, ATTR_DIGEST, digest); in backupAccountAccessPermissions()
200 serializer.endTag(null, TAG_PERMISSION); in backupAccountAccessPermissions()
204 serializer.endTag(null, TAG_PERMISSIONS); in backupAccountAccessPermissions()
[all …]
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DXmlUtilsTest.java55 XmlSerializer serializer = new FastXmlSerializer(); in testreadWriteXmlByteArrayValue() local
56 serializer.setOutput(baos, StandardCharsets.UTF_8.name()); in testreadWriteXmlByteArrayValue()
57 serializer.startDocument(null, true); in testreadWriteXmlByteArrayValue()
58 XmlUtils.writeValueXml(testByteArray, "testByteArray", serializer); in testreadWriteXmlByteArrayValue()
59 serializer.endDocument(); in testreadWriteXmlByteArrayValue()
/frameworks/base/services/core/java/com/android/server/timezone/
DPackageStatusStorage.java318 XmlSerializer serializer = new FastXmlSerializer(); in writePackageStatusLocked() local
319 serializer.setOutput(fos, StandardCharsets.UTF_8.name()); in writePackageStatusLocked()
320 serializer.startDocument(null /* encoding */, true /* standalone */); in writePackageStatusLocked()
322 serializer.startTag(namespace, TAG_PACKAGE_STATUS); in writePackageStatusLocked()
324 serializer.attribute(namespace, ATTRIBUTE_CHECK_STATUS, statusAttributeValue); in writePackageStatusLocked()
325 serializer.attribute(namespace, ATTRIBUTE_OPTIMISTIC_LOCK_ID, in writePackageStatusLocked()
329 serializer.attribute(namespace, ATTRIBUTE_UPDATE_APP_VERSION, in writePackageStatusLocked()
333 serializer.attribute(namespace, ATTRIBUTE_DATA_APP_VERSION, in writePackageStatusLocked()
335 serializer.endTag(namespace, TAG_PACKAGE_STATUS); in writePackageStatusLocked()
336 serializer.endDocument(); in writePackageStatusLocked()
[all …]

123