From eb7c54b95c7a148bf3eef19ae49512d59c3a9156 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 21 Mar 2014 19:32:24 -0400 Subject: [PATCH] Fix some handling of the Android activity lifecycle that upset the window manager --- src/com/limelight/Game.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/com/limelight/Game.java b/src/com/limelight/Game.java index 282b29dc..bc5fca1e 100644 --- a/src/com/limelight/Game.java +++ b/src/com/limelight/Game.java @@ -157,18 +157,16 @@ public class Game extends Activity implements OnGenericMotionListener, OnTouchLi } @Override - public void onPause() { - displayedFailureDialog = true; - conn.stop(); - finish(); - super.onPause(); - } - - @Override - protected void onDestroy() { + protected void onStop() { + super.onStop(); + SpinnerDialog.closeDialogs(); Dialog.closeDialogs(); - super.onDestroy(); + + displayedFailureDialog = true; + conn.stop(); + + finish(); } @Override