Change-Id: I69bd7ce9e942c2f9327415b2821d805e1b50a1a4
}
/**
+ * Clear names from this WorkSource. Uids are left intact.
+ *
+ * <p>Useful when combining with another WorkSource that doesn't have names.
+ * @hide
+ */
+ public void clearNames() {
+ mNames = null;
+ }
+
+ /**
* Clear this WorkSource to be empty.
*/
public void clear() {
enforceChangePermission();
if (workSource != null) {
enforceWorkSourcePermission();
+ // WifiManager currently doesn't use names, so need to clear names out of the
+ // supplied WorkSource to allow future WorkSource combining.
+ workSource.clearNames();
}
mWifiStateMachine.startScan(Binder.getCallingUid(), workSource);
}