Home
last modified time | relevance | path

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

123

/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/
DAccessibilityNodeInfoDumper.java83 XmlSerializer serializer = Xml.newSerializer(); in dumpWindowToFile() local
85 serializer.setOutput(stringWriter); in dumpWindowToFile()
86 serializer.startDocument("UTF-8", true); in dumpWindowToFile()
87 serializer.startTag("", "hierarchy"); in dumpWindowToFile()
88 serializer.attribute("", "rotation", Integer.toString(rotation)); in dumpWindowToFile()
89 dumpNodeRec(root, serializer, 0, width, height); in dumpWindowToFile()
90 serializer.endTag("", "hierarchy"); in dumpWindowToFile()
91 serializer.endDocument(); in dumpWindowToFile()
101 private static void dumpNodeRec(AccessibilityNodeInfo node, XmlSerializer serializer,int index, in dumpNodeRec() argument
103 serializer.startTag("", "node"); in dumpNodeRec()
[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/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsStateTest.java83 XmlSerializer serializer = Xml.newSerializer(); in testWriteReadNoCrash() local
84 serializer.setOutput(os, StandardCharsets.UTF_8.name()); in testWriteReadNoCrash()
85 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in testWriteReadNoCrash()
86 serializer.startDocument(null, true); in testWriteReadNoCrash()
89 checkWriteSingleSetting("char=0x" + Integer.toString(ch, 16), serializer, in testWriteReadNoCrash()
92 checkWriteSingleSetting(serializer, "k", ""); in testWriteReadNoCrash()
93 checkWriteSingleSetting(serializer, "x", "abc"); in testWriteReadNoCrash()
94 checkWriteSingleSetting(serializer, "abc", CRAZY_STRING); in testWriteReadNoCrash()
95 checkWriteSingleSetting(serializer, "def", null); in testWriteReadNoCrash()
98 checkWriteSingleSetting(serializer, null, null); in testWriteReadNoCrash()
[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/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/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/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/
DSettings.java1806 void writePreferredActivitiesLPr(XmlSerializer serializer, int userId, boolean full) in writePreferredActivitiesLPr() argument
1808 serializer.startTag(null, "preferred-activities"); in writePreferredActivitiesLPr()
1812 serializer.startTag(null, TAG_ITEM); in writePreferredActivitiesLPr()
1813 pa.writeToXml(serializer, full); in writePreferredActivitiesLPr()
1814 serializer.endTag(null, TAG_ITEM); in writePreferredActivitiesLPr()
1817 serializer.endTag(null, "preferred-activities"); in writePreferredActivitiesLPr()
1820 void writePersistentPreferredActivitiesLPr(XmlSerializer serializer, int userId) in writePersistentPreferredActivitiesLPr() argument
1822 serializer.startTag(null, TAG_PERSISTENT_PREFERRED_ACTIVITIES); in writePersistentPreferredActivitiesLPr()
1826 serializer.startTag(null, TAG_ITEM); in writePersistentPreferredActivitiesLPr()
1827 ppa.writeToXml(serializer); in writePersistentPreferredActivitiesLPr()
[all …]
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.java676 void writeKeySetManagerServiceLPr(XmlSerializer serializer) throws IOException { in writeKeySetManagerServiceLPr() argument
677 serializer.startTag(null, "keyset-settings"); in writeKeySetManagerServiceLPr()
678 serializer.attribute(null, "version", Integer.toString(CURRENT_VERSION)); in writeKeySetManagerServiceLPr()
679 writePublicKeysLPr(serializer); in writeKeySetManagerServiceLPr()
680 writeKeySetsLPr(serializer); in writeKeySetManagerServiceLPr()
681 serializer.startTag(null, "lastIssuedKeyId"); in writeKeySetManagerServiceLPr()
682 serializer.attribute(null, "value", Long.toString(lastIssuedKeyId)); in writeKeySetManagerServiceLPr()
683 serializer.endTag(null, "lastIssuedKeyId"); in writeKeySetManagerServiceLPr()
684 serializer.startTag(null, "lastIssuedKeySetId"); in writeKeySetManagerServiceLPr()
685 serializer.attribute(null, "value", Long.toString(lastIssuedKeySetId)); in writeKeySetManagerServiceLPr()
[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()
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()
DPersistentPreferredActivity.java84 public void writeToXml(XmlSerializer serializer) throws IOException { in writeToXml() argument
85 serializer.attribute(null, ATTR_NAME, mComponent.flattenToShortString()); in writeToXml()
86 serializer.startTag(null, ATTR_FILTER); in writeToXml()
87 super.writeToXml(serializer); in writeToXml()
88 serializer.endTag(null, ATTR_FILTER); in writeToXml()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DTransferOwnershipMetadataManager.java86 final XmlSerializer serializer = new FastXmlSerializer(); in saveMetadataFile() local
87 serializer.setOutput(stream, StandardCharsets.UTF_8.name()); in saveMetadataFile()
88 serializer.startDocument(null, true); in saveMetadataFile()
89 insertSimpleTag(serializer, TAG_USER_ID, Integer.toString(params.userId)); in saveMetadataFile()
90 insertSimpleTag(serializer, in saveMetadataFile()
92 insertSimpleTag(serializer, in saveMetadataFile()
94 insertSimpleTag(serializer, TAG_ADMIN_TYPE, params.adminType); in saveMetadataFile()
95 serializer.endDocument(); in saveMetadataFile()
107 private void insertSimpleTag(XmlSerializer serializer, String tagName, String value) in insertSimpleTag() argument
109 serializer.startTag(null, tagName); in insertSimpleTag()
[all …]
/frameworks/base/services/core/java/com/android/server/role/
DRoleUserState.java387 XmlSerializer serializer = Xml.newSerializer(); in writeFile() local
388 serializer.setOutput(out, StandardCharsets.UTF_8.name()); in writeFile()
389 serializer.setFeature( in writeFile()
391 serializer.startDocument(null, true); in writeFile()
393 serializeRoles(serializer, version, packagesHash, roles); in writeFile()
395 serializer.endDocument(); in writeFile()
409 private void serializeRoles(@NonNull XmlSerializer serializer, int version, in serializeRoles() argument
412 serializer.startTag(null, TAG_ROLES); in serializeRoles()
414 serializer.attribute(null, ATTRIBUTE_VERSION, Integer.toString(version)); in serializeRoles()
417 serializer.attribute(null, ATTRIBUTE_PACKAGES_HASH, packagesHash); in serializeRoles()
[all …]
/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/java/android/hardware/display/
DBrightnessConfiguration.java242 public void saveToXml(@NonNull XmlSerializer serializer) throws IOException { in saveToXml() argument
243 serializer.startTag(null, TAG_BRIGHTNESS_CURVE); in saveToXml()
245 serializer.attribute(null, ATTR_DESCRIPTION, mDescription); in saveToXml()
248 serializer.startTag(null, TAG_BRIGHTNESS_POINT); in saveToXml()
249 serializer.attribute(null, ATTR_LUX, Float.toString(mLux[i])); in saveToXml()
250 serializer.attribute(null, ATTR_NITS, Float.toString(mNits[i])); in saveToXml()
251 serializer.endTag(null, TAG_BRIGHTNESS_POINT); in saveToXml()
253 serializer.endTag(null, TAG_BRIGHTNESS_CURVE); in saveToXml()
254 serializer.startTag(null, TAG_BRIGHTNESS_CORRECTIONS); in saveToXml()
259 serializer.startTag(null, TAG_BRIGHTNESS_CORRECTION); in saveToXml()
[all …]
DBrightnessCorrection.java157 public void saveToXml(XmlSerializer serializer) throws IOException { in saveToXml() argument
158 mImplementation.saveToXml(serializer); in saveToXml()
198 void saveToXml(XmlSerializer serializer) throws IOException; in saveToXml() argument
267 public void saveToXml(XmlSerializer serializer) throws IOException { in saveToXml() argument
268 serializer.startTag(null, TAG_SCALE_AND_TRANSLATE_LOG); in saveToXml()
269 serializer.attribute(null, ATTR_SCALE, Float.toString(mScale)); in saveToXml()
270 serializer.attribute(null, ATTR_TRANSLATE, Float.toString(mTranslate)); in saveToXml()
271 serializer.endTag(null, TAG_SCALE_AND_TRANSLATE_LOG); in saveToXml()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DNotificationChannelTest.java73 XmlSerializer serializer = new FastXmlSerializer(); in testEmptyVibration_noException() local
75 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in testEmptyVibration_noException()
76 channel.writeXml(serializer); in testEmptyVibration_noException()
84 XmlSerializer serializer = new FastXmlSerializer(); in testBackupEmptySound() local
86 serializer.setOutput(new BufferedOutputStream(baos), "utf-8"); in testBackupEmptySound()
87 channel.writeXmlForBackup(serializer, getContext()); in testBackupEmptySound()
/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 …]
/frameworks/base/core/java/android/hardware/usb/
DDeviceFilter.java138 public void write(XmlSerializer serializer) throws IOException { in write() argument
139 serializer.startTag(null, "usb-device"); in write()
141 serializer.attribute(null, "vendor-id", Integer.toString(mVendorId)); in write()
144 serializer.attribute(null, "product-id", Integer.toString(mProductId)); in write()
147 serializer.attribute(null, "class", Integer.toString(mClass)); in write()
150 serializer.attribute(null, "subclass", Integer.toString(mSubclass)); in write()
153 serializer.attribute(null, "protocol", Integer.toString(mProtocol)); in write()
156 serializer.attribute(null, "manufacturer-name", mManufacturerName); in write()
159 serializer.attribute(null, "product-name", mProductName); in write()
162 serializer.attribute(null, "serial-number", mSerialNumber); in write()
[all …]
DAccessoryFilter.java81 public void write(XmlSerializer serializer)throws IOException { in write() argument
82 serializer.startTag(null, "usb-accessory"); in write()
84 serializer.attribute(null, "manufacturer", mManufacturer); in write()
87 serializer.attribute(null, "model", mModel); in write()
90 serializer.attribute(null, "version", mVersion); in write()
92 serializer.endTag(null, "usb-accessory"); in write()

123