Skip to content

Commit

Permalink
Fixed case where disconnect message may not be passed to WebOSWebAppS…
Browse files Browse the repository at this point in the history
…essionListener, fixes #99
  • Loading branch information
Jeremy White committed Jun 10, 2014
1 parent fbf47ee commit f610296
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/com/connectsdk/service/WebOSTVService.java
Original file line number Diff line number Diff line change
Expand Up @@ -2478,7 +2478,7 @@ public void joinWebApp(String webAppId, WebAppSession.LaunchListener listener) {
joinWebApp(launchSession, listener);
}

public void disconnectFromWebApp(WebOSWebAppSession webAppSession) {
public void disconnectFromWebApp(final WebOSWebAppSession webAppSession) {
final String appId = webAppSession.launchSession.getAppId();

if (appId == null)
Expand All @@ -2493,6 +2493,16 @@ public void disconnectFromWebApp(WebOSWebAppSession webAppSession) {
connectionSubscription.unsubscribe();
}
}

if (webAppSession.getWebAppSessionListener() != null) {
Util.runOnUI(new Runnable() {

@Override
public void run() {
webAppSession.getWebAppSessionListener().onWebAppSessionDisconnect(webAppSession);
}
});
}
}

@SuppressWarnings("unused")
Expand Down

0 comments on commit f610296

Please sign in to comment.