MCPcopy Create free account
hub / github.com/CyanogenMod/android_frameworks_base / set

Method set

core/java/android/os/WorkSource.java:179–204  ·  view source on GitHub ↗

Replace the current contents of this work source with the given work source. If other is null, the current work source will be made empty.

(WorkSource other)

Source from the content-addressed store, hash-verified

177 * will be made empty.
178 */
179 public void set(WorkSource other) {
180 if (other == null) {
181 mNum = 0;
182 return;
183 }
184 mNum = other.mNum;
185 if (other.mUids != null) {
186 if (mUids != null && mUids.length >= mNum) {
187 System.arraycopy(other.mUids, 0, mUids, 0, mNum);
188 } else {
189 mUids = other.mUids.clone();
190 }
191 if (other.mNames != null) {
192 if (mNames != null && mNames.length >= mNum) {
193 System.arraycopy(other.mNames, 0, mNames, 0, mNum);
194 } else {
195 mNames = other.mNames.clone();
196 }
197 } else {
198 mNames = null;
199 }
200 } else {
201 mUids = null;
202 mNames = null;
203 }
204 }
205
206 /** @hide */
207 public void set(int uid) {

Callers 11

setWorkSourceMethod · 0.45
handleViolationMethod · 0.45
prepareMethod · 0.45
modifyFieldIfSetMethod · 0.45
callMethod · 0.45
cancelMethod · 0.45
readTypedListMethod · 0.45
readStringListMethod · 0.45
readBinderListMethod · 0.45

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected