mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 11:39:42 +01:00
Add logging for websockets
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
8f0b21ab21
commit
8f3a3570e9
@ -1989,7 +1989,7 @@ public class CallActivity extends CallBaseActivity {
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
|
||||
// unused atm
|
||||
Log.e(TAG, "Error while leaving the call", e);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -2216,7 +2216,7 @@ class ChatActivity :
|
||||
Log.d(TAG, "not leaving room (validSessionId is false)")
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "not leaving room...")
|
||||
Log.d(TAG, "not leaving room...")
|
||||
}
|
||||
|
||||
if (mentionAutocomplete != null && mentionAutocomplete!!.isPopupShowing) {
|
||||
|
@ -23,6 +23,7 @@ package com.nextcloud.talk.jobs;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
||||
import com.nextcloud.talk.data.user.model.User;
|
||||
@ -41,6 +42,8 @@ import autodagger.AutoInjector;
|
||||
@AutoInjector(NextcloudTalkApplication.class)
|
||||
public class WebsocketConnectionsWorker extends Worker {
|
||||
|
||||
public static final String TAG = "WebsocketConnectionsWorker";
|
||||
|
||||
@Inject
|
||||
UserManager userManager;
|
||||
|
||||
@ -52,6 +55,8 @@ public class WebsocketConnectionsWorker extends Worker {
|
||||
@NonNull
|
||||
@Override
|
||||
public Result doWork() {
|
||||
Log.d(TAG, "WebsocketConnectionsWorker started ");
|
||||
|
||||
NextcloudTalkApplication.Companion.getSharedApplication().getComponentApplication().inject(this);
|
||||
|
||||
List<User> users = userManager.getUsers().blockingGet();
|
||||
@ -61,9 +66,14 @@ public class WebsocketConnectionsWorker extends Worker {
|
||||
user.getExternalSignalingServer().getExternalSignalingServer() != null &&
|
||||
!TextUtils.isEmpty(user.getExternalSignalingServer().getExternalSignalingServer()) &&
|
||||
!TextUtils.isEmpty(user.getExternalSignalingServer().getExternalSignalingTicket())) {
|
||||
|
||||
Log.d(TAG,
|
||||
"WebsocketConnectionsWorker - getExternalSignalingInstanceForServer for user " + user.getDisplayName());
|
||||
|
||||
webSocketConnectionHelper.getExternalSignalingInstanceForServer(
|
||||
user.getExternalSignalingServer().getExternalSignalingServer(),
|
||||
user, user.getExternalSignalingServer().getExternalSignalingTicket(),
|
||||
user,
|
||||
user.getExternalSignalingServer().getExternalSignalingTicket(),
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
@ -20,9 +20,13 @@
|
||||
|
||||
package com.nextcloud.talk.utils.singletons;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.nextcloud.talk.data.user.model.User;
|
||||
|
||||
public class ApplicationWideCurrentRoomHolder {
|
||||
|
||||
public static final String TAG = "ApplicationWideCurrentRoomHolder";
|
||||
private static final ApplicationWideCurrentRoomHolder holder = new ApplicationWideCurrentRoomHolder();
|
||||
private String currentRoomId = "";
|
||||
private String currentRoomToken = "";
|
||||
@ -36,6 +40,7 @@ public class ApplicationWideCurrentRoomHolder {
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
Log.d(TAG, "ApplicationWideCurrentRoomHolder was cleared");
|
||||
currentRoomId = "";
|
||||
userInRoom = new User();
|
||||
inCall = false;
|
||||
|
@ -84,12 +84,14 @@ public class WebSocketConnectionHelper {
|
||||
|
||||
WebSocketInstance webSocketInstance;
|
||||
if (userId != -1 && webSocketInstanceMap.containsKey(user.getId()) && (webSocketInstance = webSocketInstanceMap.get(user.getId())) != null) {
|
||||
Log.d(TAG, "webSocketInstanceMap already contained webSocketInstance for userId " + user.getId());
|
||||
return webSocketInstance;
|
||||
} else {
|
||||
if (userId == -1) {
|
||||
deleteExternalSignalingInstanceForUserEntity(userId);
|
||||
}
|
||||
webSocketInstance = new WebSocketInstance(user, generatedURL, webSocketTicket);
|
||||
Log.d(TAG, "created new webSocketInstance for userId " + user.getId());
|
||||
webSocketInstanceMap.put(user.getId(), webSocketInstance);
|
||||
return webSocketInstance;
|
||||
}
|
||||
|
@ -125,6 +125,7 @@ class WebSocketInstance internal constructor(
|
||||
}
|
||||
|
||||
override fun onOpen(webSocket: WebSocket, response: Response) {
|
||||
Log.d(TAG, "Open webSocket")
|
||||
internalWebSocket = webSocket
|
||||
sendHello()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user