diff options
author | Mike Cailean <mcailean@codeaurora.org> | 2019-02-11 09:11:09 -0800 |
---|---|---|
committer | Mike Cailean <mcailean@codeaurora.org> | 2019-03-21 14:57:28 -0700 |
commit | b046241ec2fdc9a48e99face1794046488a8cabe (patch) | |
tree | ccbe677775add604af707618bd76ec5d51e5afc5 /core | |
parent | 1839fb1140242da10a6a599e65a7b79836007517 (diff) | |
download | gps-b046241ec2fdc9a48e99face1794046488a8cabe.tar.gz |
Improved Location NI Privacy
Changes to be made starting in Android Q in the way
that Location requests made by Location clients
other than the Android FrameWork (e.g. Network
Initiated AGNSS clients, modem-based clients such
as MDT) are handled
CRs-fixed: 2397454
Change-Id: Ibb5b9429a1ec1e14ee59d89763d8a78607997615
Diffstat (limited to 'core')
-rw-r--r-- | core/LocAdapterBase.cpp | 6 | ||||
-rw-r--r-- | core/LocAdapterBase.h | 3 | ||||
-rw-r--r-- | core/LocApiBase.cpp | 16 | ||||
-rw-r--r-- | core/LocApiBase.h | 4 |
4 files changed, 23 insertions, 6 deletions
diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp index 22116e6..cea72fa 100644 --- a/core/LocAdapterBase.cpp +++ b/core/LocAdapterBase.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, 2016-2018 The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2014, 2016-2019 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -199,4 +199,8 @@ DEFAULT_IMPL(false) bool LocAdapterBase:: reportGnssAdditionalSystemInfoEvent(GnssAdditionalSystemInfo& /*additionalSystemInfo*/) DEFAULT_IMPL(false) + +void LocAdapterBase:: + reportNfwNotificationEvent(GnssNfwNotification& /*notification*/) +DEFAULT_IMPL() } // namespace loc_core diff --git a/core/LocAdapterBase.h b/core/LocAdapterBase.h index 722947a..af56cc9 100644 --- a/core/LocAdapterBase.h +++ b/core/LocAdapterBase.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, 2016-2018 The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2014, 2016-2019 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -171,6 +171,7 @@ public: virtual bool reportKlobucharIonoModelEvent(GnssKlobucharIonoModel& ionoModel); virtual bool reportGnssAdditionalSystemInfoEvent( GnssAdditionalSystemInfo& additionalSystemInfo); + virtual void reportNfwNotificationEvent(GnssNfwNotification& notification); }; } // namespace loc_core diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp index 8fe84c2..fac81e7 100644 --- a/core/LocApiBase.cpp +++ b/core/LocApiBase.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, 2016-2018 The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2014, 2016-2019 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -391,6 +391,13 @@ void LocApiBase::reportGnssAdditionalSystemInfo(GnssAdditionalSystemInfo& additi additionalSystemInfo)); } +void LocApiBase::sendNfwNotification(GnssNfwNotification& notification) +{ + // loop through adapters, and deliver to the first handling adapter. + TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportNfwNotificationEvent(notification)); + +} + void LocApiBase::reportSv(GnssSvNotification& svNotify) { const char* constellationString[] = { "Unknown", "GPS", "SBAS", "GLONASS", @@ -683,6 +690,10 @@ DEFAULT_IMPL(0) GnssConfigLppeUserPlaneMask LocApiBase::convertLppeUp(const uint32_t /*lppeUserPlaneMask*/) DEFAULT_IMPL(0) +LocationError LocApiBase::setEmergencyExtensionWindowSync( + const uint32_t /*emergencyExtensionSeconds*/) +DEFAULT_IMPL(LOCATION_ERROR_SUCCESS) + void LocApiBase:: getWwanZppFix() DEFAULT_IMPL() @@ -737,7 +748,6 @@ LocationError LocApiBase:: setPositionAssistedClockEstimatorMode(bool /*enabled*/) DEFAULT_IMPL(LOCATION_ERROR_SUCCESS) -LocationError LocApiBase:: - getGnssEnergyConsumed() +LocationError LocApiBase::getGnssEnergyConsumed() DEFAULT_IMPL(LOCATION_ERROR_SUCCESS) } // namespace loc_core diff --git a/core/LocApiBase.h b/core/LocApiBase.h index 70bebc3..f0bd539 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, 2016-2018 The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2014, 2016-2019 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -189,6 +189,7 @@ public: void reportDeleteAidingDataEvent(GnssAidingData& aidingData); void reportKlobucharIonoModel(GnssKlobucharIonoModel& ionoModel); void reportGnssAdditionalSystemInfo(GnssAdditionalSystemInfo& additionalSystemInfo); + void sendNfwNotification(GnssNfwNotification& notification); // downward calls // All below functions are to be defined by adapter specific modules: @@ -265,6 +266,7 @@ public: virtual GnssConfigLppProfile convertLppProfile(const uint32_t lppProfile); virtual GnssConfigLppeControlPlaneMask convertLppeCp(const uint32_t lppeControlPlaneMask); virtual GnssConfigLppeUserPlaneMask convertLppeUp(const uint32_t lppeUserPlaneMask); + virtual LocationError setEmergencyExtensionWindowSync(const uint32_t emergencyExtensionSeconds); virtual void getWwanZppFix(); virtual void getBestAvailableZppFix(); |