[android] #4283 - enable strict mode in test app + fix strict mode warning related to releasing the surface

This commit is contained in:
Tobrun
2016-03-11 17:26:54 -05:00
parent c39bd344b5
commit 45e6ee1372
2 changed files with 17 additions and 1 deletions

View File

@@ -1246,11 +1246,13 @@ public class MapView extends FrameLayout {
// This class handles TextureView callbacks
private class SurfaceTextureListener implements TextureView.SurfaceTextureListener {
private Surface mSurface;
// Called when the native surface texture has been created
// Must do all EGL/GL ES initialization here
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
mNativeMapView.createSurface(new Surface(surface));
mNativeMapView.createSurface(mSurface = new Surface(surface));
mNativeMapView.resizeFramebuffer(width, height);
}
@@ -1261,6 +1263,7 @@ public class MapView extends FrameLayout {
if (mNativeMapView != null) {
mNativeMapView.destroySurface();
}
mSurface.release();
return true;
}