mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 03:52:48 +00:00
Fix exceptions in onStop when the connection is aborted due to lack of H.264 support
This commit is contained in:
parent
ee1a047cde
commit
f76b30d109
@ -354,8 +354,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
SpinnerDialog.closeDialogs(this);
|
SpinnerDialog.closeDialogs(this);
|
||||||
Dialog.closeDialogs();
|
Dialog.closeDialogs();
|
||||||
|
|
||||||
|
if (controllerHandler != null) {
|
||||||
InputManager inputManager = (InputManager) getSystemService(Context.INPUT_SERVICE);
|
InputManager inputManager = (InputManager) getSystemService(Context.INPUT_SERVICE);
|
||||||
inputManager.unregisterInputDeviceListener(controllerHandler);
|
inputManager.unregisterInputDeviceListener(controllerHandler);
|
||||||
|
}
|
||||||
|
|
||||||
wifiLock.release();
|
wifiLock.release();
|
||||||
|
|
||||||
@ -364,6 +366,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
unbindService(usbDriverServiceConnection);
|
unbindService(usbDriverServiceConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (conn != null) {
|
||||||
VideoDecoderRenderer.VideoFormat videoFormat = conn.getActiveVideoFormat();
|
VideoDecoderRenderer.VideoFormat videoFormat = conn.getActiveVideoFormat();
|
||||||
|
|
||||||
displayedFailureDialog = true;
|
displayedFailureDialog = true;
|
||||||
@ -395,6 +398,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
if (message != null) {
|
if (message != null) {
|
||||||
Toast.makeText(this, message, Toast.LENGTH_LONG).show();
|
Toast.makeText(this, message, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user