mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 12:03:02 +00:00
Print a better message if attempting to quit another device's stream
This commit is contained in:
parent
2d5328fc24
commit
814557435d
@ -185,12 +185,24 @@ public class NvConnection {
|
|||||||
|
|
||||||
protected boolean quitAndLaunch(NvHTTP h, NvApp app) throws IOException,
|
protected boolean quitAndLaunch(NvHTTP h, NvApp app) throws IOException,
|
||||||
XmlPullParserException {
|
XmlPullParserException {
|
||||||
|
try {
|
||||||
if (!h.quitApp()) {
|
if (!h.quitApp()) {
|
||||||
context.connListener.displayMessage("Failed to quit previous session! You must quit it manually");
|
context.connListener.displayMessage("Failed to quit previous session! You must quit it manually");
|
||||||
return false;
|
return false;
|
||||||
} else {
|
|
||||||
return launchNotRunningApp(h, app);
|
|
||||||
}
|
}
|
||||||
|
} catch (GfeHttpResponseException e) {
|
||||||
|
if (e.getErrorCode() == 599) {
|
||||||
|
context.connListener.displayMessage("This session wasn't started by this device," +
|
||||||
|
" so it cannot be quit. End streaming on the original " +
|
||||||
|
"device or the PC itself. (Error code: "+e.getErrorCode()+")");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return launchNotRunningApp(h, app);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean launchNotRunningApp(NvHTTP h, NvApp app)
|
private boolean launchNotRunningApp(NvHTTP h, NvApp app)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user