Cleanup during review.

This commit is contained in:
Benoit Marty 2020-06-22 15:36:30 +02:00
parent 4c34d73501
commit 16f32da647
32 changed files with 97 additions and 303 deletions

View file

@ -163,7 +163,7 @@ dependencies {
implementation 'com.googlecode.libphonenumber:libphonenumber:8.10.23'
// 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.+'
debugImplementation 'com.airbnb.okreplay:okreplay:1.5.0'

View file

@ -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
interface CallsListener {
// /**
// * 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)
/**
* Called when there is an incoming call within the room.
*/
fun onCallInviteReceived(mxCall: MxCall, callInviteContent: CallInviteContent)
fun onCallIceCandidateReceived(mxCall: MxCall, iceCandidatesContent: CallCandidatesContent)
/**
* An outgoing call is started.
*/
fun onCallAnswerReceived(callAnswerContent: CallAnswerContent)
/**
* Called when a called has been hung up
*/
fun onCallHangupReceived(callHangupContent: CallHangupContent)
fun onCallManagedByOtherSession(callId: String)

View file

@ -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>
)

View file

@ -19,10 +19,29 @@ package im.vector.matrix.android.api.session.call
import com.squareup.moshi.Json
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)
data class TurnServerResponse(
/**
* Required. The username to use.
*/
@Json(name = "username") val username: String?,
/**
* Required. The password to use.
*/
@Json(name = "password") val password: String?,
/**
* Required. A list of TURN URIs
*/
@Json(name = "uris") val uris: List<String>?,
/**
* Required. The time-to-live in seconds
*/
@Json(name = "ttl") val ttl: Int?
)

View file

