Source:
private void writeUserListLocked ( ) { java.io.FileOutputStream fos = null ; android.util.AtomicFile userListFile = new android.util.AtomicFile ( mUserListFile ) ; try { fos = userListFile.startWrite ( ) ; final java.io.BufferedOutputStream bos = new java.io.BufferedOutputStream ( fos ) ; final org.xmlpull.v1.XmlSerializer serializer = new com.android.internal.util.FastXmlSerializer ( ) ; serializer.setOutput ( bos , "utf-8" ) ; serializer.startDocument ( null , true ) ; serializer.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; serializer.startTag ( null , com.android.server.pm.UserManagerService.TAG_USERS ) ; serializer.attribute ( null , com.android.server.pm.UserManagerService.ATTR_NEXT_SERIAL_NO , java.lang.Integer.toString ( mNextSerialNumber ) ) ; serializer.attribute ( null , com.android.server.pm.UserManagerService.ATTR_USER_VERSION , java.lang.Integer.toString ( mUserVersion ) ) ; serializer.startTag ( null , com.android.server.pm.UserManagerService.TAG_GUEST_RESTRICTIONS ) ; writeRestrictionsLocked ( serializer , mGuestRestrictions ) ; serializer.endTag ( null , com.android.server.pm.UserManagerService.TAG_GUEST_RESTRICTIONS ) ; for ( int i = 0 ; i < ( mUsers.size ( ) ) ; i ++ ) { android.content.pm.UserInfo user = mUsers.valueAt ( i ) ; serializer.startTag ( null , com.android.server.pm.UserManagerService.TAG_USER ) ; serializer.attribute ( null , com.android.server.pm.UserManagerService.ATTR_ID , java.lang.Integer.toString ( user.id ) ) ; serializer.endTag ( null , com.android.server.pm.UserManagerService.TAG_USER ) ; } serializer.endTag ( null , com.android.server.pm.UserManagerService.TAG_USERS ) ; serializer.endDocument ( ) ; userListFile.finishWrite ( fos ) ; } catch ( java.lang.Exception e ) { userListFile.failWrite ( fos ) ; android.util.Slog.e ( com.android.server.pm.UserManagerService.LOG_TAG , "Error writing user list" ) ; } }

Target:
private void writeUserListLocked ( ) { java.io.FileOutputStream fos = null ; android.util.AtomicFile userListFile = new android.util.AtomicFile ( mUserListFile ) ; try { fos = userListFile.startWrite ( ) ; final java.io.BufferedOutputStream bos = new java.io.BufferedOutputStream ( fos ) ; final org.xmlpull.v1.XmlSerializer serializer = new com.android.internal.util.FastXmlSerializer ( ) ; serializer.setOutput ( bos , java.nio.charset.StandardCharsets.UTF_8.name ( ) ) ; serializer.startDocument ( null , true ) ; serializer.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; serializer.startTag ( null , com.android.server.pm.UserManagerService.TAG_USERS ) ; serializer.attribute ( null , com.android.server.pm.UserManagerService.ATTR_NEXT_SERIAL_NO , java.lang.Integer.toString ( mNextSerialNumber ) ) ; serializer.attribute ( null , com.android.server.pm.UserManagerService.ATTR_USER_VERSION , java.lang.Integer.toString ( mUserVersion ) ) ; serializer.startTag ( null , com.android.server.pm.UserManagerService.TAG_GUEST_RESTRICTIONS ) ; writeRestrictionsLocked ( serializer , mGuestRestrictions ) ; serializer.endTag ( null , com.android.server.pm.UserManagerService.TAG_GUEST_RESTRICTIONS ) ; for ( int i = 0 ; i < ( mUsers.size ( ) ) ; i ++ ) { android.content.pm.UserInfo user = mUsers.valueAt ( i ) ; serializer.startTag ( null , com.android.server.pm.UserManagerService.TAG_USER ) ; serializer.attribute ( null , com.android.server.pm.UserManagerService.ATTR_ID , java.lang.Integer.toString ( user.id ) ) ; serializer.endTag ( null , com.android.server.pm.UserManagerService.TAG_USER ) ; } serializer.endTag ( null , com.android.server.pm.UserManagerService.TAG_USERS ) ; serializer.endDocument ( ) ; userListFile.finishWrite ( fos ) ; } catch ( java.lang.Exception e ) { userListFile.failWrite ( fos ) ; android.util.Slog.e ( com.android.server.pm.UserManagerService.LOG_TAG , "Error writing user list" ) ; } }