mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 20:06:51 +03:00
Cleanup during review.
This commit is contained in:
parent
4c34d73501
commit
16f32da647
32 changed files with 97 additions and 303 deletions
|
@ -163,7 +163,7 @@ dependencies {
|
||||||
implementation 'com.googlecode.libphonenumber:libphonenumber:8.10.23'
|
implementation 'com.googlecode.libphonenumber:libphonenumber:8.10.23'
|
||||||
|
|
||||||
// Web RTC
|
// Web RTC
|
||||||
// TODO meant for development purposes only
|
// TODO meant for development purposes only. See http://webrtc.github.io/webrtc-org/native-code/android/
|
||||||
implementation 'org.webrtc:google-webrtc:1.0.+'
|
implementation 'org.webrtc:google-webrtc:1.0.+'
|
||||||
|
|
||||||
debugImplementation 'com.airbnb.okreplay:okreplay:1.5.0'
|
debugImplementation 'com.airbnb.okreplay:okreplay:1.5.0'
|
||||||
|
|
|
@ -22,32 +22,21 @@ import im.vector.matrix.android.api.session.room.model.call.CallHangupContent
|
||||||
import im.vector.matrix.android.api.session.room.model.call.CallInviteContent
|
import im.vector.matrix.android.api.session.room.model.call.CallInviteContent
|
||||||
|
|
||||||
interface CallsListener {
|
interface CallsListener {
|
||||||
// /**
|
/**
|
||||||
// * Called when there is an incoming call within the room.
|
* Called when there is an incoming call within the room.
|
||||||
// * @param peerSignalingClient the incoming call
|
*/
|
||||||
// */
|
|
||||||
// fun onIncomingCall(peerSignalingClient: PeerSignalingClient)
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * An outgoing call is started.
|
|
||||||
// *
|
|
||||||
// * @param peerSignalingClient the outgoing call
|
|
||||||
// */
|
|
||||||
// fun onOutgoingCall(peerSignalingClient: PeerSignalingClient)
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * Called when a called has been hung up
|
|
||||||
// *
|
|
||||||
// * @param peerSignalingClient the incoming call
|
|
||||||
// */
|
|
||||||
// fun onCallHangUp(peerSignalingClient: PeerSignalingClient)
|
|
||||||
|
|
||||||
fun onCallInviteReceived(mxCall: MxCall, callInviteContent: CallInviteContent)
|
fun onCallInviteReceived(mxCall: MxCall, callInviteContent: CallInviteContent)
|
||||||
|
|
||||||
fun onCallIceCandidateReceived(mxCall: MxCall, iceCandidatesContent: CallCandidatesContent)
|
fun onCallIceCandidateReceived(mxCall: MxCall, iceCandidatesContent: CallCandidatesContent)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An outgoing call is started.
|
||||||
|
*/
|
||||||
fun onCallAnswerReceived(callAnswerContent: CallAnswerContent)
|
fun onCallAnswerReceived(callAnswerContent: CallAnswerContent)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when a called has been hung up
|
||||||
|
*/
|
||||||
fun onCallHangupReceived(callHangupContent: CallHangupContent)
|
fun onCallHangupReceived(callHangupContent: CallHangupContent)
|
||||||
|
|
||||||
fun onCallManagedByOtherSession(callId: String)
|
fun onCallManagedByOtherSession(callId: String)
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2020 New Vector Ltd
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package im.vector.matrix.android.api.session.call
|
|
||||||
|
|
||||||
import org.webrtc.IceCandidate
|
|
||||||
import org.webrtc.PeerConnection.IceServer
|
|
||||||
import org.webrtc.SessionDescription
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Struct holding the connection parameters of an AppRTC room.
|
|
||||||
*/
|
|
||||||
data class RoomConnectionParameters(
|
|
||||||
val callId: String,
|
|
||||||
val matrixRoomId: String
|
|
||||||
)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Struct holding the signaling parameters of an AppRTC room.
|
|
||||||
*/
|
|
||||||
data class SignalingParameters(
|
|
||||||
val iceServers: List<IceServer>,
|
|
||||||
val initiator: Boolean,
|
|
||||||
val clientId: String,
|
|
||||||
val offerSdp: SessionDescription,
|
|
||||||
val iceCandidates: List<IceCandidate>
|
|
||||||
)
|
|
|
@ -19,10 +19,29 @@ package im.vector.matrix.android.api.session.call
|
||||||
import com.squareup.moshi.Json
|
import com.squareup.moshi.Json
|
||||||
import com.squareup.moshi.JsonClass
|
import com.squareup.moshi.JsonClass
|
||||||
|
|
||||||
|
// TODO Should not be exposed
|
||||||
|
/**
|
||||||
|
* Ref: https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-voip-turnserver
|
||||||
|
*/
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
data class TurnServerResponse(
|
data class TurnServerResponse(
|
||||||
|
/**
|
||||||
|
* Required. The username to use.
|
||||||
|
*/
|
||||||
@Json(name = "username") val username: String?,
|
@Json(name = "username") val username: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Required. The password to use.
|
||||||
|
*/
|
||||||
@Json(name = "password") val password: String?,
|
@Json(name = "password") val password: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Required. A list of TURN URIs
|
||||||
|
*/
|
||||||
@Json(name = "uris") val uris: List<String>?,
|
@Json(name = "uris") val uris: List<String>?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Required. The time-to-live in seconds
|
||||||
|
*/
|
||||||
@Json(name = "ttl") val ttl: Int?
|
@Json(name = "ttl") val ttl: Int?
|
||||||
)
|
)
|
||||||
|
|
|
@ -246,11 +246,11 @@ internal abstract class SessionModule {
|
||||||
|
|
||||||
@Binds
|
@Binds
|
||||||
@IntoSet
|
@IntoSet
|
||||||
abstract fun bindCallEventObserver(callEventObserver: CallEventObserver): LiveEntityObserver
|
abstract fun bindCallEventObserver(observer: CallEventObserver): LiveEntityObserver
|
||||||
|
|
||||||
@Binds
|
@Binds
|
||||||
@IntoSet
|
@IntoSet
|
||||||
abstract fun bindRoomTombstoneEventLiveObserver(roomTombstoneEventLiveObserver: RoomTombstoneEventLiveObserver): LiveEntityObserver
|
abstract fun bindRoomTombstoneEventLiveObserver(observer: RoomTombstoneEventLiveObserver): LiveEntityObserver
|
||||||
|
|
||||||
@Binds
|
@Binds
|
||||||
@IntoSet
|
@IntoSet
|
||||||
|
|
|
@ -34,8 +34,8 @@ import javax.inject.Inject
|
||||||
internal class CallEventObserver @Inject constructor(
|
internal class CallEventObserver @Inject constructor(
|
||||||
@SessionDatabase realmConfiguration: RealmConfiguration,
|
@SessionDatabase realmConfiguration: RealmConfiguration,
|
||||||
@UserId private val userId: String,
|
@UserId private val userId: String,
|
||||||
private val task: CallEventsObserverTask) :
|
private val task: CallEventsObserverTask
|
||||||
RealmLiveEntityObserver<EventEntity>(realmConfiguration) {
|
) : RealmLiveEntityObserver<EventEntity>(realmConfiguration) {
|
||||||
|
|
||||||
override val query = Monarchy.Query<EventEntity> {
|
override val query = Monarchy.Query<EventEntity> {
|
||||||
EventEntity.whereTypes(it, listOf(
|
EventEntity.whereTypes(it, listOf(
|
||||||
|
|
|
@ -20,7 +20,6 @@ import dagger.Binds
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
import dagger.Provides
|
import dagger.Provides
|
||||||
import im.vector.matrix.android.api.session.call.CallSignalingService
|
import im.vector.matrix.android.api.session.call.CallSignalingService
|
||||||
import im.vector.matrix.android.api.session.call.VoipApi
|
|
||||||
import im.vector.matrix.android.internal.session.SessionScope
|
import im.vector.matrix.android.internal.session.SessionScope
|
||||||
import retrofit2.Retrofit
|
import retrofit2.Retrofit
|
||||||
|
|
||||||
|
@ -38,8 +37,11 @@ internal abstract class CallModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Binds
|
@Binds
|
||||||
abstract fun bindCallService(service:DefaultCallSignalingService): CallSignalingService
|
abstract fun bindCallSignalingService(service: DefaultCallSignalingService): CallSignalingService
|
||||||
|
|
||||||
@Binds
|
@Binds
|
||||||
abstract fun bindTurnServerTask(task: DefaultGetTurnServerTask): GetTurnServerTask
|
abstract fun bindGetTurnServerTask(task: DefaultGetTurnServerTask): GetTurnServerTask
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
abstract fun bindCallEventsObserverTask(task: DefaultCallEventsObserverTask): CallEventsObserverTask
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
package im.vector.matrix.android.internal.session.call
|
package im.vector.matrix.android.internal.session.call
|
||||||
|
|
||||||
import im.vector.matrix.android.api.session.call.TurnServerResponse
|
import im.vector.matrix.android.api.session.call.TurnServerResponse
|
||||||
import im.vector.matrix.android.api.session.call.VoipApi
|
|
||||||
import im.vector.matrix.android.internal.network.executeRequest
|
import im.vector.matrix.android.internal.network.executeRequest
|
||||||
import im.vector.matrix.android.internal.task.Task
|
import im.vector.matrix.android.internal.task.Task
|
||||||
import org.greenrobot.eventbus.EventBus
|
import org.greenrobot.eventbus.EventBus
|
||||||
|
@ -28,7 +27,7 @@ internal abstract class GetTurnServerTask : Task<GetTurnServerTask.Params, TurnS
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class DefaultGetTurnServerTask @Inject constructor(private val voipAPI: VoipApi,
|
internal class DefaultGetTurnServerTask @Inject constructor(private val voipAPI: VoipApi,
|
||||||
private val eventBus: EventBus) : GetTurnServerTask() {
|
private val eventBus: EventBus) : GetTurnServerTask() {
|
||||||
|
|
||||||
override suspend fun execute(params: Params): TurnServerResponse {
|
override suspend fun execute(params: Params): TurnServerResponse {
|
||||||
return executeRequest(eventBus) {
|
return executeRequest(eventBus) {
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package im.vector.matrix.android.api.session.call
|
package im.vector.matrix.android.internal.session.call
|
||||||
|
|
||||||
|
import im.vector.matrix.android.api.session.call.TurnServerResponse
|
||||||
import im.vector.matrix.android.internal.network.NetworkConstants
|
import im.vector.matrix.android.internal.network.NetworkConstants
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
import retrofit2.http.GET
|
import retrofit2.http.GET
|
||||||
|
|
||||||
// TODO Move to internal
|
|
||||||
internal interface VoipApi {
|
internal interface VoipApi {
|
||||||
|
|
||||||
@GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "voip/turnServer")
|
@GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "voip/turnServer")
|
|
@ -24,8 +24,6 @@ import im.vector.matrix.android.api.session.room.RoomDirectoryService
|
||||||
import im.vector.matrix.android.api.session.room.RoomService
|
import im.vector.matrix.android.api.session.room.RoomService
|
||||||
import im.vector.matrix.android.internal.session.DefaultFileService
|
import im.vector.matrix.android.internal.session.DefaultFileService
|
||||||
import im.vector.matrix.android.internal.session.SessionScope
|
import im.vector.matrix.android.internal.session.SessionScope
|
||||||
import im.vector.matrix.android.internal.session.call.CallEventsObserverTask
|
|
||||||
import im.vector.matrix.android.internal.session.call.DefaultCallEventsObserverTask
|
|
||||||
import im.vector.matrix.android.internal.session.room.alias.DefaultGetRoomIdByAliasTask
|
import im.vector.matrix.android.internal.session.room.alias.DefaultGetRoomIdByAliasTask
|
||||||
import im.vector.matrix.android.internal.session.room.alias.GetRoomIdByAliasTask
|
import im.vector.matrix.android.internal.session.room.alias.GetRoomIdByAliasTask
|
||||||
import im.vector.matrix.android.internal.session.room.create.CreateRoomTask
|
import im.vector.matrix.android.internal.session.room.create.CreateRoomTask
|
||||||
|
@ -203,8 +201,4 @@ internal abstract class RoomModule {
|
||||||
|
|
||||||
@Binds
|
@Binds
|
||||||
abstract fun bindDeleteTagFromRoomTask(task: DefaultDeleteTagFromRoomTask): DeleteTagFromRoomTask
|
abstract fun bindDeleteTagFromRoomTask(task: DefaultDeleteTagFromRoomTask): DeleteTagFromRoomTask
|
||||||
|
|
||||||
// TODO is this in the correct module?
|
|
||||||
@Binds
|
|
||||||
abstract fun bindCallEventsObserverTask(task: DefaultCallEventsObserverTask): CallEventsObserverTask
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,9 +41,10 @@
|
||||||
<string name="notice_room_name_changed_by_you">You changed the room name to: %1$s</string>
|
<string name="notice_room_name_changed_by_you">You changed the room name to: %1$s</string>
|
||||||
<string name="notice_placed_video_call">%s placed a video call.</string>
|
<string name="notice_placed_video_call">%s placed a video call.</string>
|
||||||
<string name="notice_placed_video_call_by_you">You placed a video call.</string>
|
<string name="notice_placed_video_call_by_you">You placed a video call.</string>
|
||||||
<string name="notice_placed_voice_call_by_you">You placed a voice call.</string>
|
|
||||||
<string name="notice_placed_voice_call">%s placed a voice call.</string>
|
<string name="notice_placed_voice_call">%s placed a voice call.</string>
|
||||||
|
<string name="notice_placed_voice_call_by_you">You placed a voice call.</string>
|
||||||
<string name="notice_call_candidates">%s sent data to setup the call.</string>
|
<string name="notice_call_candidates">%s sent data to setup the call.</string>
|
||||||
|
<string name="notice_call_candidates_by_you">You sent data to setup the call.</string>
|
||||||
<string name="notice_answered_call">%s answered the call.</string>
|
<string name="notice_answered_call">%s answered the call.</string>
|
||||||
<string name="notice_answered_call_by_you">You answered the call.</string>
|
<string name="notice_answered_call_by_you">You answered the call.</string>
|
||||||
<string name="notice_ended_call">%s ended the call.</string>
|
<string name="notice_ended_call">%s ended the call.</string>
|
||||||
|
|
|
@ -149,7 +149,7 @@ interface ScreenComponent {
|
||||||
fun inject(bottomSheet: BootstrapBottomSheet)
|
fun inject(bottomSheet: BootstrapBottomSheet)
|
||||||
fun inject(bottomSheet: RoomWidgetPermissionBottomSheet)
|
fun inject(bottomSheet: RoomWidgetPermissionBottomSheet)
|
||||||
fun inject(bottomSheet: RoomWidgetsBottomSheet)
|
fun inject(bottomSheet: RoomWidgetsBottomSheet)
|
||||||
fun inject(callControlsBottomSheet: CallControlsBottomSheet)
|
fun inject(bottomSheet: CallControlsBottomSheet)
|
||||||
|
|
||||||
/* ==========================================================================================
|
/* ==========================================================================================
|
||||||
* Others
|
* Others
|
||||||
|
|
|
@ -38,10 +38,6 @@ fun Session.configureAndStart(context: Context,
|
||||||
startSyncing(context)
|
startSyncing(context)
|
||||||
refreshPushers()
|
refreshPushers()
|
||||||
pushRuleTriggerListener.startWithSession(this)
|
pushRuleTriggerListener.startWithSession(this)
|
||||||
|
|
||||||
// TODO P1 From HomeActivity
|
|
||||||
// @Inject lateinit var incomingVerificationRequestHandler: IncomingVerificationRequestHandler
|
|
||||||
// @Inject lateinit var keyRequestHandler: KeyRequestHandler
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Session.startSyncing(context: Context) {
|
fun Session.startSyncing(context: Context) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ import im.vector.riotx.features.call.WebRtcPeerConnectionManager
|
||||||
import org.webrtc.RendererCommon
|
import org.webrtc.RendererCommon
|
||||||
import org.webrtc.SurfaceViewRenderer
|
import org.webrtc.SurfaceViewRenderer
|
||||||
|
|
||||||
class ActiveCallViewHolder() {
|
class ActiveCallViewHolder {
|
||||||
|
|
||||||
private var activeCallPiP: SurfaceViewRenderer? = null
|
private var activeCallPiP: SurfaceViewRenderer? = null
|
||||||
private var activeCallView: ActiveCallView? = null
|
private var activeCallView: ActiveCallView? = null
|
||||||
|
|
|
@ -24,9 +24,7 @@ import androidx.core.view.isVisible
|
||||||
import com.airbnb.mvrx.activityViewModel
|
import com.airbnb.mvrx.activityViewModel
|
||||||
import im.vector.riotx.R
|
import im.vector.riotx.R
|
||||||
import im.vector.riotx.core.platform.VectorBaseBottomSheetDialogFragment
|
import im.vector.riotx.core.platform.VectorBaseBottomSheetDialogFragment
|
||||||
import kotlinx.android.synthetic.main.activity_call.*
|
|
||||||
import kotlinx.android.synthetic.main.bottom_sheet_call_controls.*
|
import kotlinx.android.synthetic.main.bottom_sheet_call_controls.*
|
||||||
import kotlinx.android.synthetic.main.vector_preference_push_rule.view.*
|
|
||||||
import me.gujun.android.span.span
|
import me.gujun.android.span.span
|
||||||
|
|
||||||
class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
||||||
|
@ -91,6 +89,7 @@ class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
||||||
.setItems(soundDevices.toTypedArray()) { d, n ->
|
.setItems(soundDevices.toTypedArray()) { d, n ->
|
||||||
d.cancel()
|
d.cancel()
|
||||||
when (soundDevices[n].toString()) {
|
when (soundDevices[n].toString()) {
|
||||||
|
// TODO Make an adapter and handle multiple Bluetooth headsets. Also do not use translations.
|
||||||
getString(R.string.sound_device_phone) -> {
|
getString(R.string.sound_device_phone) -> {
|
||||||
callViewModel.handle(VectorCallViewActions.ChangeAudioDevice(CallAudioManager.SoundDevice.PHONE))
|
callViewModel.handle(VectorCallViewActions.ChangeAudioDevice(CallAudioManager.SoundDevice.PHONE))
|
||||||
}
|
}
|
||||||
|
@ -125,11 +124,11 @@ class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
||||||
callControlsToggleSDHD.isVisible = true
|
callControlsToggleSDHD.isVisible = true
|
||||||
if (state.isHD) {
|
if (state.isHD) {
|
||||||
callControlsToggleSDHD.title = getString(R.string.call_format_turn_hd_off)
|
callControlsToggleSDHD.title = getString(R.string.call_format_turn_hd_off)
|
||||||
callControlsToggleSDHD.subTitle = null
|
callControlsToggleSDHD.subTitle = null
|
||||||
callControlsToggleSDHD.leftIcon = ContextCompat.getDrawable(requireContext(), R.drawable.ic_hd_disabled)
|
callControlsToggleSDHD.leftIcon = ContextCompat.getDrawable(requireContext(), R.drawable.ic_hd_disabled)
|
||||||
} else {
|
} else {
|
||||||
callControlsToggleSDHD.title = getString(R.string.call_format_turn_hd_on)
|
callControlsToggleSDHD.title = getString(R.string.call_format_turn_hd_on)
|
||||||
callControlsToggleSDHD.subTitle = null
|
callControlsToggleSDHD.subTitle = null
|
||||||
callControlsToggleSDHD.leftIcon = ContextCompat.getDrawable(requireContext(), R.drawable.ic_hd)
|
callControlsToggleSDHD.leftIcon = ContextCompat.getDrawable(requireContext(), R.drawable.ic_hd)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -28,7 +28,7 @@ import butterknife.ButterKnife
|
||||||
import butterknife.OnClick
|
import butterknife.OnClick
|
||||||
import im.vector.matrix.android.api.session.call.CallState
|
import im.vector.matrix.android.api.session.call.CallState
|
||||||
import im.vector.riotx.R
|
import im.vector.riotx.R
|
||||||
import kotlinx.android.synthetic.main.fragment_call_controls.view.*
|
import kotlinx.android.synthetic.main.view_call_controls.view.*
|
||||||
import org.webrtc.PeerConnection
|
import org.webrtc.PeerConnection
|
||||||
|
|
||||||
class CallControlsView @JvmOverloads constructor(
|
class CallControlsView @JvmOverloads constructor(
|
||||||
|
@ -54,7 +54,7 @@ class CallControlsView @JvmOverloads constructor(
|
||||||
lateinit var videoToggleIcon: ImageView
|
lateinit var videoToggleIcon: ImageView
|
||||||
|
|
||||||
init {
|
init {
|
||||||
ConstraintLayout.inflate(context, R.layout.fragment_call_controls, this)
|
ConstraintLayout.inflate(context, R.layout.view_call_controls, this)
|
||||||
// layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
// layoutParams = FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||||
ButterKnife.bind(this)
|
ButterKnife.bind(this)
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,14 +19,8 @@ package im.vector.riotx.features.call
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import im.vector.matrix.android.api.session.call.MxCall
|
import im.vector.matrix.android.api.session.call.MxCall
|
||||||
import im.vector.riotx.core.platform.VectorSharedAction
|
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
sealed class CallActions : VectorSharedAction {
|
|
||||||
data class GoToCallActivity(val mxCall: MxCall) : CallActions()
|
|
||||||
data class ToggleVisibility(val visible: Boolean) : CallActions()
|
|
||||||
}
|
|
||||||
|
|
||||||
class SharedActiveCallViewModel @Inject constructor(
|
class SharedActiveCallViewModel @Inject constructor(
|
||||||
private val webRtcPeerConnectionManager: WebRtcPeerConnectionManager
|
private val webRtcPeerConnectionManager: WebRtcPeerConnectionManager
|
||||||
) : ViewModel() {
|
) : ViewModel() {
|
||||||
|
|
|
@ -517,7 +517,6 @@ class RoomDetailFragment @Inject constructor(
|
||||||
}
|
}
|
||||||
R.id.voice_call,
|
R.id.voice_call,
|
||||||
R.id.video_call -> {
|
R.id.video_call -> {
|
||||||
// TODO CALL We should check/ask for permission here first
|
|
||||||
val activeCall = sharedCallActionViewModel.activeCall.value
|
val activeCall = sharedCallActionViewModel.activeCall.value
|
||||||
val isVideoCall = item.itemId == R.id.video_call
|
val isVideoCall = item.itemId == R.id.video_call
|
||||||
if (activeCall != null) {
|
if (activeCall != null) {
|
||||||
|
|
|
@ -383,15 +383,16 @@ class RoomDetailViewModel @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isMenuItemVisible(@IdRes itemId: Int) = when (itemId) {
|
fun isMenuItemVisible(@IdRes itemId: Int) = when (itemId) {
|
||||||
R.id.clear_message_queue ->
|
R.id.clear_message_queue ->
|
||||||
// For now always disable when not in developer mode, worker cancellation is not working properly
|
// For now always disable when not in developer mode, worker cancellation is not working properly
|
||||||
timeline.pendingEventCount() > 0 && vectorPreferences.developerMode()
|
timeline.pendingEventCount() > 0 && vectorPreferences.developerMode()
|
||||||
R.id.resend_all -> timeline.failedToDeliverEventCount() > 0
|
R.id.resend_all -> timeline.failedToDeliverEventCount() > 0
|
||||||
R.id.clear_all -> timeline.failedToDeliverEventCount() > 0
|
R.id.clear_all -> timeline.failedToDeliverEventCount() > 0
|
||||||
R.id.open_matrix_apps -> true
|
R.id.open_matrix_apps -> true
|
||||||
R.id.voice_call, R.id.video_call -> room.canStartCall() && webRtcPeerConnectionManager.currentCall == null
|
R.id.voice_call,
|
||||||
R.id.hangup_call -> webRtcPeerConnectionManager.currentCall != null
|
R.id.video_call -> room.canStartCall() && webRtcPeerConnectionManager.currentCall == null
|
||||||
else -> false
|
R.id.hangup_call -> webRtcPeerConnectionManager.currentCall != null
|
||||||
|
else -> false
|
||||||
}
|
}
|
||||||
|
|
||||||
// PRIVATE METHODS *****************************************************************************
|
// PRIVATE METHODS *****************************************************************************
|
||||||
|
|
|
@ -255,19 +255,25 @@ class NoticeEventFormatter @Inject constructor(private val sessionHolder: Active
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EventType.CALL_ANSWER ->
|
EventType.CALL_ANSWER ->
|
||||||
if (event.isSentByCurrentUser()) {
|
if (event.isSentByCurrentUser()) {
|
||||||
sp.getString(R.string.notice_answered_call_by_you)
|
sp.getString(R.string.notice_answered_call_by_you)
|
||||||
} else {
|
} else {
|
||||||
sp.getString(R.string.notice_answered_call, senderName)
|
sp.getString(R.string.notice_answered_call, senderName)
|
||||||
}
|
}
|
||||||
EventType.CALL_HANGUP ->
|
EventType.CALL_HANGUP ->
|
||||||
if (event.isSentByCurrentUser()) {
|
if (event.isSentByCurrentUser()) {
|
||||||
sp.getString(R.string.notice_ended_call_by_you)
|
sp.getString(R.string.notice_ended_call_by_you)
|
||||||
} else {
|
} else {
|
||||||
sp.getString(R.string.notice_ended_call, senderName)
|
sp.getString(R.string.notice_ended_call, senderName)
|
||||||
}
|
}
|
||||||
else -> null
|
EventType.CALL_CANDIDATES ->
|
||||||
|
if (event.isSentByCurrentUser()) {
|
||||||
|
sp.getString(R.string.notice_call_candidates_by_you)
|
||||||
|
} else {
|
||||||
|
sp.getString(R.string.notice_call_candidates, senderName)
|
||||||
|
}
|
||||||
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -420,7 +420,8 @@ class NotificationUtils @Inject constructor(private val context: Context,
|
||||||
roomName: String,
|
roomName: String,
|
||||||
roomId: String,
|
roomId: String,
|
||||||
matrixId: String,
|
matrixId: String,
|
||||||
callId: String, fromBg: Boolean = false): Notification {
|
callId: String,
|
||||||
|
fromBg: Boolean = false): Notification {
|
||||||
val builder = NotificationCompat.Builder(context, if (fromBg) CALL_NOTIFICATION_CHANNEL_ID else SILENT_NOTIFICATION_CHANNEL_ID)
|
val builder = NotificationCompat.Builder(context, if (fromBg) CALL_NOTIFICATION_CHANNEL_ID else SILENT_NOTIFICATION_CHANNEL_ID)
|
||||||
.setContentTitle(ensureTitleNotEmpty(roomName))
|
.setContentTitle(ensureTitleNotEmpty(roomName))
|
||||||
.apply {
|
.apply {
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item>
|
|
||||||
<shape>
|
|
||||||
<gradient
|
|
||||||
android:startColor="?attr/riotx_call_actions_bg_gradient_start"
|
|
||||||
android:endColor="?attr/riotx_call_actions_bg_gradient_end"
|
|
||||||
android:type="linear"
|
|
||||||
android:angle="90"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
</selector>
|
|
|
@ -106,71 +106,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
<!-- <ImageView-->
|
|
||||||
<!-- android:id="@+id/iv_end_call"-->
|
|
||||||
<!-- android:layout_width="64dp"-->
|
|
||||||
<!-- android:layout_height="64dp"-->
|
|
||||||
<!-- android:background="@drawable/oval_destructive"-->
|
|
||||||
<!-- android:src="@drawable/ic_call_end"-->
|
|
||||||
<!-- android:tint="@color/white"-->
|
|
||||||
<!-- android:padding="8dp"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
|
||||||
<!-- android:layout_marginBottom="32dp"-->
|
|
||||||
<!-- app:layout_constraintBottom_toTopOf="@+id/layout_call_actions"/>-->
|
|
||||||
|
|
||||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
|
||||||
<!-- android:id="@+id/layout_call_actions"-->
|
|
||||||
<!-- android:layout_width="match_parent"-->
|
|
||||||
<!-- android:layout_height="80dp"-->
|
|
||||||
<!-- android:layout_marginBottom="48dp"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
|
||||||
<!-- android:background="@drawable/bg_call_actions">-->
|
|
||||||
|
|
||||||
<!-- <ImageView-->
|
|
||||||
<!-- android:id="@+id/iv_call_speaker"-->
|
|
||||||
<!-- android:layout_width="32dp"-->
|
|
||||||
<!-- android:layout_height="32dp"-->
|
|
||||||
<!-- android:src="@drawable/ic_call_speaker_default"-->
|
|
||||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
|
||||||
<!-- android:layout_marginStart="32dp"/>-->
|
|
||||||
|
|
||||||
<!-- <ImageView-->
|
|
||||||
<!-- android:id="@+id/iv_call_flip_camera"-->
|
|
||||||
<!-- android:layout_width="32dp"-->
|
|
||||||
<!-- android:layout_height="32dp"-->
|
|
||||||
<!-- android:src="@drawable/ic_call_flip_camera_default"-->
|
|
||||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
|
||||||
<!-- android:layout_marginStart="32dp"/>-->
|
|
||||||
|
|
||||||
<!-- <ImageView-->
|
|
||||||
<!-- android:id="@+id/iv_call_videocam_off"-->
|
|
||||||
<!-- android:layout_width="32dp"-->
|
|
||||||
<!-- android:layout_height="32dp"-->
|
|
||||||
<!-- android:src="@drawable/ic_call_videocam_off_default"-->
|
|
||||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent" />-->
|
|
||||||
|
|
||||||
<!-- <ImageView-->
|
|
||||||
<!-- android:id="@+id/iv_call_mute"-->
|
|
||||||
<!-- android:layout_width="32dp"-->
|
|
||||||
<!-- android:layout_height="32dp"-->
|
|
||||||
<!-- android:src="@drawable/ic_call_mute_default"-->
|
|
||||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
|
||||||
<!-- android:layout_marginEnd="32dp"/>-->
|
|
||||||
|
|
||||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/hud_fragment_container"
|
android:id="@+id/hud_fragment_container"
|
||||||
|
@ -181,5 +116,7 @@
|
||||||
android:id="@+id/call_fragment_container"
|
android:id="@+id/call_fragment_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -12,26 +12,26 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:actionTitle="@string/call_select_sound_device"
|
app:actionTitle="@string/call_select_sound_device"
|
||||||
tools:actionDescription="Speaker"
|
|
||||||
app:leftIcon="@drawable/ic_call_speaker_default"
|
app:leftIcon="@drawable/ic_call_speaker_default"
|
||||||
app:tint="?attr/riotx_text_primary" />
|
app:tint="?attr/riotx_text_primary"
|
||||||
|
tools:actionDescription="Speaker" />
|
||||||
|
|
||||||
<im.vector.riotx.core.ui.views.BottomSheetActionButton
|
<im.vector.riotx.core.ui.views.BottomSheetActionButton
|
||||||
android:id="@+id/callControlsSwitchCamera"
|
android:id="@+id/callControlsSwitchCamera"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:actionTitle="@string/call_switch_camera"
|
app:actionTitle="@string/call_switch_camera"
|
||||||
tools:actionDescription="Front"
|
|
||||||
app:leftIcon="@drawable/ic_video_flip"
|
app:leftIcon="@drawable/ic_video_flip"
|
||||||
app:tint="?attr/riotx_text_primary" />
|
app:tint="?attr/riotx_text_primary"
|
||||||
|
tools:actionDescription="Front" />
|
||||||
|
|
||||||
<im.vector.riotx.core.ui.views.BottomSheetActionButton
|
<im.vector.riotx.core.ui.views.BottomSheetActionButton
|
||||||
android:id="@+id/callControlsToggleSDHD"
|
android:id="@+id/callControlsToggleSDHD"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:actionTitle="@string/call_switch_camera"
|
app:actionTitle="@string/call_switch_camera"
|
||||||
tools:actionDescription="Front"
|
|
||||||
app:leftIcon="@drawable/ic_hd"
|
app:leftIcon="@drawable/ic_hd"
|
||||||
app:tint="?attr/riotx_text_primary" />
|
app:tint="?attr/riotx_text_primary"
|
||||||
|
tools:actionDescription="Front" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/contact_name_call"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_above="@+id/buttons_call_container"
|
|
||||||
android:textSize="24sp"
|
|
||||||
android:layout_margin="8dp"/>
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/buttons_call_container"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_above="@+id/capture_format_text_call"
|
|
||||||
android:layout_alignWithParentIfMissing="true"
|
|
||||||
android:layout_marginBottom="32dp"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/button_call_disconnect"
|
|
||||||
android:background="@drawable/ic_phone"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"/>
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/button_call_switch_camera"
|
|
||||||
android:background="@drawable/ic_camera"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"/>
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/button_call_scaling_mode"
|
|
||||||
android:background="@drawable/scrolldown"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"/>
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/button_call_toggle_mic"
|
|
||||||
android:background="@android:drawable/ic_btn_speak_now"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/capture_format_text_call"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_above="@+id/capture_format_slider_call"
|
|
||||||
android:textSize="16sp"
|
|
||||||
tools:text="Slide to change capture format"/>
|
|
||||||
<SeekBar
|
|
||||||
android:id="@+id/capture_format_slider_call"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:progress="50"
|
|
||||||
android:layout_margin="8dp"/>
|
|
||||||
</RelativeLayout>
|
|
|
@ -63,7 +63,6 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/syncStateView" />
|
app:layout_constraintTop_toBottomOf="@id/syncStateView" />
|
||||||
|
|
||||||
|
|
||||||
<im.vector.riotx.core.ui.views.ActiveCallView
|
<im.vector.riotx.core.ui.views.ActiveCallView
|
||||||
android:id="@+id/activeCallView"
|
android:id="@+id/activeCallView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -80,7 +79,6 @@
|
||||||
app:layout_constraintBottom_toTopOf="@+id/bottomNavigationView"
|
app:layout_constraintBottom_toTopOf="@+id/bottomNavigationView"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/activeCallView" />
|
app:layout_constraintTop_toBottomOf="@+id/activeCallView" />
|
||||||
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/activeCallPiPWrap"
|
android:id="@+id/activeCallPiPWrap"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -99,6 +97,7 @@
|
||||||
android:layout_height="120dp"
|
android:layout_height="120dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
|
|
|
@ -77,7 +77,6 @@
|
||||||
app:layout_constraintTop_toBottomOf="@+id/roomToolbarTitleView"
|
app:layout_constraintTop_toBottomOf="@+id/roomToolbarTitleView"
|
||||||
tools:text="@sample/matrix.json/data/roomTopic" />
|
tools:text="@sample/matrix.json/data/roomTopic" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
@ -116,7 +115,6 @@
|
||||||
app:layout_constraintTop_toBottomOf="@id/activeCallView"
|
app:layout_constraintTop_toBottomOf="@id/activeCallView"
|
||||||
tools:listitem="@layout/item_timeline_event_base" />
|
tools:listitem="@layout/item_timeline_event_base" />
|
||||||
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/bannersContainer"
|
android:id="@+id/bannersContainer"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -202,7 +200,6 @@
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
||||||
<im.vector.riotx.core.platform.BadgeFloatingActionButton
|
<im.vector.riotx.core.platform.BadgeFloatingActionButton
|
||||||
android:id="@+id/jumpToBottomView"
|
android:id="@+id/jumpToBottomView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -220,5 +217,4 @@
|
||||||
app:maxImageSize="16dp"
|
app:maxImageSize="16dp"
|
||||||
app:tint="@color/black" />
|
app:tint="@color/black" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -14,7 +15,6 @@
|
||||||
android:layout_toStartOf="@id/returnToCallButton"
|
android:layout_toStartOf="@id/returnToCallButton"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:drawableStart="@drawable/ic_call"
|
android:drawableStart="@drawable/ic_call"
|
||||||
android:drawableTint="@color/white"
|
|
||||||
android:drawablePadding="10dp"
|
android:drawablePadding="10dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
|
@ -22,7 +22,8 @@
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
android:text="@string/active_call"
|
android:text="@string/active_call"
|
||||||
android:textColor="@color/white" />
|
android:textColor="@color/white"
|
||||||
|
app:drawableTint="@color/white" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/returnToCallButton"
|
android:id="@+id/returnToCallButton"
|
||||||
|
@ -31,16 +32,15 @@
|
||||||
android:layout_alignTop="@+id/activeCallInfo"
|
android:layout_alignTop="@+id/activeCallInfo"
|
||||||
android:layout_alignBottom="@+id/activeCallInfo"
|
android:layout_alignBottom="@+id/activeCallInfo"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:textColor="@color/white"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:paddingEnd="16dp"
|
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:text="@string/return_to_call"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/white"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:text="@string/return_to_call" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
</merge>
|
</merge>
|
||||||
|
|
|
@ -1,26 +1,23 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/ringingControls"
|
android:id="@+id/ringingControls"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
tools:background="@color/password_strength_bar_ok"
|
tools:background="@color/password_strength_bar_ok"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<!-- TODO a11y -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_icr_accept_call"
|
android:id="@+id/iv_icr_accept_call"
|
||||||
android:layout_width="64dp"
|
android:layout_width="64dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="64dp"
|
||||||
android:layout_marginBottom="32dp"
|
|
||||||
android:background="@drawable/oval_positive"
|
android:background="@drawable/oval_positive"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
@ -33,7 +30,6 @@
|
||||||
android:id="@+id/iv_icr_end_call"
|
android:id="@+id/iv_icr_end_call"
|
||||||
android:layout_width="64dp"
|
android:layout_width="64dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="64dp"
|
||||||
android:layout_marginBottom="32dp"
|
|
||||||
android:background="@drawable/oval_destructive"
|
android:background="@drawable/oval_destructive"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
@ -55,39 +51,36 @@
|
||||||
android:id="@+id/connectedControls"
|
android:id="@+id/connectedControls"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:background="@color/password_strength_bar_low"
|
tools:background="@color/password_strength_bar_low"
|
||||||
|
tools:layout_marginTop="120dp"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_leftMiniControl"
|
android:id="@+id/iv_leftMiniControl"
|
||||||
android:layout_width="44dp"
|
android:layout_width="44dp"
|
||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginBottom="32dp"
|
|
||||||
android:background="@drawable/oval_positive"
|
android:background="@drawable/oval_positive"
|
||||||
android:backgroundTint="?attr/riotx_background"
|
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:src="@drawable/ic_home_bottom_chat"
|
android:src="@drawable/ic_home_bottom_chat"
|
||||||
android:tint="?attr/riotx_text_primary"
|
android:tint="?attr/riotx_text_primary"
|
||||||
|
app:backgroundTint="?attr/riotx_background"
|
||||||
tools:ignore="MissingConstraints" />
|
tools:ignore="MissingConstraints" />
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_mute_toggle"
|
android:id="@+id/iv_mute_toggle"
|
||||||
android:layout_width="64dp"
|
android:layout_width="64dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="64dp"
|
||||||
android:layout_marginBottom="32dp"
|
|
||||||
android:background="@drawable/oval_positive"
|
android:background="@drawable/oval_positive"
|
||||||
android:backgroundTint="?attr/riotx_background"
|
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:src="@drawable/ic_microphone_off"
|
android:src="@drawable/ic_microphone_off"
|
||||||
android:tint="?attr/riotx_text_primary"
|
android:tint="?attr/riotx_text_primary"
|
||||||
|
app:backgroundTint="?attr/riotx_background"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints"
|
||||||
tools:src="@drawable/ic_microphone_on" />
|
tools:src="@drawable/ic_microphone_on" />
|
||||||
|
|
||||||
|
@ -95,7 +88,6 @@
|
||||||
android:id="@+id/iv_end_call"
|
android:id="@+id/iv_end_call"
|
||||||
android:layout_width="64dp"
|
android:layout_width="64dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="64dp"
|
||||||
android:layout_marginBottom="32dp"
|
|
||||||
android:background="@drawable/oval_destructive"
|
android:background="@drawable/oval_destructive"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
@ -108,37 +100,33 @@
|
||||||
android:id="@+id/iv_video_toggle"
|
android:id="@+id/iv_video_toggle"
|
||||||
android:layout_width="64dp"
|
android:layout_width="64dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="64dp"
|
||||||
android:layout_marginBottom="32dp"
|
|
||||||
android:background="@drawable/oval_positive"
|
android:background="@drawable/oval_positive"
|
||||||
android:backgroundTint="?attr/riotx_background"
|
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:src="@drawable/ic_call_videocam_off_default"
|
android:src="@drawable/ic_call_videocam_off_default"
|
||||||
android:tint="?attr/riotx_text_primary"
|
android:tint="?attr/riotx_text_primary"
|
||||||
|
app:backgroundTint="?attr/riotx_background"
|
||||||
tools:ignore="MissingConstraints" />
|
tools:ignore="MissingConstraints" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_more"
|
android:id="@+id/iv_more"
|
||||||
android:layout_width="44dp"
|
android:layout_width="44dp"
|
||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginBottom="32dp"
|
|
||||||
android:background="@drawable/oval_positive"
|
android:background="@drawable/oval_positive"
|
||||||
android:backgroundTint="?attr/riotx_background"
|
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:src="@drawable/ic_more_vertical"
|
android:src="@drawable/ic_more_vertical"
|
||||||
android:tint="?attr/riotx_text_primary"
|
android:tint="?attr/riotx_text_primary"
|
||||||
|
app:backgroundTint="?attr/riotx_background"
|
||||||
tools:ignore="MissingConstraints" />
|
tools:ignore="MissingConstraints" />
|
||||||
|
|
||||||
<androidx.constraintlayout.helper.widget.Flow
|
<androidx.constraintlayout.helper.widget.Flow
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:constraint_referenced_ids="iv_leftMiniControl, iv_mute_toggle, iv_end_call,iv_video_toggle,iv_more"
|
app:constraint_referenced_ids="iv_leftMiniControl, iv_mute_toggle, iv_end_call,iv_video_toggle,iv_more"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints" />
|
||||||
tools:layout_editor_absoluteX="16dp"
|
|
||||||
tools:layout_editor_absoluteY="16dp" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
@ -208,4 +196,4 @@
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||||
|
|
||||||
</LinearLayout>
|
</FrameLayout>
|
|
@ -34,6 +34,7 @@
|
||||||
app:iconTint="@color/riotx_destructive_accent"
|
app:iconTint="@color/riotx_destructive_accent"
|
||||||
app:showAsAction="always"
|
app:showAsAction="always"
|
||||||
tools:visible="true" />
|
tools:visible="true" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/resend_all"
|
android:id="@+id/resend_all"
|
||||||
android:icon="@drawable/ic_refresh_cw"
|
android:icon="@drawable/ic_refresh_cw"
|
||||||
|
|
|
@ -190,14 +190,4 @@
|
||||||
<color name="riotx_keys_backup_banner_accent_color_light">#FFF8E3</color>
|
<color name="riotx_keys_backup_banner_accent_color_light">#FFF8E3</color>
|
||||||
<color name="riotx_keys_backup_banner_accent_color_dark">#22262E</color>
|
<color name="riotx_keys_backup_banner_accent_color_dark">#22262E</color>
|
||||||
|
|
||||||
<attr name="riotx_call_actions_bg_gradient_start" format="color" />
|
|
||||||
<color name="riotx_call_actions_bg_gradient_start_light">#000000</color>
|
|
||||||
<color name="riotx_call_actions_bg_gradient_start_dark">#000000</color>
|
|
||||||
<color name="riotx_call_actions_bg_gradient_start_black">#000000</color>
|
|
||||||
|
|
||||||
<attr name="riotx_call_actions_bg_gradient_end" format="color" />
|
|
||||||
<color name="riotx_call_actions_bg_gradient_end_light">@android:color/transparent</color>
|
|
||||||
<color name="riotx_call_actions_bg_gradient_end_dark">@android:color/transparent</color>
|
|
||||||
<color name="riotx_call_actions_bg_gradient_end_black">@android:color/transparent</color>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
|
@ -225,8 +225,6 @@
|
||||||
<string name="call_format_turn_hd_off">Turn HD off</string>
|
<string name="call_format_turn_hd_off">Turn HD off</string>
|
||||||
<string name="call_format_turn_hd_on">Turn HD on</string>
|
<string name="call_format_turn_hd_on">Turn HD on</string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<string name="option_send_files">Send files</string>
|
<string name="option_send_files">Send files</string>
|
||||||
<string name="option_send_sticker">Send sticker</string>
|
<string name="option_send_sticker">Send sticker</string>
|
||||||
<string name="option_take_photo_video">Take photo or video</string>
|
<string name="option_take_photo_video">Take photo or video</string>
|
||||||
|
|
Loading…
Reference in a new issue