mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-17 07:23:21 +01:00
Show unanswered outgoing calls as unanswered.
This commit is contained in:
committed by
Greyson Parrelli
parent
ff88d259fd
commit
95c0467bda
@@ -66,8 +66,8 @@ object CallPreference {
|
||||
MessageTypes.MISSED_VIDEO_CALL_TYPE -> getMissedCallString(true, call.event)
|
||||
MessageTypes.INCOMING_AUDIO_CALL_TYPE -> if (call.isDisplayedAsMissedCallInUi) getMissedCallString(false, call.event) else R.string.MessageRecord_incoming_voice_call
|
||||
MessageTypes.INCOMING_VIDEO_CALL_TYPE -> if (call.isDisplayedAsMissedCallInUi) getMissedCallString(true, call.event) else R.string.MessageRecord_incoming_video_call
|
||||
MessageTypes.OUTGOING_AUDIO_CALL_TYPE -> R.string.MessageRecord_outgoing_voice_call
|
||||
MessageTypes.OUTGOING_VIDEO_CALL_TYPE -> R.string.MessageRecord_outgoing_video_call
|
||||
MessageTypes.OUTGOING_AUDIO_CALL_TYPE -> if (call.event == CallTable.Event.NOT_ACCEPTED) R.string.MessageRecord_unanswered_voice_call else R.string.MessageRecord_outgoing_voice_call
|
||||
MessageTypes.OUTGOING_VIDEO_CALL_TYPE -> if (call.event == CallTable.Event.NOT_ACCEPTED) R.string.MessageRecord_unanswered_video_call else R.string.MessageRecord_outgoing_video_call
|
||||
MessageTypes.GROUP_CALL_TYPE -> when {
|
||||
call.isDisplayedAsMissedCallInUi -> if (call.event == CallTable.Event.MISSED_NOTIFICATION_PROFILE) R.string.CallPreference__missed_group_call_notification_profile else R.string.CallPreference__missed_group_call
|
||||
call.event == CallTable.Event.GENERIC_GROUP_CALL || call.event == CallTable.Event.JOINED -> R.string.CallPreference__group_call
|
||||
|
||||
@@ -151,10 +151,11 @@ public final class ThreadBodyUtil {
|
||||
if (call != null) {
|
||||
boolean accepted = call.getEvent() == CallTable.Event.ACCEPTED;
|
||||
if (call.getDirection() == CallTable.Direction.OUTGOING) {
|
||||
if (call.getType() == CallTable.Type.AUDIO_CALL) {
|
||||
return context.getString(R.string.MessageRecord_outgoing_voice_call);
|
||||
boolean isVideoCall = call.getType() == CallTable.Type.VIDEO_CALL;
|
||||
if (call.getEvent() == CallTable.Event.NOT_ACCEPTED) {
|
||||
return context.getString(isVideoCall ? R.string.MessageRecord_unanswered_video_call : R.string.MessageRecord_unanswered_voice_call);
|
||||
} else {
|
||||
return context.getString(R.string.MessageRecord_outgoing_video_call);
|
||||
return context.getString(isVideoCall ? R.string.MessageRecord_outgoing_video_call : R.string.MessageRecord_outgoing_voice_call);
|
||||
}
|
||||
} else {
|
||||
boolean isVideoCall = call.getType() == CallTable.Type.VIDEO_CALL;
|
||||
|
||||
@@ -260,12 +260,18 @@ public class MmsMessageRecord extends MessageRecord {
|
||||
String callDateString = getCallDateString(context);
|
||||
|
||||
if (call.getDirection() == CallTable.Direction.OUTGOING) {
|
||||
if (call.getType() == CallTable.Type.AUDIO_CALL) {
|
||||
int updateString = R.string.MessageRecord_outgoing_voice_call;
|
||||
return staticUpdateDescription(context.getString(R.string.MessageRecord_call_message_with_date, context.getString(updateString), callDateString), Glyph.PHONE);
|
||||
boolean isVideoCall = call.getType() == CallTable.Type.VIDEO_CALL;
|
||||
Glyph icon = isVideoCall ? Glyph.VIDEO_CAMERA : Glyph.PHONE;
|
||||
|
||||
if (call.getEvent() == CallTable.Event.NOT_ACCEPTED) {
|
||||
int message = isVideoCall ? R.string.MessageRecord_unanswered_video_call : R.string.MessageRecord_unanswered_voice_call;
|
||||
return staticUpdateDescription(context.getString(R.string.MessageRecord_call_message_with_date, context.getString(message), callDateString),
|
||||
icon,
|
||||
ContextCompat.getColor(context, R.color.core_red_shade),
|
||||
ContextCompat.getColor(context, R.color.core_red));
|
||||
} else {
|
||||
int updateString = R.string.MessageRecord_outgoing_video_call;
|
||||
return staticUpdateDescription(context.getString(R.string.MessageRecord_call_message_with_date, context.getString(updateString), callDateString), Glyph.VIDEO_CAMERA);
|
||||
int updateString = isVideoCall ? R.string.MessageRecord_outgoing_video_call : R.string.MessageRecord_outgoing_voice_call;
|
||||
return staticUpdateDescription(context.getString(R.string.MessageRecord_call_message_with_date, context.getString(updateString), callDateString), icon);
|
||||
}
|
||||
} else {
|
||||
boolean isVideoCall = call.getType() == CallTable.Type.VIDEO_CALL;
|
||||
|
||||
@@ -1924,6 +1924,10 @@
|
||||
<string name="MessageRecord_declined_voice_call">Declined voice call</string>
|
||||
<!-- Update message shown when receiving an incoming 1:1 video call and not answered -->
|
||||
<string name="MessageRecord_declined_video_call">Declined video call</string>
|
||||
<!-- Update message shown when placing an outgoing 1:1 voice/audio call and the remote party did not answer -->
|
||||
<string name="MessageRecord_unanswered_voice_call">Unanswered voice call</string>
|
||||
<!-- Update message shown when placing an outgoing 1:1 video call and the remote party did not answer -->
|
||||
<string name="MessageRecord_unanswered_video_call">Unanswered video call</string>
|
||||
<!-- Update message shown when receiving an incoming voice call and declined due to notification profile -->
|
||||
<string name="MessageRecord_missed_voice_call_notification_profile">Missed voice call while notification profile on</string>
|
||||
<!-- Update message shown when receiving an incoming video call and declined due to notification profile -->
|
||||
@@ -7803,6 +7807,8 @@
|
||||
<string name="CallLogAdapter__incoming">Incoming</string>
|
||||
<!-- Displayed for outgoing calls -->
|
||||
<string name="CallLogAdapter__outgoing">Outgoing</string>
|
||||
<!-- Displayed for outgoing calls that were not accepted by the remote party -->
|
||||
<string name="CallLogAdapter__unanswered">Unanswered</string>
|
||||
<!-- Displayed for missed calls -->
|
||||
<string name="CallLogAdapter__missed">Missed</string>
|
||||
<!-- Displayed for one missed call declined by notification profile -->
|
||||
|
||||
Reference in New Issue
Block a user