Fixed null pointer in native

This commit is contained in:
Denis 2014-10-01 12:43:38 +03:00
parent 2d38b5b42c
commit 32555b6197

View file

@ -170,7 +170,8 @@ public class GLActivity extends Activity {
_coreResources = CoreResourcesFromAndroidAssets.loadFromCurrentApplication(this);
OsmAndCore.InitializeCore(_coreResources);
_fileLogSink = QIODeviceLogSink.createFileLogSink(Environment.getExternalStorageDirectory() + "/osmand/osmandcore.log");
File directory =getApp().getAppPath("");
_fileLogSink = QIODeviceLogSink.createFileLogSink(directory.getAbsolutePath() + "osmandcore.log");
Logger.get().addLogSink(_fileLogSink);
Log.i(TAG, "Going to resolve default embedded style...");
@ -186,7 +187,7 @@ public class GLActivity extends Activity {
_obfsCollection = new ObfsCollection();
Log.i(TAG, "Will load OBFs from " + Environment.getExternalStorageDirectory() + "/osmand");
File directory =getApp().getAppPath("");
Log.i(TAG, "Will load OBFs from " + directory.getAbsolutePath());
_obfsCollection.addDirectory(directory.getAbsolutePath(), false);
@ -231,7 +232,7 @@ public class GLActivity extends Activity {
if (mapnik == null)
Log.e(TAG, "Failed to create mapnik");
*/
_mapRenderer.setRasterLayerProvider(RasterMapLayerId.BaseLayer, _onlineMapRasterBitmapTileProvider);
_mapRenderer.setRasterLayerProvider(RasterMapLayerId.BaseLayer, _binaryMapRasterBitmapTileProvider);
_glSurfaceView = (GLSurfaceView) findViewById(R.id.glSurfaceView);
//TODO:_glSurfaceView.setPreserveEGLContextOnPause(true);