forked from organicmaps/organicmaps
Merge pull request #2739 from trashkalmar/attach-detach-controllers
[android] fix: Possible fixes in MigrationController and RoutingController.
This commit is contained in:
commit
6733c93e7c
2 changed files with 16 additions and 11 deletions
|
@ -379,7 +379,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
}
|
||||
|
||||
mNavigationController = new NavigationController(this);
|
||||
RoutingController.get().attach(this);
|
||||
initMenu();
|
||||
initOnmapDownloader();
|
||||
initPositionChooser();
|
||||
|
@ -678,7 +677,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
{
|
||||
Framework.nativeRemoveMapObjectListener();
|
||||
BottomSheetHelper.free();
|
||||
RoutingController.get().detach();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
@ -1019,6 +1017,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
{
|
||||
super.onStart();
|
||||
initShowcase();
|
||||
RoutingController.get().attach(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1026,6 +1025,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
{
|
||||
super.onStop();
|
||||
mMytargetHelper.cancel();
|
||||
RoutingController.get().detach();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -128,18 +128,9 @@ public class MigrationFragment extends BaseMwmFragment
|
|||
}
|
||||
});
|
||||
|
||||
MigrationController.get().attach(this);
|
||||
|
||||
Statistics.INSTANCE.trackEvent(Statistics.EventName.DOWNLOADER_MIGRATION_DIALOG_SEEN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView()
|
||||
{
|
||||
super.onDestroyView();
|
||||
MigrationController.get().detach();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume()
|
||||
{
|
||||
|
@ -147,6 +138,20 @@ public class MigrationFragment extends BaseMwmFragment
|
|||
MigrationController.get().restore();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart()
|
||||
{
|
||||
super.onStart();
|
||||
MigrationController.get().attach(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop()
|
||||
{
|
||||
super.onStop();
|
||||
MigrationController.get().detach();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReadyState()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue