Loading core/java/android/os/WorkSource.java +19 −0 Original line number Diff line number Diff line Loading @@ -1058,6 +1058,25 @@ public class WorkSource implements Parcelable { } proto.end(contentProto); } if (mChains != null) { for (int i = 0; i < mChains.size(); i++) { final WorkChain wc = mChains.get(i); final long workChain = proto.start(WorkSourceProto.WORK_CHAINS); final String[] tags = wc.getTags(); final int[] uids = wc.getUids(); for (int j = 0; j < tags.length; j++) { final long contentProto = proto.start(WorkSourceProto.WORK_SOURCE_CONTENTS); proto.write(WorkSourceProto.WorkSourceContentProto.UID, uids[j]); proto.write(WorkSourceProto.WorkSourceContentProto.NAME, tags[j]); proto.end(contentProto); } proto.end(workChain); } } proto.end(workSourceToken); } Loading core/proto/android/os/worksource.proto +6 −1 Original line number Diff line number Diff line Loading @@ -25,5 +25,10 @@ message WorkSourceProto { optional string name = 2; } message WorkChain { repeated WorkSourceContentProto nodes = 1; } repeated WorkSourceContentProto work_source_contents = 1; repeated WorkChain work_chains = 2; } Loading
core/java/android/os/WorkSource.java +19 −0 Original line number Diff line number Diff line Loading @@ -1058,6 +1058,25 @@ public class WorkSource implements Parcelable { } proto.end(contentProto); } if (mChains != null) { for (int i = 0; i < mChains.size(); i++) { final WorkChain wc = mChains.get(i); final long workChain = proto.start(WorkSourceProto.WORK_CHAINS); final String[] tags = wc.getTags(); final int[] uids = wc.getUids(); for (int j = 0; j < tags.length; j++) { final long contentProto = proto.start(WorkSourceProto.WORK_SOURCE_CONTENTS); proto.write(WorkSourceProto.WorkSourceContentProto.UID, uids[j]); proto.write(WorkSourceProto.WorkSourceContentProto.NAME, tags[j]); proto.end(contentProto); } proto.end(workChain); } } proto.end(workSourceToken); } Loading
core/proto/android/os/worksource.proto +6 −1 Original line number Diff line number Diff line Loading @@ -25,5 +25,10 @@ message WorkSourceProto { optional string name = 2; } message WorkChain { repeated WorkSourceContentProto nodes = 1; } repeated WorkSourceContentProto work_source_contents = 1; repeated WorkChain work_chains = 2; }