summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorFyodor Kupolov <fkupolov@google.com>2015-06-19 15:54:12 -0700
committerFyodor Kupolov <fkupolov@google.com>2015-07-07 18:47:00 -0700
commitcb13aebfec313a3433ed0f53cc2e3b6dbaf888d0 (patch)
treec60d6eb945f9b38a3678d323ac2a57f73da7eea3 /wifi
parenta72eac60c7a34089c8e288f03ce031172e3b36b4 (diff)
downloadframeworks_base-cb13aebfec313a3433ed0f53cc2e3b6dbaf888d0.zip
frameworks_base-cb13aebfec313a3433ed0f53cc2e3b6dbaf888d0.tar.gz
frameworks_base-cb13aebfec313a3433ed0f53cc2e3b6dbaf888d0.tar.bz2
Check location permission/appop in getScanResults
Return an empty list if the calling process has no location permission/appop Bug: 21852542 Change-Id: Ifb9c5eb06c3fc7136a7f8251ac152234585f5b67
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index d00c654..e5a1d02 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1276,7 +1276,10 @@ public class WifiManager {
/**
* Return the results of the latest access point scan.
- * @return the list of access points found in the most recent scan.
+ * @return the list of access points found in the most recent scan. An app must hold
+ * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_COARSE_LOCATION} or
+ * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION} permission
+ * in order to get valid results.
*/
public List<ScanResult> getScanResults() {
try {