Update TAG usage throughout call link processors.

This commit is contained in:
Alex Hart
2023-06-05 11:43:55 -03:00
committed by Cody Henthorne
parent 1457a6fe16
commit 8f96abb41e
6 changed files with 34 additions and 14 deletions

View File

@@ -14,7 +14,11 @@ import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState
class CallLinkConnectedActionProcessor( class CallLinkConnectedActionProcessor(
actionProcessorFactory: MultiPeerActionProcessorFactory, actionProcessorFactory: MultiPeerActionProcessorFactory,
webRtcInteractor: WebRtcInteractor webRtcInteractor: WebRtcInteractor
) : GroupConnectedActionProcessor(actionProcessorFactory, webRtcInteractor) { ) : GroupConnectedActionProcessor(actionProcessorFactory, webRtcInteractor, TAG) {
companion object {
private val TAG = Log.tag(CallLinkConnectedActionProcessor::class.java)
}
override fun handleGroupRequestUpdateMembers(currentState: WebRtcServiceState): WebRtcServiceState { override fun handleGroupRequestUpdateMembers(currentState: WebRtcServiceState): WebRtcServiceState {
Log.i(tag, "handleGroupRequestUpdateMembers():") Log.i(tag, "handleGroupRequestUpdateMembers():")

View File

@@ -14,7 +14,11 @@ import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState
class CallLinkJoiningActionProcessor( class CallLinkJoiningActionProcessor(
actionProcessorFactory: MultiPeerActionProcessorFactory, actionProcessorFactory: MultiPeerActionProcessorFactory,
webRtcInteractor: WebRtcInteractor webRtcInteractor: WebRtcInteractor
) : GroupJoiningActionProcessor(actionProcessorFactory, webRtcInteractor) { ) : GroupJoiningActionProcessor(actionProcessorFactory, webRtcInteractor, TAG) {
companion object {
private val TAG = Log.tag(CallLinkJoiningActionProcessor::class.java)
}
override fun handleGroupRequestUpdateMembers(currentState: WebRtcServiceState): WebRtcServiceState { override fun handleGroupRequestUpdateMembers(currentState: WebRtcServiceState): WebRtcServiceState {
Log.i(tag, "handleGroupRequestUpdateMembers():") Log.i(tag, "handleGroupRequestUpdateMembers():")

View File

@@ -28,7 +28,7 @@ import java.io.IOException
class CallLinkPreJoinActionProcessor( class CallLinkPreJoinActionProcessor(
actionProcessorFactory: MultiPeerActionProcessorFactory, actionProcessorFactory: MultiPeerActionProcessorFactory,
webRtcInteractor: WebRtcInteractor webRtcInteractor: WebRtcInteractor
) : GroupPreJoinActionProcessor(actionProcessorFactory, webRtcInteractor) { ) : GroupPreJoinActionProcessor(actionProcessorFactory, webRtcInteractor, TAG) {
companion object { companion object {
private val TAG = Log.tag(CallLinkPreJoinActionProcessor::class.java) private val TAG = Log.tag(CallLinkPreJoinActionProcessor::class.java)

View File

@@ -35,7 +35,11 @@ public class GroupConnectedActionProcessor extends GroupActionProcessor {
private static final String TAG = Log.tag(GroupConnectedActionProcessor.class); private static final String TAG = Log.tag(GroupConnectedActionProcessor.class);
public GroupConnectedActionProcessor(@NonNull MultiPeerActionProcessorFactory actionProcessorFactory, @NonNull WebRtcInteractor webRtcInteractor) { public GroupConnectedActionProcessor(@NonNull MultiPeerActionProcessorFactory actionProcessorFactory, @NonNull WebRtcInteractor webRtcInteractor) {
super(actionProcessorFactory, webRtcInteractor, TAG); this(actionProcessorFactory, webRtcInteractor, TAG);
}
protected GroupConnectedActionProcessor(@NonNull MultiPeerActionProcessorFactory actionProcessorFactory, @NonNull WebRtcInteractor webRtcInteractor, @NonNull String tag) {
super(actionProcessorFactory, webRtcInteractor, tag);
} }
@Override @Override
@@ -76,7 +80,7 @@ public class GroupConnectedActionProcessor extends GroupActionProcessor {
@Override @Override
protected @NonNull WebRtcServiceState handleSetEnableVideo(@NonNull WebRtcServiceState currentState, boolean enable) { protected @NonNull WebRtcServiceState handleSetEnableVideo(@NonNull WebRtcServiceState currentState, boolean enable) {
Log.i(TAG, "handleSetEnableVideo():"); Log.i(tag, "handleSetEnableVideo():");
GroupCall groupCall = currentState.getCallInfoState().requireGroupCall(); GroupCall groupCall = currentState.getCallInfoState().requireGroupCall();
Camera camera = currentState.getVideoState().requireCamera(); Camera camera = currentState.getVideoState().requireCamera();
@@ -167,7 +171,7 @@ public class GroupConnectedActionProcessor extends GroupActionProcessor {
@Override @Override
protected @NonNull WebRtcServiceState handleLocalHangup(@NonNull WebRtcServiceState currentState) { protected @NonNull WebRtcServiceState handleLocalHangup(@NonNull WebRtcServiceState currentState) {
Log.i(TAG, "handleLocalHangup():"); Log.i(tag, "handleLocalHangup():");
GroupCall groupCall = currentState.getCallInfoState().requireGroupCall(); GroupCall groupCall = currentState.getCallInfoState().requireGroupCall();

View File

@@ -26,7 +26,11 @@ public class GroupJoiningActionProcessor extends GroupActionProcessor {
private static final String TAG = Log.tag(GroupJoiningActionProcessor.class); private static final String TAG = Log.tag(GroupJoiningActionProcessor.class);
public GroupJoiningActionProcessor(@NonNull MultiPeerActionProcessorFactory actionProcessorFactory, @NonNull WebRtcInteractor webRtcInteractor) { public GroupJoiningActionProcessor(@NonNull MultiPeerActionProcessorFactory actionProcessorFactory, @NonNull WebRtcInteractor webRtcInteractor) {
super(actionProcessorFactory, webRtcInteractor, TAG); this(actionProcessorFactory, webRtcInteractor, TAG);
}
protected GroupJoiningActionProcessor(@NonNull MultiPeerActionProcessorFactory actionProcessorFactory, @NonNull WebRtcInteractor webRtcInteractor, @NonNull String tag) {
super(actionProcessorFactory, webRtcInteractor, tag);
} }
@Override @Override

View File

@@ -34,12 +34,16 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
private static final String TAG = Log.tag(GroupPreJoinActionProcessor.class); private static final String TAG = Log.tag(GroupPreJoinActionProcessor.class);
public GroupPreJoinActionProcessor(@NonNull MultiPeerActionProcessorFactory actionProcessorFactory, @NonNull WebRtcInteractor webRtcInteractor) { public GroupPreJoinActionProcessor(@NonNull MultiPeerActionProcessorFactory actionProcessorFactory, @NonNull WebRtcInteractor webRtcInteractor) {
super(actionProcessorFactory, webRtcInteractor, TAG); this(actionProcessorFactory, webRtcInteractor, TAG);
}
protected GroupPreJoinActionProcessor(@NonNull MultiPeerActionProcessorFactory actionProcessorFactory, @NonNull WebRtcInteractor webRtcInteractor, @NonNull String tag) {
super(actionProcessorFactory, webRtcInteractor, tag);
} }
@Override @Override
protected @NonNull WebRtcServiceState handlePreJoinCall(@NonNull WebRtcServiceState currentState, @NonNull RemotePeer remotePeer) { protected @NonNull WebRtcServiceState handlePreJoinCall(@NonNull WebRtcServiceState currentState, @NonNull RemotePeer remotePeer) {
Log.i(TAG, "handlePreJoinCall():"); Log.i(tag, "handlePreJoinCall():");
byte[] groupId = currentState.getCallInfoState().getCallRecipient().requireGroupId().getDecodedId(); byte[] groupId = currentState.getCallInfoState().getCallRecipient().requireGroupId().getDecodedId();
GroupCall groupCall = webRtcInteractor.getCallManager().createGroupCall(groupId, GroupCall groupCall = webRtcInteractor.getCallManager().createGroupCall(groupId,
@@ -54,7 +58,7 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
groupCall.setOutgoingVideoMuted(true); groupCall.setOutgoingVideoMuted(true);
groupCall.setDataMode(NetworkUtil.getCallingDataMode(context, groupCall.getLocalDeviceState().getNetworkRoute().getLocalAdapterType())); groupCall.setDataMode(NetworkUtil.getCallingDataMode(context, groupCall.getLocalDeviceState().getNetworkRoute().getLocalAdapterType()));
Log.i(TAG, "Connecting to group call: " + currentState.getCallInfoState().getCallRecipient().getId()); Log.i(tag, "Connecting to group call: " + currentState.getCallInfoState().getCallRecipient().getId());
groupCall.connect(); groupCall.connect();
} catch (CallException e) { } catch (CallException e) {
return groupCallFailure(currentState, "Unable to connect to group call", e); return groupCallFailure(currentState, "Unable to connect to group call", e);
@@ -71,7 +75,7 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
@Override @Override
protected @NonNull WebRtcServiceState handleCancelPreJoinCall(@NonNull WebRtcServiceState currentState) { protected @NonNull WebRtcServiceState handleCancelPreJoinCall(@NonNull WebRtcServiceState currentState) {
Log.i(TAG, "handleCancelPreJoinCall():"); Log.i(tag, "handleCancelPreJoinCall():");
GroupCall groupCall = currentState.getCallInfoState().requireGroupCall(); GroupCall groupCall = currentState.getCallInfoState().requireGroupCall();
try { try {
@@ -148,7 +152,7 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
@NonNull RemotePeer remotePeer, @NonNull RemotePeer remotePeer,
@NonNull OfferMessage.Type offerType) @NonNull OfferMessage.Type offerType)
{ {
Log.i(TAG, "handleOutgoingCall():"); Log.i(tag, "handleOutgoingCall():");
GroupCall groupCall = currentState.getCallInfoState().requireGroupCall(); GroupCall groupCall = currentState.getCallInfoState().requireGroupCall();
@@ -181,7 +185,7 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
@Override @Override
protected @NonNull WebRtcServiceState handleSetEnableVideo(@NonNull WebRtcServiceState currentState, boolean enable) { protected @NonNull WebRtcServiceState handleSetEnableVideo(@NonNull WebRtcServiceState currentState, boolean enable) {
Log.i(TAG, "handleSetEnableVideo(): Changing for pre-join group call. enable: " + enable); Log.i(tag, "handleSetEnableVideo(): Changing for pre-join group call. enable: " + enable);
currentState.getVideoState().requireCamera().setEnabled(enable); currentState.getVideoState().requireCamera().setEnabled(enable);
return currentState.builder() return currentState.builder()
@@ -195,7 +199,7 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
@Override @Override
protected @NonNull WebRtcServiceState handleSetMuteAudio(@NonNull WebRtcServiceState currentState, boolean muted) { protected @NonNull WebRtcServiceState handleSetMuteAudio(@NonNull WebRtcServiceState currentState, boolean muted) {
Log.i(TAG, "handleSetMuteAudio(): Changing for pre-join group call. muted: " + muted); Log.i(tag, "handleSetMuteAudio(): Changing for pre-join group call. muted: " + muted);
return currentState.builder() return currentState.builder()
.changeLocalDeviceState() .changeLocalDeviceState()