Refactor application

This commit is contained in:
Victor Shcherb 2014-12-06 15:26:29 +01:00
parent bb5e6d499f
commit 63b7f7a70a

View file

@ -55,13 +55,12 @@ public class NativeCoreContext {
WindowManager mgr = (WindowManager)app.getSystemService(Context.WINDOW_SERVICE); WindowManager mgr = (WindowManager)app.getSystemService(Context.WINDOW_SERVICE);
DisplayMetrics dm = new DisplayMetrics(); DisplayMetrics dm = new DisplayMetrics();
mgr.getDefaultDisplay().getMetrics(dm); mgr.getDefaultDisplay().getMetrics(dm);
float density = Math.max(0, dm.density - 1);
ObfsCollection obfsCollection = new ObfsCollection(); ObfsCollection obfsCollection = new ObfsCollection();
obfsCollection.addDirectory(directory.getAbsolutePath(), false); obfsCollection.addDirectory(directory.getAbsolutePath(), false);
MapStylesCollection mapStylesCollection = setupMapStyleCollection(app); MapStylesCollection mapStylesCollection = setupMapStyleCollection(app);
mapRendererContext = new MapRendererContext(app, density); mapRendererContext = new MapRendererContext(app, dm.density);
mapRendererContext.setupObfMap(mapStylesCollection, obfsCollection); mapRendererContext.setupObfMap(mapStylesCollection, obfsCollection);
init = true; init = true;
} }