forked from organicmaps/organicmaps
[android] Do not call Framework::UpdateVisualScale after initial surface creation.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
parent
17c4cde4cd
commit
7fffca074f
1 changed files with 8 additions and 4 deletions
|
@ -71,7 +71,8 @@ public final class Map
|
|||
@Nullable
|
||||
private CallbackUnsupported mCallbackUnsupported;
|
||||
|
||||
private static int currentDpi = 0;
|
||||
// Anyway it is not working as expected and looks suspicious for me.
|
||||
private static int sCurrentDpi = 0;
|
||||
|
||||
public Map(DisplayType mapType)
|
||||
{
|
||||
|
@ -144,10 +145,13 @@ public final class Map
|
|||
Logger.d(TAG, "mSurfaceCreated = " + mSurfaceCreated);
|
||||
if (nativeIsEngineCreated())
|
||||
{
|
||||
if (currentDpi != surfaceDpi)
|
||||
if (sCurrentDpi != surfaceDpi)
|
||||
{
|
||||
currentDpi = surfaceDpi;
|
||||
nativeUpdateEngineDpi(currentDpi);
|
||||
// Do not invoke Framework::UdateDpi after initial surface creation.
|
||||
if (sCurrentDpi != 0)
|
||||
nativeUpdateEngineDpi(surfaceDpi);
|
||||
sCurrentDpi = surfaceDpi;
|
||||
|
||||
setupWidgets(context, surfaceFrame.width(), surfaceFrame.height());
|
||||
}
|
||||
if (!nativeAttachSurface(surface))
|
||||
|
|
Loading…
Add table
Reference in a new issue