forked from organicmaps/organicmaps
[and] Fixed missing task execution.
This commit is contained in:
parent
c6299df7fc
commit
eb8a302dd6
1 changed files with 14 additions and 1 deletions
|
@ -76,7 +76,7 @@ public class MWMActivity extends NvEventQueueActivity implements LocationService
|
|||
//showDialog(int, Bundle) available only form API 8
|
||||
private String mProDialogMessage;
|
||||
|
||||
private native void deactivatePopup();
|
||||
public native void deactivatePopup();
|
||||
|
||||
private LocationService getLocationService()
|
||||
{
|
||||
|
@ -173,6 +173,8 @@ public class MWMActivity extends NvEventQueueActivity implements LocationService
|
|||
@Override
|
||||
public void OnRenderingInitialized()
|
||||
{
|
||||
mRenderingInitialized = true;
|
||||
|
||||
runOnUiThread(new Runnable()
|
||||
{
|
||||
@Override
|
||||
|
@ -186,6 +188,11 @@ public class MWMActivity extends NvEventQueueActivity implements LocationService
|
|||
}
|
||||
});
|
||||
|
||||
runTasks();
|
||||
}
|
||||
|
||||
private void runTasks()
|
||||
{
|
||||
// Task are not UI-thread bounded,
|
||||
// if any task need UI-thread it should implicitly
|
||||
// use Activity.runOnUiThread().
|
||||
|
@ -310,6 +317,8 @@ public class MWMActivity extends NvEventQueueActivity implements LocationService
|
|||
|
||||
private boolean m_needCheckUpdate = true;
|
||||
|
||||
private boolean mRenderingInitialized = false;
|
||||
|
||||
|
||||
private void checkUpdateMaps()
|
||||
{
|
||||
|
@ -607,6 +616,9 @@ public class MWMActivity extends NvEventQueueActivity implements LocationService
|
|||
MapTask mapTask = (MapTask) intent.getSerializableExtra(EXTRA_TASK);
|
||||
mTasks.add(mapTask);
|
||||
intent.removeExtra(EXTRA_TASK);
|
||||
|
||||
if (mRenderingInitialized)
|
||||
runTasks();
|
||||
}
|
||||
setIntent(null);
|
||||
}
|
||||
|
@ -616,6 +628,7 @@ public class MWMActivity extends NvEventQueueActivity implements LocationService
|
|||
{
|
||||
deactivatePopup();
|
||||
super.onStop();
|
||||
mRenderingInitialized = false;
|
||||
}
|
||||
|
||||
private void alignZoomButtons()
|
||||
|
|
Loading…
Add table
Reference in a new issue