diff --git a/app/src/apiOreo/java/foundation/e/blisslauncher/features/weather/WeatherUpdateService.java b/app/src/apiOreo/java/foundation/e/blisslauncher/features/weather/WeatherUpdateService.java index 1247940107f09676e68be874e593eeeb3f6cb3a2..71d25641f20d842636a0c95af670c46b7882dd60 100644 --- a/app/src/apiOreo/java/foundation/e/blisslauncher/features/weather/WeatherUpdateService.java +++ b/app/src/apiOreo/java/foundation/e/blisslauncher/features/weather/WeatherUpdateService.java @@ -321,7 +321,7 @@ public class WeatherUpdateService extends Service { }catch (SecurityException e){ e.printStackTrace(); } - if (D) Log.v(TAG, "Current location is " + location + ", accuracy: " + location.getAccuracy()); + if (D && location != null) Log.v(TAG, "Current location is " + location + ", accuracy: " + location.getAccuracy()); if (location != null && location.getAccuracy() > LOCATION_ACCURACY_THRESHOLD_METERS) { if (D) Log.d(TAG, "Ignoring inaccurate location"); diff --git a/app/src/main/java/foundation/e/blisslauncher/core/utils/Constants.java b/app/src/main/java/foundation/e/blisslauncher/core/utils/Constants.java index 8b69e9a66b462e8f3d7829894600cc01f7beaf0c..2f84a08e332bd29eb556196656406be0c57fbc9e 100755 --- a/app/src/main/java/foundation/e/blisslauncher/core/utils/Constants.java +++ b/app/src/main/java/foundation/e/blisslauncher/core/utils/Constants.java @@ -15,12 +15,14 @@ */ package foundation.e.blisslauncher.core.utils; +import foundation.e.blisslauncher.BuildConfig; + /** * Created by falcon on 8/3/18. */ public class Constants { - public static final boolean DEBUG = true; + public static final boolean DEBUG = BuildConfig.DEBUG; public static final String PREF_NAME = "foundation.e.blisslauncher.prefs"; public static final String WEATHER_SOURCE = "weather_source";