Lines Matching defs:WorkSource
14 public class WorkSource implements Parcelable {
15 static final String TAG = "WorkSource";
24 * The WorkSource object itself is not thread safe, but we need to
27 static final WorkSource sTmpWorkSource = new WorkSource(0);
31 static WorkSource sNewbWork;
35 static WorkSource sGoneWork;
40 public WorkSource() {
45 * Create a new WorkSource that is a copy of an existing one.
46 * If <var>orig</var> is null, an empty WorkSource is created.
48 public WorkSource(WorkSource orig) {
64 public WorkSource(int uid) {
71 public WorkSource(int uid, String name) {
80 WorkSource(Parcel in) {
102 * Clear names from this WorkSource. Uids are left intact.
104 * <p>Useful when combining with another WorkSource that doesn't have names.
126 * Clear this WorkSource to be empty.
134 return o instanceof WorkSource && !diff((WorkSource)o);
152 * Compare this WorkSource with another.
153 * @param other The WorkSource to compare against.
156 public boolean diff(WorkSource other) {
181 public void set(WorkSource other) {
231 public WorkSource[] setReturningDiffs(WorkSource other) {
237 WorkSource[] diffs = new WorkSource[2];
247 * Merge the contents of <var>other</var> WorkSource in to this one.
249 * @param other The other WorkSource whose contents are to be merged.
252 public boolean add(WorkSource other) {
259 public WorkSource addReturningNewbs(WorkSource other) {
315 public WorkSource addReturningNewbs(int uid) {
324 public boolean remove(WorkSource other) {
344 public WorkSource stripNames() {
346 return new WorkSource();
348 WorkSource result = new WorkSource();
359 private boolean removeUids(WorkSource other) {
391 private boolean removeUidsAndNames(WorkSource other) {
429 private boolean updateLocked(WorkSource other, boolean set, boolean returnNewbs) {
445 private static WorkSource addWork(WorkSource cur, int newUid) {
447 return new WorkSource(newUid);
453 private boolean updateUidsLocked(WorkSource other, boolean set, boolean returnNewbs) {
529 private int compare(WorkSource other, int i1, int i2) {
537 private static WorkSource addWork(WorkSource cur, int newUid, String newName) {
539 return new WorkSource(newUid, newName);
545 private boolean updateUidsAndNamesLocked(WorkSource other, boolean set, boolean returnNewbs) {
682 result.append("WorkSource{");
711 public static final Parcelable.Creator<WorkSource> CREATOR
712 = new Parcelable.Creator<WorkSource>() {
713 public WorkSource createFromParcel(Parcel in) {
714 return new WorkSource(in);
716 public WorkSource[] newArray(int size) {
717 return new WorkSource[size];