Skip to content

Commit

Permalink
Remove unnecessary code from Android MapView
Browse files Browse the repository at this point in the history
  • Loading branch information
mtehver committed Oct 7, 2022
1 parent 81e987c commit 45f0c5d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions android/java/com/carto/ui/MapView.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,23 +137,21 @@ public MapView(Context context, AttributeSet attrs) {
setLongClickable(longClickable);

if (!isInEditMode()) {
// Connect context info and assets manager to native part
// Connect context info and asset manager to native part
AndroidUtils.setContext(context);
if (assetManager == null) {
com.carto.utils.Log.warn("MapView: MapView created before MapView.registerLicense is called");

assetManager = context.getApplicationContext().getAssets();
AssetUtils.setAssetManagerPointer(assetManager);
}

// Set asset manager pointer to allow native access to assets
assetManager = context.getApplicationContext().getAssets();
AssetUtils.setAssetManagerPointer(assetManager);


// Initialize native BaseMapView instance
baseMapView = new BaseMapView();
baseMapView.getOptions().setDPI(getResources().getDisplayMetrics().densityDpi);
baseMapView.setRedrawRequestListener(new MapRedrawRequestListener(this));


// Set up relevant EGL state
try {
Method m = GLSurfaceView.class.getMethod("setPreserveEGLContextOnPause", Boolean.TYPE);
m.invoke(this, true);
Expand Down

0 comments on commit 45f0c5d

Please sign in to comment.