mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-22 02:36:55 +00:00
Migrate legacy png and webp to signal symbols.
This commit is contained in:
committed by
Nicholas Tinsley
parent
c021d26103
commit
0036b8e2d6
@@ -38,7 +38,6 @@ public class DeviceProvisioningActivity extends PassphraseRequiredActivity {
|
||||
.setOnDismissListener(dialog13 -> finish())
|
||||
.create();
|
||||
|
||||
dialog.setIcon(getResources().getDrawable(R.drawable.icon_dialog));
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ public class PassphrasePromptActivity extends PassphraseActivity {
|
||||
@Override
|
||||
public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult result) {
|
||||
Log.i(TAG, "onAuthenticationSucceeded");
|
||||
fingerprintPrompt.setImageResource(R.drawable.ic_check_white_48dp);
|
||||
fingerprintPrompt.setImageResource(R.drawable.symbol_check_white_48);
|
||||
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.green_500), PorterDuff.Mode.SRC_IN);
|
||||
fingerprintPrompt.animate().setInterpolator(new BounceInterpolator()).scaleX(1.1f).scaleY(1.1f).setDuration(500).setListener(new AnimationCompleteListener() {
|
||||
@Override
|
||||
@@ -388,7 +388,7 @@ public class PassphrasePromptActivity extends PassphraseActivity {
|
||||
public void onAuthenticationFailed() {
|
||||
Log.w(TAG, "onAuthenticationFailed()");
|
||||
|
||||
fingerprintPrompt.setImageResource(R.drawable.ic_close_white_48dp);
|
||||
fingerprintPrompt.setImageResource(R.drawable.symbol_x_white_48);
|
||||
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.red_500), PorterDuff.Mode.SRC_IN);
|
||||
|
||||
TranslateAnimation shake = new TranslateAnimation(0, 30, 0, 0);
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Button;
|
||||
|
||||
import org.thoughtcrime.securesms.preferences.MmsPreferencesActivity;
|
||||
|
||||
public class PromptMmsActivity extends PassphraseRequiredActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle bundle, boolean ready) {
|
||||
setContentView(R.layout.prompt_apn_activity);
|
||||
initializeResources();
|
||||
}
|
||||
|
||||
private void initializeResources() {
|
||||
Button okButton = findViewById(R.id.ok_button);
|
||||
Button cancelButton = findViewById(R.id.cancel_button);
|
||||
|
||||
okButton.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(PromptMmsActivity.this, MmsPreferencesActivity.class);
|
||||
intent.putExtras(PromptMmsActivity.this.getIntent().getExtras());
|
||||
startActivity(intent);
|
||||
finish();
|
||||
});
|
||||
|
||||
cancelButton.setOnClickListener(v -> finish());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -765,7 +765,7 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
|
||||
if (isFinishing()) return; // XXX Stuart added this check above, not sure why, so I'm repeating in ignorance. - moxie
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.RedPhone_number_not_registered)
|
||||
.setIcon(R.drawable.ic_warning)
|
||||
.setIcon(R.drawable.symbol_error_triangle_fill_24)
|
||||
.setMessage(R.string.RedPhone_the_number_you_dialed_does_not_support_secure_voice)
|
||||
.setCancelable(true)
|
||||
.setPositiveButton(R.string.RedPhone_got_it, (d, w) -> handleTerminate(event.getRecipient(), HangupMessage.Type.NORMAL))
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.components;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import android.util.AttributeSet;
|
||||
@@ -146,7 +147,7 @@ public class DeliveryStatusView extends AppCompatImageView {
|
||||
setVisibility(View.VISIBLE);
|
||||
ViewUtil.setPaddingStart(this, 0);
|
||||
ViewUtil.setPaddingEnd(this, horizontalPadding);
|
||||
setImageResource(R.drawable.ic_delivery_status_sending);
|
||||
setImageResource(R.drawable.symbol_messagestatus_sending_24);
|
||||
updateContentDescription();
|
||||
}
|
||||
|
||||
@@ -156,7 +157,7 @@ public class DeliveryStatusView extends AppCompatImageView {
|
||||
ViewUtil.setPaddingStart(this, horizontalPadding);
|
||||
ViewUtil.setPaddingEnd(this, 0);
|
||||
clearAnimation();
|
||||
setImageResource(R.drawable.ic_delivery_status_sent);
|
||||
setImageResource(R.drawable.symbol_messagestatus_sent_24);
|
||||
updateContentDescription();
|
||||
}
|
||||
|
||||
@@ -166,7 +167,7 @@ public class DeliveryStatusView extends AppCompatImageView {
|
||||
ViewUtil.setPaddingStart(this, horizontalPadding);
|
||||
ViewUtil.setPaddingEnd(this, 0);
|
||||
clearAnimation();
|
||||
setImageResource(R.drawable.ic_delivery_status_delivered);
|
||||
setImageResource(R.drawable.symbol_messagestatus_delivered_24);
|
||||
updateContentDescription();
|
||||
}
|
||||
|
||||
@@ -176,12 +177,12 @@ public class DeliveryStatusView extends AppCompatImageView {
|
||||
ViewUtil.setPaddingStart(this, horizontalPadding);
|
||||
ViewUtil.setPaddingEnd(this, 0);
|
||||
clearAnimation();
|
||||
setImageResource(R.drawable.ic_delivery_status_read);
|
||||
setImageResource(R.drawable.symbol_messagestatus_read_24);
|
||||
updateContentDescription();
|
||||
}
|
||||
|
||||
public void setTint(int color) {
|
||||
setColorFilter(color);
|
||||
setColorFilter(color, PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
|
||||
private void updateContentDescription() {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package org.thoughtcrime.securesms.components;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
@@ -15,11 +14,10 @@ import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.components.emoji.SimpleEmojiTextView;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.util.ContextUtil;
|
||||
import org.thoughtcrime.securesms.util.DrawableUtil;
|
||||
import org.thoughtcrime.securesms.util.SpanUtil;
|
||||
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class FromTextView extends SimpleEmojiTextView {
|
||||
|
||||
private static final String TAG = Log.tag(FromTextView.class);
|
||||
@@ -71,17 +69,23 @@ public class FromTextView extends SimpleEmojiTextView {
|
||||
|
||||
setText(builder);
|
||||
|
||||
if (recipient.isBlocked()) setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_block_grey600_18dp, 0, 0, 0);
|
||||
if (recipient.isBlocked()) setCompoundDrawablesRelativeWithIntrinsicBounds(getBlocked(), null, null, null);
|
||||
else if (recipient.isMuted()) setCompoundDrawablesRelativeWithIntrinsicBounds(getMuted(), null, null, null);
|
||||
else setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
private Drawable getBlocked() {
|
||||
return getDrawable(R.drawable.symbol_block_16);
|
||||
}
|
||||
|
||||
private Drawable getMuted() {
|
||||
Drawable mutedDrawable = Objects.requireNonNull(ContextCompat.getDrawable(getContext(), R.drawable.ic_bell_disabled_16));
|
||||
return getDrawable(R.drawable.ic_bell_disabled_16);
|
||||
}
|
||||
|
||||
private Drawable getDrawable(@DrawableRes int drawable) {
|
||||
Drawable mutedDrawable = ContextUtil.requireDrawable(getContext(), drawable);
|
||||
mutedDrawable.setBounds(0, 0, ViewUtil.dpToPx(18), ViewUtil.dpToPx(18));
|
||||
mutedDrawable.setColorFilter(new PorterDuffColorFilter(ContextCompat.getColor(getContext(), R.color.signal_icon_tint_secondary), PorterDuff.Mode.SRC_IN));
|
||||
|
||||
DrawableUtil.tint(mutedDrawable, ContextCompat.getColor(getContext(), R.color.signal_icon_tint_secondary));
|
||||
return mutedDrawable;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,13 +173,13 @@ public class SharedContactView extends LinearLayout implements RecipientForeverO
|
||||
private void presentAvatar(@Nullable Uri uri) {
|
||||
if (uri != null) {
|
||||
glideRequests.load(new DecryptableUri(uri))
|
||||
.fallback(R.drawable.ic_contact_picture)
|
||||
.fallback(R.drawable.symbol_person_display_40)
|
||||
.circleCrop()
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.dontAnimate()
|
||||
.into(avatarView);
|
||||
} else {
|
||||
glideRequests.load(R.drawable.ic_contact_picture)
|
||||
glideRequests.load(R.drawable.symbol_person_display_40)
|
||||
.circleCrop()
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.into(avatarView);
|
||||
|
||||
@@ -553,7 +553,7 @@ public class ThumbnailView extends FrameLayout {
|
||||
if (slide.isInProgress() || doNotShowMissingThumbnailImage) {
|
||||
return request;
|
||||
} else {
|
||||
return request.apply(RequestOptions.errorOf(R.drawable.ic_missing_thumbnail_picture));
|
||||
return request.apply(RequestOptions.errorOf(R.drawable.missing_thumbnail));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class UntrustedSendDialog extends AlertDialog.Builder implements DialogIn
|
||||
this.resendListener = resendListener;
|
||||
|
||||
setTitle(R.string.UntrustedSendDialog_send_message);
|
||||
setIcon(R.drawable.ic_warning);
|
||||
setIcon(R.drawable.symbol_error_triangle_fill_24);
|
||||
setMessage(message);
|
||||
setPositiveButton(R.string.UntrustedSendDialog_send, this);
|
||||
setNegativeButton(android.R.string.cancel, null);
|
||||
|
||||
@@ -31,7 +31,7 @@ public class UnverifiedSendDialog extends AlertDialog.Builder implements DialogI
|
||||
this.resendListener = resendListener;
|
||||
|
||||
setTitle(R.string.UnverifiedSendDialog_send_message);
|
||||
setIcon(R.drawable.ic_warning);
|
||||
setIcon(R.drawable.symbol_error_triangle_fill_24);
|
||||
setMessage(message);
|
||||
setPositiveButton(R.string.UnverifiedSendDialog_send, this);
|
||||
setNegativeButton(android.R.string.cancel, null);
|
||||
|
||||
@@ -219,7 +219,7 @@ class AppSettingsFragment : DSLSettingsFragment(
|
||||
|
||||
clickPref(
|
||||
title = DSLSettingsText.from(R.string.preferences__privacy),
|
||||
icon = DSLSettingsIcon.from(R.drawable.symbol_lock_24),
|
||||
icon = DSLSettingsIcon.from(R.drawable.symbol_lock_white_48),
|
||||
onClick = {
|
||||
findNavController().safeNavigate(R.id.action_appSettingsFragment_to_privacySettingsFragment)
|
||||
},
|
||||
|
||||
@@ -193,7 +193,7 @@ class PrivacySettingsFragment : DSLSettingsFragment(R.string.preferences__privac
|
||||
MaterialAlertDialogBuilder(requireContext()).apply {
|
||||
setTitle(R.string.ApplicationPreferencesActivity_disable_passphrase)
|
||||
setMessage(R.string.ApplicationPreferencesActivity_this_will_permanently_unlock_signal_and_message_notifications)
|
||||
setIcon(R.drawable.ic_warning)
|
||||
setIcon(R.drawable.symbol_error_triangle_fill_24)
|
||||
setPositiveButton(R.string.ApplicationPreferencesActivity_disable) { _, _ ->
|
||||
MasterSecretUtil.changeMasterSecretPassphrase(
|
||||
activity,
|
||||
|
||||
@@ -149,7 +149,7 @@ class SafetyNumberQrView : ConstraintLayout {
|
||||
|
||||
fun animateVerifiedSuccess() {
|
||||
val qrBitmap = (qrCode.drawable as BitmapDrawable).bitmap
|
||||
val qrSuccess: Bitmap = createVerifiedBitmap(qrBitmap.width, qrBitmap.height, R.drawable.ic_check_white_48dp)
|
||||
val qrSuccess: Bitmap = createVerifiedBitmap(qrBitmap.width, qrBitmap.height, R.drawable.symbol_check_white_48)
|
||||
qrVerified.setImageBitmap(qrSuccess)
|
||||
qrVerified.background.setColorFilter(resources.getColor(R.color.green_500), PorterDuff.Mode.MULTIPLY)
|
||||
tapLabel.setText(context.getString(R.string.verify_display_fragment__successful_match))
|
||||
@@ -158,7 +158,7 @@ class SafetyNumberQrView : ConstraintLayout {
|
||||
|
||||
fun animateVerifiedFailure() {
|
||||
val qrBitmap = (qrCode.drawable as BitmapDrawable).bitmap
|
||||
val qrSuccess: Bitmap = createVerifiedBitmap(qrBitmap.width, qrBitmap.height, R.drawable.ic_close_white_48dp)
|
||||
val qrSuccess: Bitmap = createVerifiedBitmap(qrBitmap.width, qrBitmap.height, R.drawable.symbol_x_white_48)
|
||||
qrVerified.setImageBitmap(qrSuccess)
|
||||
qrVerified.background.setColorFilter(resources.getColor(R.color.red_500), PorterDuff.Mode.MULTIPLY)
|
||||
tapLabel.setText(context.getString(R.string.verify_display_fragment__failed_to_verify_safety_number))
|
||||
|
||||
@@ -32,7 +32,7 @@ public class TransparentContactPhoto implements FallbackContactPhoto {
|
||||
|
||||
@Override
|
||||
public Drawable asCallCard(@NonNull Context context) {
|
||||
return ContextCompat.getDrawable(context, R.drawable.ic_contact_picture_large);
|
||||
return ContextCompat.getDrawable(context, R.drawable.symbol_person_display_40);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -139,7 +139,6 @@ class ContactFieldAdapter extends RecyclerView.Adapter<ContactFieldAdapter.Conta
|
||||
|
||||
final String value;
|
||||
final String label;
|
||||
final int iconResId;
|
||||
final int maxLines;
|
||||
final Selectable selectable;
|
||||
|
||||
@@ -148,7 +147,6 @@ class ContactFieldAdapter extends RecyclerView.Adapter<ContactFieldAdapter.Conta
|
||||
|
||||
Field(@NonNull Context context, @NonNull Phone phoneNumber, @NonNull Locale locale) {
|
||||
this.value = ContactUtil.getPrettyPhoneNumber(phoneNumber, locale);
|
||||
this.iconResId = R.drawable.ic_phone_right_unlock_solid_24;
|
||||
this.iconUri = null;
|
||||
this.maxLines = 1;
|
||||
this.selectable = phoneNumber;
|
||||
@@ -173,7 +171,6 @@ class ContactFieldAdapter extends RecyclerView.Adapter<ContactFieldAdapter.Conta
|
||||
|
||||
Field(@NonNull Context context, @NonNull Email email) {
|
||||
this.value = email.getEmail();
|
||||
this.iconResId = R.drawable.baseline_email_white_24;
|
||||
this.iconUri = null;
|
||||
this.maxLines = 1;
|
||||
this.selectable = email;
|
||||
@@ -198,7 +195,6 @@ class ContactFieldAdapter extends RecyclerView.Adapter<ContactFieldAdapter.Conta
|
||||
|
||||
Field(@NonNull Context context, @NonNull PostalAddress postalAddress) {
|
||||
this.value = postalAddress.toString();
|
||||
this.iconResId = R.drawable.ic_location_on_white_24dp;
|
||||
this.iconUri = null;
|
||||
this.maxLines = 3;
|
||||
this.selectable = postalAddress;
|
||||
@@ -220,7 +216,6 @@ class ContactFieldAdapter extends RecyclerView.Adapter<ContactFieldAdapter.Conta
|
||||
|
||||
Field(@NonNull Avatar avatar) {
|
||||
this.value = "";
|
||||
this.iconResId = R.drawable.baseline_account_circle_white_24;
|
||||
this.iconUri = avatar.getAttachment() != null ? avatar.getAttachment().getUri() : null;
|
||||
this.maxLines = 1;
|
||||
this.selectable = avatar;
|
||||
|
||||
@@ -173,12 +173,12 @@ public class SharedContactDetailsActivity extends PassphraseRequiredActivity {
|
||||
public void presentAvatar(@Nullable Uri uri) {
|
||||
if (uri != null) {
|
||||
glideRequests.load(new DecryptableUri(uri))
|
||||
.fallback(R.drawable.ic_contact_picture)
|
||||
.fallback(R.drawable.symbol_person_display_40)
|
||||
.circleCrop()
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.into(avatarView);
|
||||
} else {
|
||||
glideRequests.load(R.drawable.ic_contact_picture)
|
||||
glideRequests.load(R.drawable.symbol_person_display_40)
|
||||
.circleCrop()
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.into(avatarView);
|
||||
|
||||
@@ -1567,7 +1567,7 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
|
||||
}
|
||||
|
||||
private void setStatusIcons(MessageRecord messageRecord, boolean hasWallpaper) {
|
||||
bodyText.setCompoundDrawablesWithIntrinsicBounds(0, 0, messageRecord.isKeyExchange() ? R.drawable.ic_menu_login : 0, 0);
|
||||
bodyText.setCompoundDrawablesWithIntrinsicBounds(0, 0, messageRecord.isKeyExchange() ? R.drawable.symbol_key_24 : 0, 0);
|
||||
|
||||
if (!messageRecord.isMediaPending() && messageRecord.isFailed()) {
|
||||
alertView.setFailed();
|
||||
|
||||
@@ -16,7 +16,6 @@ import io.reactivex.rxjava3.kotlin.subscribeBy
|
||||
import org.signal.core.util.concurrent.LifecycleDisposable
|
||||
import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
|
||||
/**
|
||||
@@ -107,8 +106,6 @@ internal object ConversationOptionsMenu {
|
||||
if (!recipient.isGroup) {
|
||||
if (isPushAvailable) {
|
||||
menuInflater.inflate(R.menu.conversation_callable_secure, menu)
|
||||
} else if (!recipient.isReleaseNotes && SignalStore.misc().smsExportPhase.allowSmsFeatures()) {
|
||||
menuInflater.inflate(R.menu.conversation_callable_insecure, menu)
|
||||
}
|
||||
} else if (recipient.isGroup) {
|
||||
if (isActiveV2Group) {
|
||||
@@ -141,8 +138,6 @@ internal object ConversationOptionsMenu {
|
||||
if (isPushAvailable) {
|
||||
hideMenuItem(menu, R.id.menu_call_secure)
|
||||
hideMenuItem(menu, R.id.menu_video_secure)
|
||||
} else {
|
||||
hideMenuItem(menu, R.id.menu_call_insecure)
|
||||
}
|
||||
hideMenuItem(menu, R.id.menu_mute_notifications)
|
||||
}
|
||||
@@ -153,8 +148,6 @@ internal object ConversationOptionsMenu {
|
||||
hideMenuItem(menu, R.id.menu_video_secure)
|
||||
hideMenuItem(menu, R.id.menu_expiring_messages)
|
||||
hideMenuItem(menu, R.id.menu_expiring_messages_off)
|
||||
} else {
|
||||
hideMenuItem(menu, R.id.menu_call_insecure)
|
||||
}
|
||||
hideMenuItem(menu, R.id.menu_mute_notifications)
|
||||
}
|
||||
@@ -199,9 +192,8 @@ internal object ConversationOptionsMenu {
|
||||
|
||||
override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
|
||||
when (menuItem.itemId) {
|
||||
R.id.menu_call_secure -> callback.handleDial(true)
|
||||
R.id.menu_call_secure -> callback.handleDial()
|
||||
R.id.menu_video_secure -> callback.handleVideo()
|
||||
R.id.menu_call_insecure -> callback.handleDial(false)
|
||||
R.id.menu_view_media -> callback.handleViewMedia()
|
||||
R.id.menu_add_shortcut -> callback.handleAddShortcut()
|
||||
R.id.menu_search -> callback.handleSearch()
|
||||
@@ -266,7 +258,7 @@ internal object ConversationOptionsMenu {
|
||||
fun onOptionsMenuCreated(menu: Menu)
|
||||
|
||||
fun handleVideo()
|
||||
fun handleDial(isSecure: Boolean)
|
||||
fun handleDial()
|
||||
fun handleViewMedia()
|
||||
fun handleAddShortcut()
|
||||
fun handleSearch()
|
||||
|
||||
@@ -118,7 +118,8 @@ public class ConversationTitleView extends ConstraintLayout {
|
||||
Drawable endDrawable = null;
|
||||
|
||||
if (recipient != null && recipient.isBlocked()) {
|
||||
startDrawable = ContextUtil.requireDrawable(getContext(), R.drawable.ic_block_white_18dp);
|
||||
startDrawable = ContextUtil.requireDrawable(getContext(), R.drawable.symbol_block_16);
|
||||
startDrawable.setBounds(0, 0, ViewUtil.dpToPx(18), ViewUtil.dpToPx(18));
|
||||
} else if (recipient != null && recipient.isMuted()) {
|
||||
startDrawable = ContextUtil.requireDrawable(getContext(), R.drawable.ic_bell_disabled_16);
|
||||
startDrawable.setBounds(0, 0, ViewUtil.dpToPx(18), ViewUtil.dpToPx(18));
|
||||
|
||||
@@ -64,7 +64,7 @@ final class SafetyNumberChangeAdapter extends ListAdapter<ChangedRecipient, Safe
|
||||
if (changedRecipient.isUnverified() || changedRecipient.isVerified()) {
|
||||
subtitle.setText(R.string.safety_number_change_dialog__previous_verified);
|
||||
|
||||
Drawable check = DrawableUtil.tint(ContextUtil.requireDrawable(itemView.getContext(), R.drawable.check), ContextCompat.getColor(itemView.getContext(), R.color.signal_text_secondary));
|
||||
Drawable check = DrawableUtil.tint(ContextUtil.requireDrawable(itemView.getContext(), R.drawable.symbol_check_24), ContextCompat.getColor(itemView.getContext(), R.color.signal_text_secondary));
|
||||
check.setBounds(0, 0, ViewUtil.dpToPx(12), ViewUtil.dpToPx(12));
|
||||
subtitle.setCompoundDrawables(check, null, null, null);
|
||||
} else if (changedRecipient.getRecipient().hasAUserSetDisplayName(itemView.getContext())) {
|
||||
|
||||
@@ -3094,14 +3094,9 @@ class ConversationFragment :
|
||||
this@ConversationFragment.handleVideoCall()
|
||||
}
|
||||
|
||||
override fun handleDial(isSecure: Boolean) {
|
||||
override fun handleDial() {
|
||||
val recipient: Recipient = viewModel.recipientSnapshot ?: return
|
||||
|
||||
if (isSecure) {
|
||||
CommunicationActions.startVoiceCall(this@ConversationFragment, recipient)
|
||||
} else {
|
||||
CommunicationActions.startInsecureCall(this@ConversationFragment, recipient)
|
||||
}
|
||||
CommunicationActions.startVoiceCall(this@ConversationFragment, recipient)
|
||||
}
|
||||
|
||||
override fun handleViewMedia() {
|
||||
@@ -3500,7 +3495,7 @@ class ConversationFragment :
|
||||
.toTypedArray()
|
||||
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setIcon(R.drawable.ic_warning)
|
||||
.setIcon(R.drawable.symbol_error_triangle_fill_24)
|
||||
.setTitle(R.string.ConversationFragment__no_longer_verified)
|
||||
.setItems(unverifiedNames) { _, which: Int -> VerifyIdentityActivity.startOrShowExchangeMessagesDialog(requireContext(), unverifiedIdentities[which], false) }
|
||||
.show()
|
||||
|
||||
@@ -560,7 +560,7 @@ open class V2ConversationItemTextOnlyViewHolder<Model : MappingModel<Model>>(
|
||||
binding.body.setCompoundDrawablesWithIntrinsicBounds(
|
||||
0,
|
||||
0,
|
||||
if (record.isKeyExchange) R.drawable.ic_menu_login else 0,
|
||||
if (record.isKeyExchange) R.drawable.symbol_key_24 else 0,
|
||||
0
|
||||
)
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ public abstract class DeviceTransferSetupFragment extends LoggingFragment {
|
||||
Permissions.with(this)
|
||||
.request(WifiDirect.requiredPermission())
|
||||
.ifNecessary()
|
||||
.withRationaleDialog(getString(getErrorTextForStep(SetupStep.PERMISSIONS_DENIED)), false, R.drawable.ic_location_on_white_24dp)
|
||||
.withRationaleDialog(getString(getErrorTextForStep(SetupStep.PERMISSIONS_DENIED)), false, R.drawable.symbol_location_white_24)
|
||||
.withPermanentDenialDialog(getString(getErrorTextForStep(SetupStep.PERMISSIONS_DENIED)))
|
||||
.onAllGranted(() -> viewModel.onPermissionsGranted())
|
||||
.onAnyDenied(() -> viewModel.onLocationPermissionDenied())
|
||||
|
||||
@@ -126,7 +126,7 @@ public class FcmRefreshJob extends BaseJob {
|
||||
|
||||
builder.setSmallIcon(R.drawable.ic_notification);
|
||||
builder.setLargeIcon(BitmapFactory.decodeResource(context.getResources(),
|
||||
R.drawable.ic_action_warning_red));
|
||||
R.drawable.symbol_error_triangle_fill_32));
|
||||
builder.setContentTitle(context.getString(R.string.GcmRefreshJob_Permanent_Signal_communication_failure));
|
||||
builder.setContentText(context.getString(R.string.GcmRefreshJob_Signal_was_unable_to_register_with_Google_Play_Services));
|
||||
builder.setTicker(context.getString(R.string.GcmRefreshJob_Permanent_Signal_communication_failure));
|
||||
|
||||
@@ -586,7 +586,7 @@ class MediaPreviewV2Fragment : LoggingFragment(R.layout.fragment_media_preview_v
|
||||
val attachment: DatabaseAttachment = mediaItem.attachment ?: return
|
||||
|
||||
MaterialAlertDialogBuilder(requireContext()).apply {
|
||||
setIcon(R.drawable.ic_warning)
|
||||
setIcon(R.drawable.symbol_error_triangle_fill_24)
|
||||
setTitle(R.string.MediaPreviewActivity_media_delete_confirmation_title)
|
||||
setMessage(R.string.MediaPreviewActivity_media_delete_confirmation_message)
|
||||
setCancelable(true)
|
||||
|
||||
@@ -91,6 +91,6 @@ public class AudioSlide extends Slide {
|
||||
|
||||
@Override
|
||||
public @DrawableRes int getPlaceholderRes(Theme theme) {
|
||||
return R.drawable.ic_audio;
|
||||
return R.drawable.symbol_speaker_fill_24;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ sealed class NotificationBuilder(protected val context: Context) {
|
||||
val markAsRead: PendingIntent? = conversation.getMarkAsReadIntent(context)
|
||||
if (markAsRead != null) {
|
||||
val markAsReadAction: NotificationCompat.Action =
|
||||
NotificationCompat.Action.Builder(R.drawable.check, context.getString(R.string.MessageNotifier_mark_read), markAsRead)
|
||||
NotificationCompat.Action.Builder(R.drawable.symbol_check_24, context.getString(R.string.MessageNotifier_mark_read), markAsRead)
|
||||
.setSemanticAction(NotificationCompat.Action.SEMANTIC_ACTION_MARK_AS_READ)
|
||||
.setShowsUserInterface(false)
|
||||
.build()
|
||||
@@ -239,7 +239,7 @@ sealed class NotificationBuilder(protected val context: Context) {
|
||||
val markAsRead: PendingIntent? = state.getMarkAsReadIntent(context)
|
||||
|
||||
if (markAsRead != null) {
|
||||
val markAllAsReadAction = NotificationCompat.Action(R.drawable.check, context.getString(R.string.MessageNotifier_mark_all_as_read), markAsRead)
|
||||
val markAllAsReadAction = NotificationCompat.Action(R.drawable.symbol_check_24, context.getString(R.string.MessageNotifier_mark_all_as_read), markAsRead)
|
||||
builder.addAction(markAllAsReadAction)
|
||||
builder.extend(NotificationCompat.WearableExtender().addAction(markAllAsReadAction))
|
||||
}
|
||||
@@ -248,7 +248,7 @@ sealed class NotificationBuilder(protected val context: Context) {
|
||||
override fun addTurnOffJoinedNotificationsAction(pendingIntent: PendingIntent?) {
|
||||
if (pendingIntent != null) {
|
||||
val turnOffTheseNotifications = NotificationCompat.Action(
|
||||
R.drawable.check,
|
||||
R.drawable.symbol_check_24,
|
||||
context.getString(R.string.MessageNotifier_turn_off_these_notifications),
|
||||
pendingIntent
|
||||
)
|
||||
|
||||
@@ -357,7 +357,7 @@ object NotificationFactory {
|
||||
|
||||
builder.apply {
|
||||
setSmallIcon(R.drawable.ic_notification)
|
||||
setLargeIcon(BitmapFactory.decodeResource(context.resources, R.drawable.ic_action_warning_red))
|
||||
setLargeIcon(BitmapFactory.decodeResource(context.resources, R.drawable.symbol_error_triangle_fill_32))
|
||||
setContentTitle(context.getString(R.string.MessageNotifier_message_delivery_failed))
|
||||
setContentText(context.getString(R.string.MessageNotifier_failed_to_deliver_message))
|
||||
setTicker(context.getString(R.string.MessageNotifier_error_delivering_message))
|
||||
|
||||
@@ -272,7 +272,7 @@ public class KeyCachingService extends Service {
|
||||
builder.setPriority(Notification.PRIORITY_MIN);
|
||||
builder.setOngoing(true);
|
||||
|
||||
builder.addAction(R.drawable.ic_menu_lock_dark, getString(R.string.KeyCachingService_lock), buildLockIntent());
|
||||
builder.addAction(R.drawable.symbol_lock_24, getString(R.string.KeyCachingService_lock), buildLockIntent());
|
||||
builder.setContentIntent(buildLaunchIntent());
|
||||
|
||||
stopForeground(true);
|
||||
|
||||
@@ -25,6 +25,8 @@ import org.thoughtcrime.securesms.database.model.StickerPackRecord;
|
||||
import org.thoughtcrime.securesms.glide.cache.ApngOptions;
|
||||
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader.DecryptableUri;
|
||||
import org.thoughtcrime.securesms.mms.GlideRequests;
|
||||
import org.thoughtcrime.securesms.util.DrawableUtil;
|
||||
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||
import org.thoughtcrime.securesms.util.adapter.SectionedRecyclerViewAdapter;
|
||||
import org.thoughtcrime.securesms.util.adapter.StableIdGenerator;
|
||||
|
||||
@@ -304,10 +306,10 @@ final class StickerManagementAdapter extends SectionedRecyclerViewAdapter<String
|
||||
|
||||
private static @NonNull CharSequence buildBlessedBadge(@NonNull Context context) {
|
||||
SpannableString badgeSpan = new SpannableString(" ");
|
||||
Drawable badge = ContextCompat.getDrawable(context, R.drawable.ic_check_circle_white_18dp);
|
||||
Drawable badge = ContextCompat.getDrawable(context, R.drawable.symbol_check_circle_fill_24);
|
||||
|
||||
badge.setBounds(0, 0, badge.getIntrinsicWidth(), badge.getIntrinsicHeight());
|
||||
badge.setColorFilter(ContextCompat.getColor(context, R.color.core_ultramarine), PorterDuff.Mode.MULTIPLY);
|
||||
badge.setBounds(0, 0, ViewUtil.dpToPx(18), ViewUtil.dpToPx(18));
|
||||
DrawableUtil.tint(badge, ContextCompat.getColor(context, R.color.core_ultramarine));
|
||||
badgeSpan.setSpan(new ImageSpan(badge), 1, badgeSpan.length(), 0);
|
||||
|
||||
return badgeSpan;
|
||||
|
||||
@@ -438,7 +438,7 @@ public class SaveAttachmentTask extends ProgressDialogAsyncTask<SaveAttachmentTa
|
||||
public static void showWarningDialog(Context context, OnClickListener onAcceptListener, int count) {
|
||||
AlertDialog.Builder builder = new MaterialAlertDialogBuilder(context);
|
||||
builder.setTitle(R.string.ConversationFragment_save_to_sd_card);
|
||||
builder.setIcon(R.drawable.ic_warning);
|
||||
builder.setIcon(R.drawable.symbol_error_triangle_fill_24);
|
||||
builder.setCancelable(true);
|
||||
builder.setMessage(context.getResources().getQuantityString(R.plurals.ConversationFragment_saving_n_media_to_storage_warning,
|
||||
count, count));
|
||||
|
||||
@@ -55,7 +55,7 @@ object SaveAttachmentUtil {
|
||||
fun showWarningDialog(context: Context, count: Int, onAcceptListener: OnClickListener) {
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setTitle(R.string.ConversationFragment_save_to_sd_card)
|
||||
.setIcon(R.drawable.ic_warning)
|
||||
.setIcon(R.drawable.symbol_error_triangle_fill_24)
|
||||
.setCancelable(true)
|
||||
.setMessage(context.resources.getQuantityString(R.plurals.ConversationFragment_saving_n_media_to_storage_warning, count, count))
|
||||
.setPositiveButton(R.string.yes, onAcceptListener)
|
||||
|
||||
@@ -122,7 +122,7 @@ public class CallNotificationBuilder {
|
||||
return builder.build();
|
||||
} else if (type == TYPE_OUTGOING_RINGING) {
|
||||
builder.setContentText(context.getString(R.string.NotificationBarManager__establishing_signal_call));
|
||||
builder.addAction(getServiceNotificationAction(context, WebRtcCallService.hangupIntent(context), R.drawable.ic_call_end_grey600_32dp, R.string.NotificationBarManager__cancel_call));
|
||||
builder.addAction(getServiceNotificationAction(context, WebRtcCallService.hangupIntent(context), R.drawable.symbol_phone_down_fill_24, R.string.NotificationBarManager__cancel_call));
|
||||
return builder.build();
|
||||
} else {
|
||||
builder.setContentText(getOngoingCallContentText(context, recipient, isVideoCall));
|
||||
|
||||
Reference in New Issue
Block a user