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

Commit 8a73ce48 authored by Roshan Pius's avatar Roshan Pius
Browse files

WifiScanner: Add permission for start/stop pno scan APIs

Only wifi service should invoke these calls.

Bug: 69862744
Test: Unit tests
Test: Verified that pno still works.
Change-Id: Ib0ded6aeb994b78e6a8965d66f2adef233cb002e
parent 148cd8c0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -928,6 +928,7 @@ public class WifiScanner {
     *                 scans should also not share this object.
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
    public void startDisconnectedPnoScan(ScanSettings scanSettings, PnoSettings pnoSettings,
            PnoScanListener listener) {
        Preconditions.checkNotNull(listener, "listener cannot be null");
@@ -942,9 +943,9 @@ public class WifiScanner {
     * Stop an ongoing wifi PNO scan
     * @param listener specifies which scan to cancel; must be same object as passed in {@link
     *  #startPnoScan}
     * TODO(rpius): Check if we can remove pnoSettings param in stop.
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
    public void stopPnoScan(ScanListener listener) {
        Preconditions.checkNotNull(listener, "listener cannot be null");
        int key = removeListener(listener);