forked from organicmaps/organicmaps
Review fixes
This commit is contained in:
parent
23b6084cac
commit
61d5c3fe9a
3 changed files with 9 additions and 4 deletions
|
@ -161,6 +161,11 @@ public class Framework
|
|||
|
||||
public native static void nativeSetMapStyle(int mapStyle);
|
||||
|
||||
/**
|
||||
* This method allows to set new map style without immediate applying. It can be used before
|
||||
* engine recreation instead of nativeSetMapStyle to avoid huge flow of OpenGL invocations.
|
||||
* @param mapStyle style index
|
||||
*/
|
||||
public native static void nativeMarkMapStyle(int mapStyle);
|
||||
|
||||
public native static void nativeSetRouter(int routerType);
|
||||
|
|
|
@ -180,12 +180,12 @@ public class MapFragment extends BaseMwmFragment
|
|||
return;
|
||||
|
||||
if (getActivity() == null || !getActivity().isChangingConfigurations())
|
||||
destroySurface();
|
||||
destroyEngine();
|
||||
else
|
||||
nativeDetachSurface();
|
||||
}
|
||||
|
||||
public void destroySurface()
|
||||
public void destroyEngine()
|
||||
{
|
||||
if (!mEngineCreated)
|
||||
return;
|
||||
|
|
|
@ -753,8 +753,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
@Override
|
||||
public void recreate()
|
||||
{
|
||||
// Explicitly destroy surface before activity recreation.
|
||||
mMapFragment.destroySurface();
|
||||
// Explicitly destroy engine before activity recreation.
|
||||
mMapFragment.destroyEngine();
|
||||
super.recreate();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue