Home
last modified time | relevance | path

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

12

/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/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsStateTest.java84 XmlSerializer serializer = Xml.newSerializer(); in testWriteReadNoCrash() local
85 serializer.setOutput(os, StandardCharsets.UTF_8.name()); in testWriteReadNoCrash()
86 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in testWriteReadNoCrash()
87 serializer.startDocument(null, true); in testWriteReadNoCrash()
90 checkWriteSingleSetting("char=0x" + Integer.toString(ch, 16), serializer, in testWriteReadNoCrash()
93 checkWriteSingleSetting(serializer, "k", ""); in testWriteReadNoCrash()
94 checkWriteSingleSetting(serializer, "x", "abc"); in testWriteReadNoCrash()
95 checkWriteSingleSetting(serializer, "abc", CRAZY_STRING); in testWriteReadNoCrash()
96 checkWriteSingleSetting(serializer, "def", null); in testWriteReadNoCrash()
99 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.java262 XmlSerializer serializer = new FastXmlSerializer(); in save() local
263 serializer.setOutput(new BufferedOutputStream(os), StandardCharsets.UTF_8.name()); in save()
264 saveToXml(serializer); in save()
265 serializer.flush(); in save()
311 private void saveToXml(XmlSerializer serializer) throws IOException { in saveToXml() argument
312 serializer.startDocument(null, true); in saveToXml()
313 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in saveToXml()
314 serializer.startTag(null, "input-manager-state"); in saveToXml()
315 serializer.startTag(null, "input-devices"); in saveToXml()
319 serializer.startTag(null, "input-device"); in saveToXml()
[all …]
/frameworks/base/services/core/java/com/android/server/display/
DPersistentDataStore.java218 XmlSerializer serializer = new FastXmlSerializer(); in save() local
219 serializer.setOutput(new BufferedOutputStream(os), StandardCharsets.UTF_8.name()); in save()
220 saveToXml(serializer); in save()
221 serializer.flush(); in save()
270 private void saveToXml(XmlSerializer serializer) throws IOException { in saveToXml() argument
271 serializer.startDocument(null, true); in saveToXml()
272 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in saveToXml()
273 serializer.startTag(null, "display-manager-state"); in saveToXml()
274 serializer.startTag(null, "remembered-wifi-displays"); in saveToXml()
276 serializer.startTag(null, "wifi-display"); in saveToXml()
[all …]
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/model/
DPrintSpoolerService.java879 XmlSerializer serializer = new FastXmlSerializer(); in doWriteStateLocked() local
880 serializer.setOutput(out, StandardCharsets.UTF_8.name()); in doWriteStateLocked()
881 serializer.startDocument(null, true); in doWriteStateLocked()
882 serializer.startTag(null, TAG_SPOOLER); in doWriteStateLocked()
894 serializer.startTag(null, TAG_JOB); in doWriteStateLocked()
896 serializer.attribute(null, ATTR_ID, printJob.getId().flattenToString()); in doWriteStateLocked()
897 serializer.attribute(null, ATTR_LABEL, printJob.getLabel().toString()); in doWriteStateLocked()
898 serializer.attribute(null, ATTR_STATE, String.valueOf(printJob.getState())); in doWriteStateLocked()
899 serializer.attribute(null, ATTR_APP_ID, String.valueOf(printJob.getAppId())); in doWriteStateLocked()
902 serializer.attribute(null, ATTR_TAG, tag); in doWriteStateLocked()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DSettings.java1781 void writePreferredActivitiesLPr(XmlSerializer serializer, int userId, boolean full) in writePreferredActivitiesLPr() argument
1783 serializer.startTag(null, "preferred-activities"); in writePreferredActivitiesLPr()
1787 serializer.startTag(null, TAG_ITEM); in writePreferredActivitiesLPr()
1788 pa.writeToXml(serializer, full); in writePreferredActivitiesLPr()
1789 serializer.endTag(null, TAG_ITEM); in writePreferredActivitiesLPr()
1792 serializer.endTag(null, "preferred-activities"); in writePreferredActivitiesLPr()
1795 void writePersistentPreferredActivitiesLPr(XmlSerializer serializer, int userId) in writePersistentPreferredActivitiesLPr() argument
1797 serializer.startTag(null, TAG_PERSISTENT_PREFERRED_ACTIVITIES); in writePersistentPreferredActivitiesLPr()
1801 serializer.startTag(null, TAG_ITEM); in writePersistentPreferredActivitiesLPr()
1802 ppa.writeToXml(serializer); in writePersistentPreferredActivitiesLPr()
[all …]
DKeySetManagerService.java639 void writeKeySetManagerServiceLPr(XmlSerializer serializer) throws IOException { in writeKeySetManagerServiceLPr() argument
640 serializer.startTag(null, "keyset-settings"); in writeKeySetManagerServiceLPr()
641 serializer.attribute(null, "version", Integer.toString(CURRENT_VERSION)); in writeKeySetManagerServiceLPr()
642 writePublicKeysLPr(serializer); in writeKeySetManagerServiceLPr()
643 writeKeySetsLPr(serializer); in writeKeySetManagerServiceLPr()
644 serializer.startTag(null, "lastIssuedKeyId"); in writeKeySetManagerServiceLPr()
645 serializer.attribute(null, "value", Long.toString(lastIssuedKeyId)); in writeKeySetManagerServiceLPr()
646 serializer.endTag(null, "lastIssuedKeyId"); in writeKeySetManagerServiceLPr()
647 serializer.startTag(null, "lastIssuedKeySetId"); in writeKeySetManagerServiceLPr()
648 serializer.attribute(null, "value", Long.toString(lastIssuedKeySetId)); in writeKeySetManagerServiceLPr()
[all …]
DPackageSignatures.java47 void writeXml(XmlSerializer serializer, String tagName, in writeXml() argument
52 serializer.startTag(null, tagName); in writeXml()
53 serializer.attribute(null, "count", in writeXml()
56 serializer.startTag(null, "cert"); in writeXml()
64 serializer.attribute(null, "index", Integer.toString(j)); in writeXml()
70 serializer.attribute(null, "index", Integer.toString(numPast)); in writeXml()
71 serializer.attribute(null, "key", sig.toCharsString()); in writeXml()
73 serializer.endTag(null, "cert"); in writeXml()
75 serializer.endTag(null, tagName); in writeXml()
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()
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()
DUserManagerService.java1827 final XmlSerializer serializer = new FastXmlSerializer(); in writeUserLP() local
1828 serializer.setOutput(bos, StandardCharsets.UTF_8.name()); in writeUserLP()
1829 serializer.startDocument(null, true); in writeUserLP()
1830 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in writeUserLP()
1833 serializer.startTag(null, TAG_USER); in writeUserLP()
1834 serializer.attribute(null, ATTR_ID, Integer.toString(userInfo.id)); in writeUserLP()
1835 serializer.attribute(null, ATTR_SERIAL_NO, Integer.toString(userInfo.serialNumber)); in writeUserLP()
1836 serializer.attribute(null, ATTR_FLAGS, Integer.toString(userInfo.flags)); in writeUserLP()
1837 serializer.attribute(null, ATTR_CREATION_TIME, Long.toString(userInfo.creationTime)); in writeUserLP()
1838 serializer.attribute(null, ATTR_LAST_LOGGED_IN_TIME, in writeUserLP()
[all …]
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()
DPreferredComponent.java178 public void writeToXml(XmlSerializer serializer, boolean full) throws IOException { in writeToXml() argument
180 serializer.attribute(null, ATTR_NAME, mShortComponent); in writeToXml()
183 serializer.attribute(null, ATTR_MATCH, Integer.toHexString(mMatch)); in writeToXml()
185 serializer.attribute(null, ATTR_ALWAYS, Boolean.toString(mAlways)); in writeToXml()
186 serializer.attribute(null, ATTR_SET, Integer.toString(NS)); in writeToXml()
188 serializer.startTag(null, TAG_SET); in writeToXml()
189 serializer.attribute(null, ATTR_NAME, mSetComponents[s]); in writeToXml()
190 serializer.endTag(null, TAG_SET); in writeToXml()
DEphemeralApplicationRegistry.java639 XmlSerializer serializer = Xml.newSerializer(); in writeUninstalledEphemeralAppMetadata() local
640 serializer.setOutput(out, StandardCharsets.UTF_8.name()); in writeUninstalledEphemeralAppMetadata()
641 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in writeUninstalledEphemeralAppMetadata()
643 serializer.startDocument(null, true); in writeUninstalledEphemeralAppMetadata()
645 serializer.startTag(null, TAG_PACKAGE); in writeUninstalledEphemeralAppMetadata()
646 serializer.attribute(null, ATTR_LABEL, ephemeralApp.loadLabel( in writeUninstalledEphemeralAppMetadata()
649 serializer.startTag(null, TAG_PERMS); in writeUninstalledEphemeralAppMetadata()
651 serializer.startTag(null, TAG_PERM); in writeUninstalledEphemeralAppMetadata()
652 serializer.attribute(null, ATTR_NAME, permission); in writeUninstalledEphemeralAppMetadata()
654 serializer.attribute(null, ATTR_GRANTED, String.valueOf(true)); in writeUninstalledEphemeralAppMetadata()
[all …]
DUserRestrictionsUtils.java164 public static void writeRestrictions(@NonNull XmlSerializer serializer, in writeRestrictions() argument
170 serializer.startTag(null, tag); in writeRestrictions()
177 serializer.attribute(null, key, "true"); in writeRestrictions()
183 serializer.endTag(null, tag); in writeRestrictions()
/frameworks/base/services/core/java/com/android/server/fingerprint/
DFingerprintsUserState.java174 XmlSerializer serializer = Xml.newSerializer(); in doWriteState() local
175 serializer.setOutput(out, "utf-8"); in doWriteState()
176 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in doWriteState()
177 serializer.startDocument(null, true); in doWriteState()
178 serializer.startTag(null, TAG_FINGERPRINTS); in doWriteState()
183 serializer.startTag(null, TAG_FINGERPRINT); in doWriteState()
184 serializer.attribute(null, ATTR_FINGER_ID, Integer.toString(fp.getFingerId())); in doWriteState()
185 serializer.attribute(null, ATTR_NAME, fp.getName().toString()); in doWriteState()
186 serializer.attribute(null, ATTR_GROUP_ID, Integer.toString(fp.getGroupId())); in doWriteState()
187 serializer.attribute(null, ATTR_DEVICE_ID, Long.toString(fp.getDeviceId())); in doWriteState()
[all …]
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DSettingsState.java387 XmlSerializer serializer = Xml.newSerializer(); in doWriteState() local
388 serializer.setOutput(out, StandardCharsets.UTF_8.name()); in doWriteState()
389 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in doWriteState()
390 serializer.startDocument(null, true); in doWriteState()
391 serializer.startTag(null, TAG_SETTINGS); in doWriteState()
392 serializer.attribute(null, ATTR_VERSION, String.valueOf(version)); in doWriteState()
398 writeSingleSetting(mVersion, serializer, setting.getId(), setting.getName(), in doWriteState()
406 serializer.endTag(null, TAG_SETTINGS); in doWriteState()
407 serializer.endDocument(); in doWriteState()
421 static void writeSingleSetting(int version, XmlSerializer serializer, String id, in writeSingleSetting() argument
[all …]
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbSettingsManager.java197 public void write(XmlSerializer serializer) throws IOException { in write() argument
198 serializer.startTag(null, "usb-device"); in write()
200 serializer.attribute(null, "vendor-id", Integer.toString(mVendorId)); in write()
203 serializer.attribute(null, "product-id", Integer.toString(mProductId)); in write()
206 serializer.attribute(null, "class", Integer.toString(mClass)); in write()
209 serializer.attribute(null, "subclass", Integer.toString(mSubclass)); in write()
212 serializer.attribute(null, "protocol", Integer.toString(mProtocol)); in write()
215 serializer.attribute(null, "manufacturer-name", mManufacturerName); in write()
218 serializer.attribute(null, "product-name", mProductName); in write()
221 serializer.attribute(null, "serial-number", mSerialNumber); in write()
[all …]
/frameworks/base/core/java/android/content/
DIntentFilter.java1528 public void writeToXml(XmlSerializer serializer) throws IOException { in writeToXml() argument
1531 serializer.attribute(null, AUTO_VERIFY_STR, Boolean.toString(true)); in writeToXml()
1536 serializer.startTag(null, ACTION_STR); in writeToXml()
1537 serializer.attribute(null, NAME_STR, mActions.get(i)); in writeToXml()
1538 serializer.endTag(null, ACTION_STR); in writeToXml()
1542 serializer.startTag(null, CAT_STR); in writeToXml()
1543 serializer.attribute(null, NAME_STR, mCategories.get(i)); in writeToXml()
1544 serializer.endTag(null, CAT_STR); in writeToXml()
1548 serializer.startTag(null, TYPE_STR); in writeToXml()
1551 serializer.attribute(null, NAME_STR, type); in writeToXml()
[all …]
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/
DFusedPrintersProvider.java1010 XmlSerializer serializer = new FastXmlSerializer(); in doWritePrinterHistory() local
1011 serializer.setOutput(out, StandardCharsets.UTF_8.name()); in doWritePrinterHistory()
1012 serializer.startDocument(null, true); in doWritePrinterHistory()
1013 serializer.startTag(null, TAG_PRINTERS); in doWritePrinterHistory()
1019 serializer.startTag(null, TAG_PRINTER); in doWritePrinterHistory()
1021 serializer.attribute(null, ATTR_NAME, printer.getName()); in doWritePrinterHistory()
1024 serializer.attribute(null, ATTR_DESCRIPTION, description); in doWritePrinterHistory()
1028 serializer.startTag(null, TAG_PRINTER_ID); in doWritePrinterHistory()
1029 serializer.attribute(null, ATTR_LOCAL_ID, printerId.getLocalId()); in doWritePrinterHistory()
1030 serializer.attribute(null, ATTR_SERVICE_NAME, printerId.getServiceName() in doWritePrinterHistory()
[all …]
/frameworks/base/core/java/android/content/pm/
DIntentFilterVerificationInfo.java173 public void writeToXml(XmlSerializer serializer) throws IOException { in writeToXml() argument
174 serializer.attribute(null, ATTR_PACKAGE_NAME, mPackageName); in writeToXml()
175 serializer.attribute(null, ATTR_STATUS, String.valueOf(mMainStatus)); in writeToXml()
177 serializer.startTag(null, TAG_DOMAIN); in writeToXml()
178 serializer.attribute(null, ATTR_DOMAIN_NAME, str); in writeToXml()
179 serializer.endTag(null, TAG_DOMAIN); in writeToXml()
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
DActivityChooserModel.java1050 XmlSerializer serializer = Xml.newSerializer(); in doInBackground() local
1053 serializer.setOutput(fos, null); in doInBackground()
1054 serializer.startDocument("UTF-8", true); in doInBackground()
1055 serializer.startTag(null, TAG_HISTORICAL_RECORDS); in doInBackground()
1060 serializer.startTag(null, TAG_HISTORICAL_RECORD); in doInBackground()
1061 serializer.attribute(null, ATTRIBUTE_ACTIVITY, in doInBackground()
1063 serializer.attribute(null, ATTRIBUTE_TIME, String.valueOf(record.time)); in doInBackground()
1064 serializer.attribute(null, ATTRIBUTE_WEIGHT, String.valueOf(record.weight)); in doInBackground()
1065 serializer.endTag(null, TAG_HISTORICAL_RECORD); in doInBackground()
1071 serializer.endTag(null, TAG_HISTORICAL_RECORDS); in doInBackground()
[all …]
/frameworks/base/core/java/android/widget/
DActivityChooserModel.java1074 XmlSerializer serializer = Xml.newSerializer(); in doInBackground() local
1077 serializer.setOutput(fos, null); in doInBackground()
1078 serializer.startDocument(StandardCharsets.UTF_8.name(), true); in doInBackground()
1079 serializer.startTag(null, TAG_HISTORICAL_RECORDS); in doInBackground()
1084 serializer.startTag(null, TAG_HISTORICAL_RECORD); in doInBackground()
1085 serializer.attribute(null, ATTRIBUTE_ACTIVITY, in doInBackground()
1087 serializer.attribute(null, ATTRIBUTE_TIME, String.valueOf(record.time)); in doInBackground()
1088 serializer.attribute(null, ATTRIBUTE_WEIGHT, String.valueOf(record.weight)); in doInBackground()
1089 serializer.endTag(null, TAG_HISTORICAL_RECORD); in doInBackground()
1095 serializer.endTag(null, TAG_HISTORICAL_RECORDS); in doInBackground()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DXmlUtils.java188 XmlSerializer serializer = new FastXmlSerializer(); in writeMapXml() local
189 serializer.setOutput(out, StandardCharsets.UTF_8.name()); in writeMapXml()
190 serializer.startDocument(null, true); in writeMapXml()
191 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in writeMapXml()
192 writeMapXml(val, null, serializer); in writeMapXml()
193 serializer.endDocument(); in writeMapXml()
211 XmlSerializer serializer = Xml.newSerializer(); in writeListXml() local
212 serializer.setOutput(out, StandardCharsets.UTF_8.name()); in writeListXml()
213 serializer.startDocument(null, true); in writeListXml()
214 serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); in writeListXml()
[all …]

12