Fix freezing on Android when rotating

Fixes #1941
This commit is contained in:
Leith Bade
2015-09-22 16:23:39 +10:00
parent 71cde640a9
commit feae692dba
5 changed files with 13 additions and 9 deletions

View File

@@ -1009,14 +1009,6 @@ public class MapView extends FrameLayout implements LocationListener {
mNativeMapView.resizeFramebuffer(width, height);
}
// Called when we need to redraw the view
// This is called before our view is first visible to prevent an initial
// flicker (see Android SDK documentation)
/*@Override
public void surfaceRedrawNeeded(SurfaceHolder holder) {
mNativeMapView.update();
}*/ // TODO call update somewhere?
// Not used
@Override
public void onSurfaceTextureUpdated (SurfaceTexture surface) {
@@ -1796,7 +1788,6 @@ public class MapView extends FrameLayout implements LocationListener {
});
}
/**
* Defines callback for events OnMapChange
*/

View File

@@ -177,12 +177,14 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onStart() {
super.onStart();
mMapView.onStart();
}
@Override
protected void onStop() {
super.onStop();
mMapView.onStop();
}
@@ -205,6 +207,7 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onDestroy() {
super.onDestroy();
mMapView.onDestroy();
}