summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-08-07 22:18:15 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-08-07 22:18:15 +0000
commit058fc1de39ed8c11473bf9d60aac92dbf21106c0 (patch)
tree4a85220cea49c0a58a865f63e43abfc38d008f56 /service
parent7b0a925a6b914c16a4606a14d644878b5039474b (diff)
parentc4713c9006b236bf1c7d0bf82b50bfb6b1eb53b6 (diff)
Merge "ScanRequestProxy: Return copy of list in getScanResults" into rvc-qpr-dev
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/ScanRequestProxy.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/ScanRequestProxy.java b/service/java/com/android/server/wifi/ScanRequestProxy.java
index c054b90a4..622fcdab9 100644
--- a/service/java/com/android/server/wifi/ScanRequestProxy.java
+++ b/service/java/com/android/server/wifi/ScanRequestProxy.java
@@ -464,7 +464,8 @@ public class ScanRequestProxy {
* @return the list of results
*/
public List<ScanResult> getScanResults() {
- return mLastScanResults;
+ // return a copy to prevent external modification
+ return new ArrayList<>(mLastScanResults);
}
/**