forked from organicmaps/organicmaps
[android] Removed exception throw since Activity.onDestroy isn't guaranteed to be called.
This commit is contained in:
parent
c143c796ab
commit
3dd79a06ca
2 changed files with 2 additions and 8 deletions
|
@ -675,6 +675,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
@Override
|
||||
public void onDestroy()
|
||||
{
|
||||
// TODO move listeners attach-deattach to onStart-onStop since onDestroy isn't guaranteed.
|
||||
Framework.nativeRemoveMapObjectListener();
|
||||
BottomSheetHelper.free();
|
||||
super.onDestroy();
|
||||
|
|
|
@ -173,7 +173,7 @@ public class RoutingController
|
|||
{
|
||||
cancel();
|
||||
|
||||
for (String map: mLastMissingMaps)
|
||||
for (String map : mLastMissingMaps)
|
||||
MapManager.nativeDownload(map);
|
||||
|
||||
if (mContainer != null)
|
||||
|
@ -250,18 +250,11 @@ public class RoutingController
|
|||
|
||||
public void attach(@NonNull Container container)
|
||||
{
|
||||
Log.d(TAG, "attach");
|
||||
|
||||
if (mContainer != null)
|
||||
throw new IllegalStateException("Must be detached before attach()");
|
||||
|
||||
mContainer = container;
|
||||
}
|
||||
|
||||
public void detach()
|
||||
{
|
||||
Log.d(TAG, "detach");
|
||||
|
||||
mContainer = null;
|
||||
mStartButton = null;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue