forked from organicmaps/organicmaps
[android] Added core initialization in service
This commit is contained in:
parent
4fec678eab
commit
d60e738a40
1 changed files with 11 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue