Source:
private void writeJobsMapImpl ( java.util.List < com.android.server.job.controllers.JobStatus > jobList ) { try { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; org.xmlpull.v1.XmlSerializer out = new com.android.internal.util.FastXmlSerializer ( ) ; out.setOutput ( baos , "utf-8" ) ; out.startDocument ( null , true ) ; out.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; out.startTag ( null , "job-info" ) ; out.attribute ( null , "version" , java.lang.Integer.toString ( com.android.server.job.JobStore.JOBS_FILE_VERSION ) ) ; for ( int i = 0 ; i < ( jobList.size ( ) ) ; i ++ ) { com.android.server.job.controllers.JobStatus jobStatus = jobList.get ( i ) ; if ( com.android.server.job.JobStore.DEBUG ) { android.util.Slog.d ( com.android.server.job.JobStore.TAG , ( "Saving job " + ( jobStatus.getJobId ( ) ) ) ) ; } out.startTag ( null , "job" ) ; addIdentifierAttributesToJobTag ( out , jobStatus ) ; writeConstraintsToXml ( out , jobStatus ) ; writeExecutionCriteriaToXml ( out , jobStatus ) ; writeBundleToXml ( jobStatus.getExtras ( ) , out ) ; out.endTag ( null , "job" ) ; } out.endTag ( null , "job-info" ) ; out.endDocument ( ) ; java.io.FileOutputStream fos = mJobsFile.startWrite ( ) ; fos.write ( baos.toByteArray ( ) ) ; mJobsFile.finishWrite ( fos ) ; mDirtyOperations = 0 ; } catch ( java.io.IOException e ) { if ( com.android.server.job.JobStore.DEBUG ) { android.util.Slog.v ( com.android.server.job.JobStore.TAG , "Error writing out job data." , e ) ; } } catch ( org.xmlpull.v1.XmlPullParserException e ) { if ( com.android.server.job.JobStore.DEBUG ) { android.util.Slog.d ( com.android.server.job.JobStore.TAG , "Error persisting bundle." , e ) ; } } }

Target:
private void writeJobsMapImpl ( java.util.List < com.android.server.job.controllers.JobStatus > jobList ) { try { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; org.xmlpull.v1.XmlSerializer out = new com.android.internal.util.FastXmlSerializer ( ) ; out.setOutput ( baos , java.nio.charset.StandardCharsets.UTF_8.name ( ) ) ; out.startDocument ( null , true ) ; out.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; out.startTag ( null , "job-info" ) ; out.attribute ( null , "version" , java.lang.Integer.toString ( com.android.server.job.JobStore.JOBS_FILE_VERSION ) ) ; for ( int i = 0 ; i < ( jobList.size ( ) ) ; i ++ ) { com.android.server.job.controllers.JobStatus jobStatus = jobList.get ( i ) ; if ( com.android.server.job.JobStore.DEBUG ) { android.util.Slog.d ( com.android.server.job.JobStore.TAG , ( "Saving job " + ( jobStatus.getJobId ( ) ) ) ) ; } out.startTag ( null , "job" ) ; addIdentifierAttributesToJobTag ( out , jobStatus ) ; writeConstraintsToXml ( out , jobStatus ) ; writeExecutionCriteriaToXml ( out , jobStatus ) ; writeBundleToXml ( jobStatus.getExtras ( ) , out ) ; out.endTag ( null , "job" ) ; } out.endTag ( null , "job-info" ) ; out.endDocument ( ) ; java.io.FileOutputStream fos = mJobsFile.startWrite ( ) ; fos.write ( baos.toByteArray ( ) ) ; mJobsFile.finishWrite ( fos ) ; mDirtyOperations = 0 ; } catch ( java.io.IOException e ) { if ( com.android.server.job.JobStore.DEBUG ) { android.util.Slog.v ( com.android.server.job.JobStore.TAG , "Error writing out job data." , e ) ; } } catch ( org.xmlpull.v1.XmlPullParserException e ) { if ( com.android.server.job.JobStore.DEBUG ) { android.util.Slog.d ( com.android.server.job.JobStore.TAG , "Error persisting bundle." , e ) ; } } }