Introduce additional logging for group call updates.
This commit is contained in:
parent
54bbe48869
commit
148b40e4ff
1 changed files with 9 additions and 0 deletions
|
@ -812,14 +812,18 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
|
||||||
peekJoinedUuids: Collection<UUID>,
|
peekJoinedUuids: Collection<UUID>,
|
||||||
isCallFull: Boolean
|
isCallFull: Boolean
|
||||||
) {
|
) {
|
||||||
|
Log.d(TAG, "Updating group call from peek.")
|
||||||
val callId = peekGroupCallEraId?.let { CallId.fromEra(it) }
|
val callId = peekGroupCallEraId?.let { CallId.fromEra(it) }
|
||||||
val recipientId = SignalDatabase.threads.getRecipientIdForThreadId(threadId)
|
val recipientId = SignalDatabase.threads.getRecipientIdForThreadId(threadId)
|
||||||
val call = if (callId != null && recipientId != null) {
|
val call = if (callId != null && recipientId != null) {
|
||||||
|
Log.d(TAG, "Found local call event.")
|
||||||
getCallById(callId.longValue(), recipientId)
|
getCallById(callId.longValue(), recipientId)
|
||||||
} else {
|
} else {
|
||||||
|
Log.d(TAG, "Did not find local call event.")
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log.d(TAG, "Updating message database record.")
|
||||||
SignalDatabase.messages.updatePreviousGroupCall(
|
SignalDatabase.messages.updatePreviousGroupCall(
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
peekGroupCallEraId = peekGroupCallEraId,
|
peekGroupCallEraId = peekGroupCallEraId,
|
||||||
|
@ -829,8 +833,11 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
|
||||||
)
|
)
|
||||||
|
|
||||||
if (call != null) {
|
if (call != null) {
|
||||||
|
Log.d(TAG, "Updating call database record.")
|
||||||
updateGroupCallState(call, peekJoinedUuids)
|
updateGroupCallState(call, peekJoinedUuids)
|
||||||
AppDependencies.databaseObserver.notifyCallUpdateObservers()
|
AppDependencies.databaseObserver.notifyCallUpdateObservers()
|
||||||
|
} else {
|
||||||
|
Log.d(TAG, "No call database record to update!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -886,6 +893,8 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
|
||||||
): Boolean {
|
): Boolean {
|
||||||
val localJoined = call.didLocalUserJoin || hasLocalUserJoined
|
val localJoined = call.didLocalUserJoin || hasLocalUserJoined
|
||||||
|
|
||||||
|
Log.d(TAG, "Updating group call state: localJoined: $localJoined, isGroupCallActive: $isGroupCallActive")
|
||||||
|
|
||||||
return writableDatabase.update(TABLE_NAME)
|
return writableDatabase.update(TABLE_NAME)
|
||||||
.values(
|
.values(
|
||||||
LOCAL_JOINED to localJoined,
|
LOCAL_JOINED to localJoined,
|
||||||
|
|
Loading…
Add table
Reference in a new issue