kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix UI side of broken MMS fallback.
1) Actually tell the SendReceiveService to send the MMS if it is one. 2) Display the correct string (SMS vs MMS) in the fallback dialog.fork-5.53.8
rodzic
1c2e1a07f5
commit
983bf672cf
|
@ -58,8 +58,10 @@
|
|||
<string name="ConversationItem_group_action_modify">%1$s has updated the group.</string>
|
||||
<string name="ConversationItem_click_to_approve">Tap for SMS fallback</string>
|
||||
<string name="ConversationItem_click_to_approve_unencrypted">Tap for insecure fallback</string>
|
||||
<string name="ConversationItem_click_to_approve_dialog_title">Fallback to SMS?</string>
|
||||
<string name="ConversationItem_click_to_approve_unencrypted_dialog_title">Fallback to unencrypted SMS?</string>
|
||||
<string name="ConversationItem_click_to_approve_sms_dialog_title">Fallback to SMS?</string>
|
||||
<string name="ConversationItem_click_to_approve_mms_dialog_title">Fallback to MMS?</string>
|
||||
<string name="ConversationItem_click_to_approve_unencrypted_sms_dialog_title">Fallback to unencrypted SMS?</string>
|
||||
<string name="ConversationItem_click_to_approve_unencrypted_mms_dialog_title">Fallback to unencrypted MMS?</string>
|
||||
<string name="ConversationItem_click_to_approve_unencrypted_dialog_message">This message will <b>not</b> be encrypted because a secure session could not be established.\n\nSend insecure message?</string>
|
||||
|
||||
<!-- ConversationActivity -->
|
||||
|
|
|
@ -518,17 +518,24 @@ public class ConversationItem extends LinearLayout {
|
|||
private void handleMessageApproval() {
|
||||
final int title;
|
||||
final int message;
|
||||
|
||||
if (messageRecord.isPendingSecureSmsFallback()) {
|
||||
title = R.string.ConversationItem_click_to_approve_dialog_title;
|
||||
if (messageRecord.isMms()) title = R.string.ConversationItem_click_to_approve_mms_dialog_title;
|
||||
else title = R.string.ConversationItem_click_to_approve_sms_dialog_title;
|
||||
|
||||
message = -1;
|
||||
} else {
|
||||
title = R.string.ConversationItem_click_to_approve_unencrypted_dialog_title;
|
||||
if (messageRecord.isMms()) title = R.string.ConversationItem_click_to_approve_unencrypted_mms_dialog_title;
|
||||
else title = R.string.ConversationItem_click_to_approve_unencrypted_sms_dialog_title;
|
||||
|
||||
message = R.string.ConversationItem_click_to_approve_unencrypted_dialog_message;
|
||||
}
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setTitle(title);
|
||||
|
||||
if (message > -1) builder.setMessage(message);
|
||||
|
||||
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
|
@ -547,12 +554,17 @@ public class ConversationItem extends LinearLayout {
|
|||
database.markAsOutbox(messageRecord.getId());
|
||||
database.markAsForcedSms(messageRecord.getId());
|
||||
}
|
||||
|
||||
Intent intent = new Intent(context, SendReceiveService.class);
|
||||
intent.setAction(SendReceiveService.SEND_SMS_ACTION);
|
||||
intent.setAction(messageRecord.isMms() ?
|
||||
SendReceiveService.SEND_MMS_ACTION :
|
||||
SendReceiveService.SEND_SMS_ACTION);
|
||||
intent.putExtra(SendReceiveService.MASTER_SECRET_EXTRA, masterSecret);
|
||||
|
||||
context.startService(intent);
|
||||
}
|
||||
});
|
||||
|
||||
builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
|
|
Ładowanie…
Reference in New Issue