From da123a6726e7c64b3f19f74ed0eb02bb4398a989 Mon Sep 17 00:00:00 2001 From: vandwalle Date: Fri, 21 Nov 2014 17:59:30 -0800 Subject: make startScan with worksource specific to location scans Change-Id: Ia09dae3e334ef6fd11f2b468e78ad7c2c3cf55e9 --- wifi/java/android/net/wifi/IWifiManager.aidl | 2 ++ wifi/java/android/net/wifi/WifiManager.java | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'wifi') diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl index a752686..5ee17bb 100644 --- a/wifi/java/android/net/wifi/IWifiManager.aidl +++ b/wifi/java/android/net/wifi/IWifiManager.aidl @@ -61,6 +61,8 @@ interface IWifiManager void startScan(in ScanSettings requested, in WorkSource ws); + void startLocationRestrictedScan(in WorkSource ws); + List getScanResults(String callingPackage); void disconnect(); diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 6ddebde..d19952c 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -1011,6 +1011,22 @@ public class WifiManager { } /** + * startLocationRestrictedScan() + * Trigger a scan which will not make use of DFS channels and is thus not suitable for + * establishing wifi connection. + * @hide + */ + @SystemApi + public boolean startLocationRestrictedScan(WorkSource workSource) { + try { + mService.startLocationRestrictedScan(workSource); + return true; + } catch (RemoteException e) { + return false; + } + } + + /** * Request a scan for access points in specified channel list. Each channel is specified by its * frequency in MHz, e.g. "5500" (do NOT include "DFS" even though it is). The availability of * the results is made known later in the same way as {@link #startScan}. -- cgit v1.1