From 5a8a293614b9fd7352a5619180b37cfc998ea641 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Tue, 10 Jun 2014 01:24:10 +0100 Subject: [PATCH] location: Update available accuracy on max accuracy changing We translate 'On' to available accuracy level but if available accuracy level later changes, we don't update available accuracy level accordingly and hence limit the accuracy of apps. E.g if available accuracy level is 'city' and geolocation is enabled, the max accuracy level would be 'city' and apps can't get higher than that. Now if user plugs in GPS, the available accuracy level will change to 'exact' but without this patch max accuracy level will remain to be 'city' and apps will not be able to use the GPS. https://bugzilla.gnome.org/show_bug.cgi?id=731882 --- js/ui/status/location.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/ui/status/location.js b/js/ui/status/location.js index 8ae76330b..581a53440 100644 --- a/js/ui/status/location.js +++ b/js/ui/status/location.js @@ -191,8 +191,12 @@ const Indicator = new Lang.Class({ let unpacked = properties.deep_unpack(); if ("InUse" in unpacked) this._syncIndicator(); - if ("AvailableAccuracyLevel" in unpacked) + if ("AvailableAccuracyLevel" in unpacked) { this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel; + + if (this._getMaxAccuracyLevel() != 0) + this._settings.set_enum(MAX_ACCURACY_LEVEL, this._availableAccuracyLevel); + } } });