Skip to content

Commit 7c1c7af

Browse files
committed
Removed random bug
1 parent 6923017 commit 7c1c7af

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

wear-socket/src/main/java/com/github/jrejaud/wear_socket/WearSocket.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,14 @@ private void showErrorAndCloseApp(String message, boolean closeApp) {
169169
}
170170
}
171171

172-
public void disconnect() {
172+
public void disconnect() {
173173
if (googleApiClient!=null) {
174174
googleApiClient.disconnect();
175-
}
176-
Wearable.MessageApi.removeListener(googleApiClient, this);
177-
Wearable.DataApi.removeListener(googleApiClient, this);
178-
}
175+
Wearable.MessageApi.removeListener(googleApiClient, this);
176+
Wearable.DataApi.removeListener(googleApiClient, this);
177+
}
178+
}
179+
179180

180181
//********************************************************************
181182
//Send Message
@@ -342,4 +343,4 @@ public void setKeyDataType(String key, Type type) {
342343
public interface onErrorListener {
343344
void onError(Throwable throwable);
344345
}
345-
}
346+
}

0 commit comments

Comments
 (0)