Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6180e844 authored by David Christie's avatar David Christie Committed by Android Git Automerger
Browse files

am 691a3191: am 5f68f717: Merge "Strip names out of externally supplied...

am 691a3191: am 5f68f717: Merge "Strip names out of externally supplied WorkSources to WifiManager (b/10710007)." into klp-dev

* commit '691a3191':
  Strip names out of externally supplied WorkSources to WifiManager (b/10710007).
parents 3934b9f5 691a3191
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -96,6 +96,16 @@ public class WorkSource implements Parcelable {
        return mNames != null ? mNames[index] : null;
    }

    /**
     * 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.
     */
+3 −0
Original line number Diff line number Diff line
@@ -342,6 +342,9 @@ public final class WifiService extends IWifiManager.Stub {
        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);
    }