mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
add logging and comments
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
2c1b45491d
commit
e0e3bf4c32
@ -1252,9 +1252,16 @@ public class CallController extends BaseController {
|
|||||||
|
|
||||||
int apiVersion = ApiUtils.getConversationApiVersion(conversationUser, new int[] {ApiUtils.APIv4, 1});
|
int apiVersion = ApiUtils.getConversationApiVersion(conversationUser, new int[] {ApiUtils.APIv4, 1});
|
||||||
|
|
||||||
|
Log.d(TAG, "joinRoomAndCall");
|
||||||
|
Log.d(TAG, " baseUrl= " + baseUrl);
|
||||||
|
Log.d(TAG, " roomToken= " + roomToken);
|
||||||
|
Log.d(TAG, " callSession= " + callSession);
|
||||||
|
|
||||||
|
String url = ApiUtils.getUrlForParticipantsActive(apiVersion, baseUrl, roomToken);
|
||||||
|
Log.d(TAG, " url= " + url);
|
||||||
|
|
||||||
if (TextUtils.isEmpty(callSession)) {
|
if (TextUtils.isEmpty(callSession)) {
|
||||||
ncApi.joinRoom(credentials, ApiUtils.getUrlForParticipantsActive(apiVersion, baseUrl, roomToken),
|
ncApi.joinRoom(credentials, url, conversationPassword)
|
||||||
conversationPassword)
|
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.retry(3)
|
.retry(3)
|
||||||
@ -1267,6 +1274,8 @@ public class CallController extends BaseController {
|
|||||||
@Override
|
@Override
|
||||||
public void onNext(@io.reactivex.annotations.NonNull RoomOverall roomOverall) {
|
public void onNext(@io.reactivex.annotations.NonNull RoomOverall roomOverall) {
|
||||||
callSession = roomOverall.getOcs().getData().getSessionId();
|
callSession = roomOverall.getOcs().getData().getSessionId();
|
||||||
|
Log.d(TAG, " new callSession by joinRoom= " + callSession);
|
||||||
|
|
||||||
ApplicationWideCurrentRoomHolder.getInstance().setSession(callSession);
|
ApplicationWideCurrentRoomHolder.getInstance().setSession(callSession);
|
||||||
ApplicationWideCurrentRoomHolder.getInstance().setCurrentRoomId(roomId);
|
ApplicationWideCurrentRoomHolder.getInstance().setCurrentRoomId(roomId);
|
||||||
ApplicationWideCurrentRoomHolder.getInstance().setCurrentRoomToken(roomToken);
|
ApplicationWideCurrentRoomHolder.getInstance().setCurrentRoomToken(roomToken);
|
||||||
@ -1276,12 +1285,12 @@ public class CallController extends BaseController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
|
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
|
||||||
// unused atm
|
Log.e(TAG, "joinRoom onError", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
// unused atm
|
Log.d(TAG, "joinRoom onComplete");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -1640,6 +1649,7 @@ public class CallController extends BaseController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: why is this never called?!
|
||||||
private void leaveRoom(boolean shutDownView) {
|
private void leaveRoom(boolean shutDownView) {
|
||||||
int apiVersion = ApiUtils.getConversationApiVersion(conversationUser, new int[] {ApiUtils.APIv4, 1});
|
int apiVersion = ApiUtils.getConversationApiVersion(conversationUser, new int[] {ApiUtils.APIv4, 1});
|
||||||
|
|
||||||
|
@ -315,7 +315,8 @@ public class CallNotificationController extends BaseController {
|
|||||||
conversationNameTextView.setText(currentConversation.getDisplayName());
|
conversationNameTextView.setText(currentConversation.getDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
loadAvatar();
|
// TODO: load avatar, but don't block UI!
|
||||||
|
// loadAvatar();
|
||||||
checkIfAnyParticipantsRemainInRoom();
|
checkIfAnyParticipantsRemainInRoom();
|
||||||
showAnswerControls();
|
showAnswerControls();
|
||||||
}
|
}
|
||||||
|
@ -269,6 +269,8 @@ class ChatController(args: Bundle) :
|
|||||||
this.roomToken = args.getString(KEY_ROOM_TOKEN, "")
|
this.roomToken = args.getString(KEY_ROOM_TOKEN, "")
|
||||||
this.sharedText = args.getString(BundleKeys.KEY_SHARED_TEXT, "")
|
this.sharedText = args.getString(BundleKeys.KEY_SHARED_TEXT, "")
|
||||||
|
|
||||||
|
Log.d(TAG, "roomToken = " + roomToken)
|
||||||
|
|
||||||
if (args.containsKey(KEY_ACTIVE_CONVERSATION)) {
|
if (args.containsKey(KEY_ACTIVE_CONVERSATION)) {
|
||||||
this.currentConversation = Parcels.unwrap<Conversation>(args.getParcelable(KEY_ACTIVE_CONVERSATION))
|
this.currentConversation = Parcels.unwrap<Conversation>(args.getParcelable(KEY_ACTIVE_CONVERSATION))
|
||||||
}
|
}
|
||||||
@ -289,6 +291,7 @@ class ChatController(args: Bundle) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getRoomInfo() {
|
private fun getRoomInfo() {
|
||||||
|
Log.d(TAG, "getRoomInfo")
|
||||||
val shouldRepeat = CapabilitiesUtil.hasSpreedFeatureCapability(conversationUser, "webinary-lobby")
|
val shouldRepeat = CapabilitiesUtil.hasSpreedFeatureCapability(conversationUser, "webinary-lobby")
|
||||||
if (shouldRepeat) {
|
if (shouldRepeat) {
|
||||||
checkingLobbyStatus = true
|
checkingLobbyStatus = true
|
||||||
@ -308,6 +311,8 @@ class ChatController(args: Bundle) :
|
|||||||
@Suppress("Detekt.TooGenericExceptionCaught")
|
@Suppress("Detekt.TooGenericExceptionCaught")
|
||||||
override fun onNext(roomOverall: RoomOverall) {
|
override fun onNext(roomOverall: RoomOverall) {
|
||||||
currentConversation = roomOverall.ocs.data
|
currentConversation = roomOverall.ocs.data
|
||||||
|
Log.d(TAG, "currentConversation.toString : " + currentConversation.toString())
|
||||||
|
Log.d(TAG, "currentConversation.sessionId : " + currentConversation?.sessionId)
|
||||||
loadAvatarForStatusBar()
|
loadAvatarForStatusBar()
|
||||||
|
|
||||||
setTitle()
|
setTitle()
|
||||||
@ -419,6 +424,7 @@ class ChatController(args: Bundle) :
|
|||||||
|
|
||||||
override fun onViewBound(view: View) {
|
override fun onViewBound(view: View) {
|
||||||
actionBar?.show()
|
actionBar?.show()
|
||||||
|
Log.d(TAG, "onViewBound")
|
||||||
var adapterWasNull = false
|
var adapterWasNull = false
|
||||||
|
|
||||||
if (adapter == null) {
|
if (adapter == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user