Skip to content

Commit

Permalink
pass false to "all" parameter
Browse files Browse the repository at this point in the history
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
  • Loading branch information
sowjanyakch committed Oct 29, 2024
1 parent c2f0448 commit b524ac6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,15 @@ class CallActivity : CallBaseActivity() {

override fun onCallEndedForAll() {
Log.d(TAG, "A moderator ended the call for all.")
hangup(true, null)
hangup(true, false)
}
}
private var callParticipantList: CallParticipantList? = null
private var switchToRoomToken = ""
private var isBreakoutRoom = false
private val localParticipantMessageListener = LocalParticipantMessageListener { token ->
switchToRoomToken = token
hangup(true, null)
hangup(true, false)
}
private val offerMessageListener = OfferMessageListener { sessionId, roomType, sdp, nick ->
getOrCreatePeerConnectionWrapperForSessionIdAndType(
Expand Down Expand Up @@ -505,7 +505,7 @@ class CallActivity : CallBaseActivity() {
}
.setNegativeButton(R.string.nc_no) { _, _ ->
recordingConsentGiven = false
hangup(true, null)
hangup(true, false)
}

viewThemeUtils.dialog.colorMaterialAlertDialogBackground(this, materialAlertDialogBuilder)
Expand Down Expand Up @@ -678,7 +678,7 @@ class CallActivity : CallBaseActivity() {

if (isGroupConversation) {
binding!!.hangupButton.setOnClickListener {
hangup(true, null)
hangup(true, false)
}
}

Expand All @@ -690,7 +690,7 @@ class CallActivity : CallBaseActivity() {

if (isOneToOneConversation) {
binding!!.hangupButton.setOnLongClickListener {
hangup(true, null)
hangup(true, false)
true
}
}
Expand Down Expand Up @@ -718,7 +718,7 @@ class CallActivity : CallBaseActivity() {
binding!!.callStates.callStateRelativeLayout.setOnClickListener {
if (currentCallStatus === CallStatus.CALLING_TIMEOUT) {
setCallState(CallStatus.RECONNECTING)
hangupNetworkCalls(false, null)
hangupNetworkCalls(false, false)
}
}
binding!!.callRecordingIndicator.setOnClickListener {
Expand Down Expand Up @@ -1513,7 +1513,7 @@ class CallActivity : CallBaseActivity() {
Log.d(TAG, "localStream is null")
}
if (currentCallStatus !== CallStatus.LEAVING) {
hangup(true, null)
hangup(true, false)
}
powerManagerUtils!!.updatePhoneState(PowerManagerUtils.PhoneState.IDLE)
super.onDestroy()
Expand Down Expand Up @@ -1797,7 +1797,7 @@ class CallActivity : CallBaseActivity() {
override fun onError(e: Throwable) {
Log.e(TAG, "Failed to join call", e)
Snackbar.make(binding!!.root, R.string.nc_common_error_sorry, Snackbar.LENGTH_LONG).show()
hangup(true, null)
hangup(true, false)
}

override fun onComplete() {
Expand Down Expand Up @@ -1948,7 +1948,7 @@ class CallActivity : CallBaseActivity() {
Log.d(TAG, "onMessageEvent 'hello'")
if (!webSocketCommunicationEvent.getHashMap()!!.containsKey("oldResumeId")) {
if (currentCallStatus === CallStatus.RECONNECTING) {
hangup(false, null)
hangup(false, false)
} else {
setCallState(CallStatus.RECONNECTING)
runOnUiThread { initiateCall() }
Expand Down Expand Up @@ -2024,7 +2024,7 @@ class CallActivity : CallBaseActivity() {
}
}

private fun hangup(shutDownView: Boolean, endCallForAll: Boolean?) {
private fun hangup(shutDownView: Boolean, endCallForAll: Boolean) {
Log.d(TAG, "hangup! shutDownView=$shutDownView")
if (shutDownView) {
setCallState(CallStatus.LEAVING)
Expand Down Expand Up @@ -2092,7 +2092,7 @@ class CallActivity : CallBaseActivity() {
hangupNetworkCalls(shutDownView, endCallForAll)
}

private fun hangupNetworkCalls(shutDownView: Boolean, endCallForAll: Boolean?) {
private fun hangupNetworkCalls(shutDownView: Boolean, endCallForAll: Boolean) {
Log.d(TAG, "hangupNetworkCalls. shutDownView=$shutDownView")
val apiVersion = ApiUtils.getCallApiVersion(conversationUser, intArrayOf(ApiUtils.API_V4, 1))
if (callParticipantList != null) {
Expand Down Expand Up @@ -2194,7 +2194,7 @@ class CallActivity : CallBaseActivity() {
ApplicationWideCurrentRoomHolder.getInstance().isInCall
) {
Log.d(TAG, "Most probably a moderator ended the call for all.")
hangup(true, null)
hangup(true, false)
return
}

Expand Down Expand Up @@ -2321,7 +2321,7 @@ class CallActivity : CallBaseActivity() {
context.resources.getString(R.string.nc_common_error_sorry),
Snackbar.LENGTH_LONG
).show()
hangup(true, null)
hangup(true, false)
return null
}
peerConnectionWrapper = if (hasMCU && publisher) {
Expand Down Expand Up @@ -2637,7 +2637,7 @@ class CallActivity : CallBaseActivity() {
}

CallStatus.CALLING_TIMEOUT -> handler!!.post {
hangup(false, null)
hangup(false, false)
binding!!.callStates.callStateTextView.setText(R.string.nc_call_timeout)
binding!!.callModeTextView.text = descriptionForCallType
if (binding!!.callStates.callStateRelativeLayout.visibility != View.VISIBLE) {
Expand Down Expand Up @@ -2907,7 +2907,7 @@ class CallActivity : CallBaseActivity() {
if (iceConnectionState == IceConnectionState.FAILED) {
setCallState(CallStatus.PUBLISHER_FAILED)
webSocketClient!!.clearResumeId()
hangup(false, null)
hangup(false, false)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/nextcloud/talk/api/NcApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Observable<GenericOverall> joinCall(@Nullable @Header("Authorization") String au
*/
@DELETE
Observable<GenericOverall> leaveCall(@Nullable @Header("Authorization") String authorization, @Url String url,
@Nullable @Query("all") Boolean all);
@Query("all") Boolean all);

@GET
Observable<SignalingSettingsOverall> getSignalingSettings(@Nullable @Header("Authorization") String authorization,
Expand Down

0 comments on commit b524ac6

Please sign in to comment.