From d60e738a409fa4a61307b84c8c0c6d41fc9ebf7e Mon Sep 17 00:00:00 2001 From: Dmitry Donskoy Date: Mon, 18 Jun 2018 20:00:22 +0300 Subject: [PATCH] [android] Added core initialization in service --- .../bookmarks/SystemDownloadCompletedService.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/android/src/com/mapswithme/maps/bookmarks/SystemDownloadCompletedService.java b/android/src/com/mapswithme/maps/bookmarks/SystemDownloadCompletedService.java index 63a738656c..6c836af1e0 100644 --- a/android/src/com/mapswithme/maps/bookmarks/SystemDownloadCompletedService.java +++ b/android/src/com/mapswithme/maps/bookmarks/SystemDownloadCompletedService.java @@ -10,6 +10,7 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.widget.Toast; +import com.mapswithme.maps.MwmApplication; import com.mapswithme.maps.R; import com.mapswithme.maps.bookmarks.data.BookmarkManager; import com.mapswithme.maps.bookmarks.data.Error; @@ -26,6 +27,16 @@ public class SystemDownloadCompletedService extends IntentService super("GetFileMetaDataService"); } + @Override + public void onCreate() + { + super.onCreate(); + MwmApplication app = (MwmApplication) getApplication(); + if (app.arePlatformAndCoreInitialized()) + return; + app.initCore(); + } + @Override protected void onHandleIntent(@Nullable Intent intent) {