public boolean add ( JobStatus jobStatus ) { boolean replaced = mJobSet . remove ( jobStatus ) ; mJobSet . add ( jobStatus ) ; if ( ! jobStatus . isPersisted ( ) ) { markForBootSession ( jobStatus ) ; } maybeWriteStatusToDiskAsync ( ) ; return replaced ; }
Add a job to the master list persisting it if necessary . If the JobStatus already exists it will be replaced .