aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/lockclock/weather/WeatherUpdateService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/cyanogenmod/lockclock/weather/WeatherUpdateService.java')
-rw-r--r--src/com/cyanogenmod/lockclock/weather/WeatherUpdateService.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/lockclock/weather/WeatherUpdateService.java b/src/com/cyanogenmod/lockclock/weather/WeatherUpdateService.java
index a228ec7..ea0b89c 100644
--- a/src/com/cyanogenmod/lockclock/weather/WeatherUpdateService.java
+++ b/src/com/cyanogenmod/lockclock/weather/WeatherUpdateService.java
@@ -39,6 +39,8 @@ import com.cyanogenmod.lockclock.ClockWidgetProvider;
import com.cyanogenmod.lockclock.misc.Constants;
import com.cyanogenmod.lockclock.misc.Preferences;
import com.cyanogenmod.lockclock.misc.WidgetUtils;
+import com.cyanogenmod.lockclock.preference.WeatherPreferences;
+
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
@@ -129,6 +131,11 @@ public class WeatherUpdateService extends Service {
return false;
}
+ if (!WeatherPreferences.hasLocationPermission(this)) {
+ if (D) Log.v(TAG, "Application does not have the location permission");
+ return false;
+ }
+
if (force) {
Preferences.setCachedWeatherInfo(this, 0, null);
}