提交 b77331ad 编写于 作者: A Adam Barth

Merge pull request #2210 from abarth/defer_destroy

Don't destroy the engine when detaching from the window
......@@ -131,8 +131,7 @@ public class PlatformViewAndroid extends SurfaceView {
return mSkyEngine;
}
@Override
protected void onDetachedFromWindow() {
void destroy() {
getHolder().removeCallback(mSurfaceCallback);
nativeDetach(mNativePlatformView);
mNativePlatformView = 0;
......
......@@ -86,6 +86,9 @@ public class SkyActivity extends Activity {
*/
@Override
protected void onDestroy() {
if (mView != null) {
mView.destroy();
}
// Do we need to shut down Sky too?
mTracingController.stop();
super.onDestroy();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册