From ffe9b2eb446b708a4d386859416cf085c313a03c Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 3 Feb 2014 12:39:49 +0100 Subject: [PATCH] Fake locations get a height of 686 meter +/- accuracy Refs #1179 --- CHANGELOG.md | 1 + src/biz/bokhorst/xprivacy/PrivacyManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d70ae9bac..b0c99316f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Test and beta releases will have experimental functions enabled by default. * Fixed on demand choice not sticking * Fixed on demand asking for same restriction * Fixed reboot problem in relation to on demand ([issue](https://github.com/M66B/XPrivacy/issues/1238)) +* Fake locations get a height of 686 meter +/- accuracy ([issue](https://github.com/M66B/XPrivacy/issues/1179)) * Removed restriction *Srv.getConfiguredNetworks* [Open issues](https://github.com/M66B/XPrivacy/issues?state=open) diff --git a/src/biz/bokhorst/xprivacy/PrivacyManager.java b/src/biz/bokhorst/xprivacy/PrivacyManager.java index 01aae7010..c69377a28 100644 --- a/src/biz/bokhorst/xprivacy/PrivacyManager.java +++ b/src/biz/bokhorst/xprivacy/PrivacyManager.java @@ -755,7 +755,7 @@ public static Location getDefacedLocation(int uid, Location location) { else location.setLongitude(Float.parseFloat(sLon) + (Math.random() * 2.0 - 1.0) * location.getAccuracy() * 9e-6); - location.setAltitude(0); + location.setAltitude(686 + (Math.random() * 2.0 - 1.0) * location.getAccuracy()); return location; }