mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-19 10:45:13 +01:00
parent
bd15829b6a
commit
3d1f088674
@ -221,7 +221,9 @@ public class CallController extends BaseController {
|
|||||||
|
|
||||||
private boolean isMultiSession = false;
|
private boolean isMultiSession = false;
|
||||||
private boolean hasChatSupport = false;
|
private boolean hasChatSupport = false;
|
||||||
private boolean isVoiceOnlyCall = false;
|
private boolean needsPing = true;
|
||||||
|
|
||||||
|
private boolean isVoiceOnlyCall;
|
||||||
private boolean isFromNotification;
|
private boolean isFromNotification;
|
||||||
private Handler handler = new Handler();
|
private Handler handler = new Handler();
|
||||||
|
|
||||||
@ -946,6 +948,15 @@ public class CallController extends BaseController {
|
|||||||
.getCapabilities().getSpreedCapability()
|
.getCapabilities().getSpreedCapability()
|
||||||
.getFeatures().contains("chat-v2");
|
.getFeatures().contains("chat-v2");
|
||||||
|
|
||||||
|
needsPing = !(capabilitiesOverall.getOcs().getData()
|
||||||
|
.getCapabilities() != null && capabilitiesOverall.getOcs().getData()
|
||||||
|
.getCapabilities().getSpreedCapability() != null &&
|
||||||
|
capabilitiesOverall.getOcs().getData()
|
||||||
|
.getCapabilities().getSpreedCapability()
|
||||||
|
.getFeatures() != null && capabilitiesOverall.getOcs().getData()
|
||||||
|
.getCapabilities().getSpreedCapability()
|
||||||
|
.getFeatures().contains("no-ping"));
|
||||||
|
|
||||||
joinRoomAndCall();
|
joinRoomAndCall();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1026,6 +1037,7 @@ public class CallController extends BaseController {
|
|||||||
ApplicationWideCurrentRoomHolder.getInstance().setInCall(true);
|
ApplicationWideCurrentRoomHolder.getInstance().setInCall(true);
|
||||||
ApplicationWideCurrentRoomHolder.getInstance().setUserInRoom(userEntity);
|
ApplicationWideCurrentRoomHolder.getInstance().setUserInRoom(userEntity);
|
||||||
|
|
||||||
|
if (needsPing) {
|
||||||
ncApi.pingCall(credentials, ApiUtils.getUrlForCallPing(baseUrl, roomToken))
|
ncApi.pingCall(credentials, ApiUtils.getUrlForCallPing(baseUrl, roomToken))
|
||||||
.subscribeOn(Schedulers.newThread())
|
.subscribeOn(Schedulers.newThread())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
@ -1053,6 +1065,7 @@ public class CallController extends BaseController {
|
|||||||
dispose(pingDisposable);
|
dispose(pingDisposable);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Start pulling signaling messages
|
// Start pulling signaling messages
|
||||||
String urlToken = null;
|
String urlToken = null;
|
||||||
|
@ -214,6 +214,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
if (args.containsKey(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL)) {
|
if (args.containsKey(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL)) {
|
||||||
this.startCallFromNotification = args.getBoolean(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL);
|
this.startCallFromNotification = args.getBoolean(BundleKeys.KEY_FROM_NOTIFICATION_START_CALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.voiceOnly = args.getBoolean(BundleKeys.KEY_CALL_VOICE_ONLY, false);
|
this.voiceOnly = args.getBoolean(BundleKeys.KEY_CALL_VOICE_ONLY, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -473,6 +474,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startPing() {
|
private void startPing() {
|
||||||
|
if (!conversationUser.hasSpreedCapabilityWithName("no-ping")) {
|
||||||
ncApi.pingCall(credentials, ApiUtils.getUrlForCallPing(baseUrl, roomToken))
|
ncApi.pingCall(credentials, ApiUtils.getUrlForCallPing(baseUrl, roomToken))
|
||||||
.subscribeOn(Schedulers.newThread())
|
.subscribeOn(Schedulers.newThread())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
@ -498,7 +500,7 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnClick(R.id.emptyLayout)
|
@OnClick(R.id.emptyLayout)
|
||||||
|
Loading…
Reference in New Issue
Block a user