summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Want <roywant@google.com>2019-08-12 17:43:17 -0700
committerRoy Want <roywant@google.com>2019-08-16 21:10:46 +0000
commit80102fffcd9d43b1238d5c6f5406e9429f1e869c (patch)
treed5a116705b946e4b9098d01f5b0459751854f596
parent949a9784e43720aaf3710589565ef5d8e22e20ab (diff)
downloadandroid_frameworks_opt_net_wifi-80102fffcd9d43b1238d5c6f5406e9429f1e869c.tar.gz
android_frameworks_opt_net_wifi-80102fffcd9d43b1238d5c6f5406e9429f1e869c.tar.bz2
android_frameworks_opt_net_wifi-80102fffcd9d43b1238d5c6f5406e9429f1e869c.zip
Removing privileged context requirement for civic location (server)
Bug: 139170192 Test: All unit tests pass. End-to-end tests pass. Change-Id: Ifa757b6f8937c9399396614255851f644d4df716
-rw-r--r--service/java/com/android/server/wifi/rtt/RttServiceImpl.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/service/java/com/android/server/wifi/rtt/RttServiceImpl.java b/service/java/com/android/server/wifi/rtt/RttServiceImpl.java
index 19ae1540e..d69ce8f00 100644
--- a/service/java/com/android/server/wifi/rtt/RttServiceImpl.java
+++ b/service/java/com/android/server/wifi/rtt/RttServiceImpl.java
@@ -1178,16 +1178,11 @@ public class RttServiceImpl extends IWifiRttManager.Stub {
"ResponderLocation: lci/lcr parser failed exception -- " + e);
}
// Clear LCI and LCR data if the location data should not be retransmitted,
- // has a retention expiration time, contains no useful data, or did not parse.
- if (responderLocation == null) {
+ // has a retention expiration time, contains no useful data, or did not parse,
+ // or the caller is not in a privileged context.
+ if (responderLocation == null || !isCalledFromPrivilegedContext) {
lci = null;
lcr = null;
- } else if (!isCalledFromPrivilegedContext) {
- // clear the raw lci and lcr buffers and civic location data if the
- // caller is not in a privileged context.
- lci = null;
- lcr = null;
- responderLocation.setCivicLocationSubelementDefaults();
}
if (resultForRequest.successNumber <= 1
&& resultForRequest.distanceSdInMm != 0) {