From 6a939e749577a5df9b4da501d3cd13de36512c5c Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 10 Feb 2019 02:28:11 -0800 Subject: [PATCH] Don't display the termination dialog for intended terminations --- app/src/main/java/com/limelight/Game.java | 11 +++++++++-- moonlight-common | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/limelight/Game.java b/app/src/main/java/com/limelight/Game.java index de1a1922..d3582327 100644 --- a/app/src/main/java/com/limelight/Game.java +++ b/app/src/main/java/com/limelight/Game.java @@ -1322,8 +1322,15 @@ public class Game extends Activity implements SurfaceHolder.Callback, LimeLog.severe("Connection terminated: " + errorCode); stopConnection(); - Dialog.displayDialog(Game.this, getResources().getString(R.string.conn_terminated_title), - getResources().getString(R.string.conn_terminated_msg), true); + // Display the error dialog if it was an unexpected termination. + // Otherwise, just finish the activity immediately. + if (errorCode != 0) { + Dialog.displayDialog(Game.this, getResources().getString(R.string.conn_terminated_title), + getResources().getString(R.string.conn_terminated_msg), true); + } + else { + finish(); + } } } }); diff --git a/moonlight-common b/moonlight-common index 433b2a03..8190dffe 160000 --- a/moonlight-common +++ b/moonlight-common @@ -1 +1 @@ -Subproject commit 433b2a036aa868b2d2847e880897fa13493443fc +Subproject commit 8190dffe99c33588b0ba280e3ed183d5a3853fc1