@ -246,11 +246,11 @@ internal abstract class SessionModule {
@Binds
@IntoSet
abstract fun bindCallEventObserver(callEventObserver: CallEventObserver): LiveEntityObserver
abstract fun bindCallEventObserver(observer: CallEventObserver): LiveEntityObserver
@Binds
@IntoSet
abstract fun bindRoomTombstoneEventLiveObserver(roomTombstoneEventLiveObserver: RoomTombstoneEventLiveObserver): LiveEntityObserver
abstract fun bindRoomTombstoneEventLiveObserver(observer: RoomTombstoneEventLiveObserver): LiveEntityObserver
@Binds
@IntoSet

View file

@ -34,8 +34,8 @@ import javax.inject.Inject
internal class CallEventObserver @Inject constructor(
@SessionDatabase realmConfiguration: RealmConfiguration,
@UserId private val userId: String,
private val task: CallEventsObserverTask) :
RealmLiveEntityObserver<EventEntity>(realmConfiguration) {
private val task: CallEventsObserverTask
) : RealmLiveEntityObserver<EventEntity>(realmConfiguration) {
override val query = Monarchy.Query<EventEntity> {
EventEntity.whereTypes(it, listOf(

View file

@ -20,7 +20,6 @@ import dagger.Binds
import dagger.Module
import dagger.Provides
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 retrofit2.Retrofit
@ -38,8 +37,11 @@ internal abstract class CallModule {
}
@Binds
abstract fun bindCallService(service:DefaultCallSignalingService): CallSignalingService
abstract fun bindCallSignalingService(service: DefaultCallSignalingService): CallSignalingService
@Binds
abstract fun bindTurnServerTask(task: DefaultGetTurnServerTask): GetTurnServerTask
abstract fun bindGetTurnServerTask(task: DefaultGetTurnServerTask): GetTurnServerTask
@Binds
abstract fun bindCallEventsObserverTask(task: DefaultCallEventsObserverTask): CallEventsObserverTask
}

View file

@ -17,7 +17,6 @@
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.VoipApi
import im.vector.matrix.android.internal.network.executeRequest
import im.vector.matrix.android.internal.task.Task
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,
private val eventBus: EventBus) : GetTurnServerTask() {
private val eventBus: EventBus) : GetTurnServerTask() {
override suspend fun execute(params: Params): TurnServerResponse {
return executeRequest(eventBus) {

View file

@ -14,13 +14,13 @@
* 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 retrofit2.Call
import retrofit2.http.GET
// TODO Move to internal
internal interface VoipApi {
@GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "voip/turnServer")

View file

@ -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.internal.session.DefaultFileService
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.GetRoomIdByAliasTask
import im.vector.matrix.android.internal.session.room.create.CreateRoomTask
@ -203,8 +201,4 @@ internal abstract class RoomModule {
@Binds
abstract fun bindDeleteTagFromRoomTask(task: DefaultDeleteTagFromRoomTask): DeleteTagFromRoomTask
// TODO is this in the correct module?
@Binds
abstract fun bindCallEventsObserverTask(task: DefaultCallEventsObserverTask): CallEventsObserverTask
}

View file

@ -41,9 +41,10 @@
<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_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_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_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_by_you">You answered the call.</string>
<string name="notice_ended_call">%s ended the call.</string>

View file

@ -149,7 +149,7 @@ interface ScreenComponent {
fun inject(bottomSheet: BootstrapBottomSheet)
fun inject(bottomSheet: RoomWidgetPermissionBottomSheet)
fun inject(bottomSheet: RoomWidgetsBottomSheet)
fun inject(callControlsBottomSheet: CallControlsBottomSheet)
fun inject(bottomSheet: CallControlsBottomSheet)
/* ==========================================================================================
* Others

View file

@ -38,10 +38,6 @@ fun Session.configureAndStart(context: Context,
startSyncing(context)
refreshPushers()
pushRuleTriggerListener.startWithSession(this)
// TODO P1 From HomeActivity
// @Inject lateinit var incomingVerificationRequestHandler: IncomingVerificationRequestHandler
// @Inject lateinit var keyRequestHandler: KeyRequestHandler
}
fun Session.startSyncing(context: Context) {

View file

@ -27,7 +27,7 @@ import im.vector.riotx.features.call.WebRtcPeerConnectionManager
import org.webrtc.RendererCommon
import org.webrtc.SurfaceViewRenderer
class ActiveCallViewHolder() {
class ActiveCallViewHolder {
private var activeCallPiP: SurfaceViewRenderer? = null
private var activeCallView: ActiveCallView? = null

View file

@ -24,9 +24,7 @@ import androidx.core.view.isVisible
import com.airbnb.mvrx.activityViewModel
import im.vector.riotx.R
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.vector_preference_push_rule.view.*
import me.gujun.android.span.span
class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment() {
@ -91,6 +89,7 @@ class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment() {
.setItems(soundDevices.toTypedArray()) { d, n ->
d.cancel()
when (soundDevices[n].toString()) {
// TODO Make an adapter and handle multiple Bluetooth headsets. Also do not use translations.
getString(R.string.sound_device_phone) -> {
callViewModel.handle(VectorCallViewActions.ChangeAudioDevice(CallAudioManager.SoundDevice.PHONE))
}
@ -125,11 +124,11 @@ class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment() {
callControlsToggleSDHD.isVisible = true
if (state.isHD) {
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)
} else {
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)
}
} else {

View file

@ -28,7 +28,7 @@ import butterknife.ButterKnife
import butterknife.OnClick
import im.vector.matrix.android.api.session.call.CallState
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
class CallControlsView @JvmOverloads constructor(
@ -54,7 +54,7 @@ class CallControlsView @JvmOverloads constructor(
lateinit var videoToggleIcon: ImageView
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)
ButterKnife.bind(this)
}

View file

@ -19,14 +19,8 @@ package im.vector.riotx.features.call
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import im.vector.matrix.android.api.session.call.MxCall
import im.vector.riotx.core.platform.VectorSharedAction
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(
private val webRtcPeerConnectionManager: WebRtcPeerConnectionManager
) : ViewModel() {

View file

@ -517,7 +517,6 @@ class RoomDetailFragment @Inject constructor(
}
R.id.voice_call,
R.id.video_call -> {
// TODO CALL We should check/ask for permission here first
val activeCall = sharedCallActionViewModel.activeCall.value
val isVideoCall = item.itemId == R.id.video_call
if (activeCall != null) {

View file

@ -383,15 +383,16 @@ class RoomDetailViewModel @AssistedInject constructor(
}
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
timeline.pendingEventCount() > 0 && vectorPreferences.developerMode()
R.id.resend_all -> timeline.failedToDeliverEventCount() > 0
R.id.clear_all -> timeline.failedToDeliverEventCount() > 0
R.id.open_matrix_apps -> true
R.id.voice_call, R.id.video_call -> room.canStartCall() && webRtcPeerConnectionManager.currentCall == null
R.id.hangup_call -> webRtcPeerConnectionManager.currentCall != null
else -> false
R.id.resend_all -> timeline.failedToDeliverEventCount() > 0
R.id.clear_all -> timeline.failedToDeliverEventCount() > 0
R.id.open_matrix_apps -> true
R.id.voice_call,
R.id.video_call -> room.canStartCall() && webRtcPeerConnectionManager.currentCall == null
R.id.hangup_call -> webRtcPeerConnectionManager.currentCall != null
else -> false
}
// PRIVATE METHODS *****************************************************************************

View file

@ -255,19 +255,25 @@ class NoticeEventFormatter @Inject constructor(private val sessionHolder: Active
}
}
}
EventType.CALL_ANSWER ->
EventType.CALL_ANSWER ->
if (event.isSentByCurrentUser()) {
sp.getString(R.string.notice_answered_call_by_you)
} else {
sp.getString(R.string.notice_answered_call, senderName)
}
EventType.CALL_HANGUP ->
EventType.CALL_HANGUP ->
if (event.isSentByCurrentUser()) {
sp.getString(R.string.notice_ended_call_by_you)
} else {
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
}
}

View file

@ -420,7 +420,8 @@ class NotificationUtils @Inject constructor(private val context: Context,
roomName: String,
roomId: 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)
.setContentTitle(ensureTitleNotEmpty(roomName))
.apply {

View file

@ -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>

View file

@ -106,71 +106,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
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
android:id="@+id/hud_fragment_container"
@ -181,5 +116,7 @@
android:id="@+id/call_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -12,26 +12,26 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:actionTitle="@string/call_select_sound_device"
tools:actionDescription="Speaker"
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
android:id="@+id/callControlsSwitchCamera"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:actionTitle="@string/call_switch_camera"
tools:actionDescription="Front"
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
android:id="@+id/callControlsToggleSDHD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:actionTitle="@string/call_switch_camera"
tools:actionDescription="Front"
app:leftIcon="@drawable/ic_hd"
app:tint="?attr/riotx_text_primary" />
app:tint="?attr/riotx_text_primary"
tools:actionDescription="Front" />
</LinearLayout>

View file

@ -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>

View file

@ -63,7 +63,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/syncStateView" />
<im.vector.riotx.core.ui.views.ActiveCallView
android:id="@+id/activeCallView"
android:layout_width="match_parent"
@ -80,7 +79,6 @@
app:layout_constraintBottom_toTopOf="@+id/bottomNavigationView"
app:layout_constraintTop_toBottomOf="@+id/activeCallView" />
<androidx.cardview.widget.CardView
android:id="@+id/activeCallPiPWrap"
android:layout_width="wrap_content"
@ -99,6 +97,7 @@
android:layout_height="120dp"
android:visibility="gone"
tools:visibility="visible" />
</androidx.cardview.widget.CardView>
<com.google.android.material.bottomnavigation.BottomNavigationView

View file

@ -77,7 +77,6 @@
app:layout_constraintTop_toBottomOf="@+id/roomToolbarTitleView"
tools:text="@sample/matrix.json/data/roomTopic" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.Toolbar>
@ -116,7 +115,6 @@
app:layout_constraintTop_toBottomOf="@id/activeCallView"
tools:listitem="@layout/item_timeline_event_base" />
<FrameLayout
android:id="@+id/bannersContainer"
android:layout_width="0dp"
@ -202,7 +200,6 @@
tools:visibility="visible" />
</androidx.cardview.widget.CardView>
<im.vector.riotx.core.platform.BadgeFloatingActionButton
android:id="@+id/jumpToBottomView"
android:layout_width="wrap_content"
@ -220,5 +217,4 @@
app:maxImageSize="16dp"
app:tint="@color/black" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -14,7 +15,6 @@
android:layout_toStartOf="@id/returnToCallButton"
android:background="?attr/selectableItemBackground"
android:drawableStart="@drawable/ic_call"
android:drawableTint="@color/white"
android:drawablePadding="10dp"
android:gravity="center_vertical"
android:paddingStart="16dp"
@ -22,7 +22,8 @@
android:paddingEnd="16dp"
android:paddingBottom="12dp"
android:text="@string/active_call"
android:textColor="@color/white" />
android:textColor="@color/white"
app:drawableTint="@color/white" />
<TextView
android:id="@+id/returnToCallButton"
@ -31,16 +32,15 @@
android:layout_alignTop="@+id/activeCallInfo"
android:layout_alignBottom="@+id/activeCallInfo"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:clickable="false"
android:focusable="false"
android:textColor="@color/white"
android:gravity="center"
android:textAllCaps="true"
android:textStyle="bold"
android:paddingEnd="16dp"
android:paddingStart="8dp"
android:paddingEnd="16dp"
android:text="@string/return_to_call"
android:textAllCaps="true"
android:textColor="@color/white"
android:textSize="15sp"
android:text="@string/return_to_call" />
android:textStyle="bold" />
</merge>

View file

@ -1,26 +1,23 @@
<?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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ringingControls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="16dp"
tools:background="@color/password_strength_bar_ok"
tools:visibility="visible">
<!-- TODO a11y -->
<ImageView
android:id="@+id/iv_icr_accept_call"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginBottom="32dp"
android:background="@drawable/oval_positive"
android:clickable="true"
android:focusable="true"
@ -33,7 +30,6 @@
android:id="@+id/iv_icr_end_call"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginBottom="32dp"
android:background="@drawable/oval_destructive"
android:clickable="true"
android:focusable="true"
@ -55,39 +51,36 @@
android:id="@+id/connectedControls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="16dp"
android:visibility="gone"
tools:background="@color/password_strength_bar_low"
tools:layout_marginTop="120dp"
tools:visibility="visible">
<ImageView
android:id="@+id/iv_leftMiniControl"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_marginBottom="32dp"
android:background="@drawable/oval_positive"
android:backgroundTint="?attr/riotx_background"
android:clickable="true"
android:focusable="true"
android:padding="10dp"
android:src="@drawable/ic_home_bottom_chat"
android:tint="?attr/riotx_text_primary"
app:backgroundTint="?attr/riotx_background"
tools:ignore="MissingConstraints" />
<ImageView
android:id="@+id/iv_mute_toggle"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginBottom="32dp"
android:background="@drawable/oval_positive"
android:backgroundTint="?attr/riotx_background"
android:clickable="true"
android:focusable="true"
android:padding="16dp"
android:src="@drawable/ic_microphone_off"
android:tint="?attr/riotx_text_primary"
app:backgroundTint="?attr/riotx_background"
tools:ignore="MissingConstraints"
tools:src="@drawable/ic_microphone_on" />
@ -95,7 +88,6 @@
android:id="@+id/iv_end_call"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginBottom="32dp"
android:background="@drawable/oval_destructive"
android:clickable="true"
android:focusable="true"
@ -108,37 +100,33 @@
android:id="@+id/iv_video_toggle"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginBottom="32dp"
android:background="@drawable/oval_positive"
android:backgroundTint="?attr/riotx_background"
android:clickable="true"
android:focusable="true"
android:padding="16dp"
android:src="@drawable/ic_call_videocam_off_default"
android:tint="?attr/riotx_text_primary"
app:backgroundTint="?attr/riotx_background"
tools:ignore="MissingConstraints" />
<ImageView
android:id="@+id/iv_more"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_marginBottom="32dp"
android:background="@drawable/oval_positive"
android:backgroundTint="?attr/riotx_background"
android:clickable="true"
android:focusable="true"
android:padding="8dp"
android:src="@drawable/ic_more_vertical"
android:tint="?attr/riotx_text_primary"
app:backgroundTint="?attr/riotx_background"
tools:ignore="MissingConstraints" />
<androidx.constraintlayout.helper.widget.Flow
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:constraint_referenced_ids="iv_leftMiniControl, iv_mute_toggle, iv_end_call,iv_video_toggle,iv_more"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="16dp" />
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>
@ -208,4 +196,4 @@
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
</LinearLayout>
</FrameLayout>

View file

@ -34,6 +34,7 @@
app:iconTint="@color/riotx_destructive_accent"
app:showAsAction="always"
tools:visible="true" />
<item
android:id="@+id/resend_all"
android:icon="@drawable/ic_refresh_cw"

View file

@ -190,14 +190,4 @@
<color name="riotx_keys_backup_banner_accent_color_light">#FFF8E3</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>

View file

@ -225,8 +225,6 @@
<string name="call_format_turn_hd_off">Turn HD off</string>
<string name="call_format_turn_hd_on">Turn HD on</string>
<string name="option_send_files">Send files</string>
<string name="option_send_sticker">Send sticker</string>
<string name="option_take_photo_video">Take photo or video</string>