From 4748d158f4af73dfad90a0ca485c533c693ad47e Mon Sep 17 00:00:00 2001 From: Arsentiy Milchakov Date: Tue, 17 Apr 2018 16:42:57 +0300 Subject: [PATCH] [android] Added check core and platform before changes uploading --- .../src/com/mapswithme/maps/background/WorkerService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/src/com/mapswithme/maps/background/WorkerService.java b/android/src/com/mapswithme/maps/background/WorkerService.java index 277731debe..0fdd55ec5e 100644 --- a/android/src/com/mapswithme/maps/background/WorkerService.java +++ b/android/src/com/mapswithme/maps/background/WorkerService.java @@ -22,6 +22,9 @@ public class WorkerService extends IntentService private static final SharedPreferences PREFS = MwmApplication.prefs(); + private final boolean mArePlatformAndCoreInitialized = + MwmApplication.get().arePlatformAndCoreInitialized(); + /** * Starts this service to upload map edits to osm servers. */ @@ -62,6 +65,9 @@ public class WorkerService extends IntentService if (TextUtils.isEmpty(action)) return; + if (!mArePlatformAndCoreInitialized) + return; + switch (action) { case ACTION_UPLOAD_OSM_CHANGES: