Search in sources :

Example 21 with SlideDeck

use of org.thoughtcrime.securesms.mms.SlideDeck in project Signal-Android by WhisperSystems.

the class MessageContentProcessor method handleSynchronizeSentTextMessage.

private long handleSynchronizeSentTextMessage(@NonNull SentTranscriptMessage message, long envelopeTimestamp) throws MmsException, BadGroupIdException {
    log(envelopeTimestamp, "Synchronize sent text message for " + message.getTimestamp());
    Recipient recipient = getSyncMessageDestination(message);
    String body = message.getMessage().getBody().or("");
    long expiresInMillis = TimeUnit.SECONDS.toMillis(message.getMessage().getExpiresInSeconds());
    if (recipient.getExpiresInSeconds() != message.getMessage().getExpiresInSeconds()) {
        handleSynchronizeSentExpirationUpdate(message);
    }
    long threadId = SignalDatabase.threads().getOrCreateThreadIdFor(recipient);
    boolean isGroup = recipient.isGroup();
    MessageDatabase database;
    long messageId;
    if (isGroup) {
        OutgoingMediaMessage outgoingMediaMessage = new OutgoingMediaMessage(recipient, new SlideDeck(), body, message.getTimestamp(), -1, expiresInMillis, false, ThreadDatabase.DistributionTypes.DEFAULT, null, Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
        outgoingMediaMessage = new OutgoingSecureMediaMessage(outgoingMediaMessage);
        messageId = SignalDatabase.mms().insertMessageOutbox(outgoingMediaMessage, threadId, false, GroupReceiptDatabase.STATUS_UNKNOWN, null);
        database = SignalDatabase.mms();
        updateGroupReceiptStatus(message, messageId, recipient.requireGroupId());
    } else {
        OutgoingTextMessage outgoingTextMessage = new OutgoingEncryptedMessage(recipient, body, expiresInMillis);
        messageId = SignalDatabase.sms().insertMessageOutbox(threadId, outgoingTextMessage, false, message.getTimestamp(), null);
        database = SignalDatabase.sms();
        database.markUnidentified(messageId, isUnidentified(message, recipient));
        SignalDatabase.threads().update(threadId, true);
    }
    database.markAsSent(messageId, true);
    if (expiresInMillis > 0) {
        database.markExpireStarted(messageId, message.getExpirationStartTimestamp());
        ApplicationDependencies.getExpiringMessageManager().scheduleDeletion(messageId, isGroup, message.getExpirationStartTimestamp(), expiresInMillis);
    }
    if (recipient.isSelf()) {
        SyncMessageId id = new SyncMessageId(recipient.getId(), message.getTimestamp());
        SignalDatabase.mmsSms().incrementDeliveryReceiptCount(id, System.currentTimeMillis());
        SignalDatabase.mmsSms().incrementReadReceiptCount(id, System.currentTimeMillis());
    }
    return threadId;
}
Also used : OutgoingTextMessage(org.thoughtcrime.securesms.sms.OutgoingTextMessage) MessageDatabase(org.thoughtcrime.securesms.database.MessageDatabase) OutgoingSecureMediaMessage(org.thoughtcrime.securesms.mms.OutgoingSecureMediaMessage) OutgoingEncryptedMessage(org.thoughtcrime.securesms.sms.OutgoingEncryptedMessage) Recipient(org.thoughtcrime.securesms.recipients.Recipient) OutgoingMediaMessage(org.thoughtcrime.securesms.mms.OutgoingMediaMessage) SlideDeck(org.thoughtcrime.securesms.mms.SlideDeck) SyncMessageId(org.thoughtcrime.securesms.database.MessageDatabase.SyncMessageId)

Example 22 with SlideDeck

use of org.thoughtcrime.securesms.mms.SlideDeck in project Signal-Android by signalapp.

the class ThreadDatabase method getAttachmentUriFor.

@Nullable
private Uri getAttachmentUriFor(MessageRecord record) {
    if (!record.isMms() || record.isMmsNotification() || record.isGroupAction())
        return null;
    SlideDeck slideDeck = ((MediaMmsMessageRecord) record).getSlideDeck();
    Slide thumbnail = Optional.fromNullable(slideDeck.getThumbnailSlide()).or(Optional.fromNullable(slideDeck.getStickerSlide())).orNull();
    if (thumbnail != null && !((MmsMessageRecord) record).isViewOnce()) {
        return thumbnail.getUri();
    }
    return null;
}
Also used : MediaMmsMessageRecord(org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord) StickerSlide(org.thoughtcrime.securesms.mms.StickerSlide) Slide(org.thoughtcrime.securesms.mms.Slide) SlideDeck(org.thoughtcrime.securesms.mms.SlideDeck) MmsMessageRecord(org.thoughtcrime.securesms.database.model.MmsMessageRecord) MediaMmsMessageRecord(org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord) Nullable(androidx.annotation.Nullable)

Example 23 with SlideDeck

use of org.thoughtcrime.securesms.mms.SlideDeck in project Signal-Android by signalapp.

the class MultiShareSender method sendSync.

@WorkerThread
public static MultiShareSendResultCollection sendSync(@NonNull MultiShareArgs multiShareArgs) {
    List<MultiShareSendResult> results = new ArrayList<>(multiShareArgs.getShareContactAndThreads().size());
    Context context = ApplicationDependencies.getApplication();
    boolean isMmsEnabled = Util.isMmsCapable(context);
    String message = multiShareArgs.getDraftText();
    SlideDeck slideDeck;
    try {
        slideDeck = buildSlideDeck(context, multiShareArgs);
    } catch (SlideNotFoundException e) {
        Log.w(TAG, "Could not create slide for media message");
        for (ShareContactAndThread shareContactAndThread : multiShareArgs.getShareContactAndThreads()) {
            results.add(new MultiShareSendResult(shareContactAndThread, MultiShareSendResult.Type.GENERIC_ERROR));
        }
        return new MultiShareSendResultCollection(results);
    }
    for (ShareContactAndThread shareContactAndThread : multiShareArgs.getShareContactAndThreads()) {
        Recipient recipient = Recipient.resolved(shareContactAndThread.getRecipientId());
        List<Mention> mentions = getValidMentionsForRecipient(recipient, multiShareArgs.getMentions());
        TransportOption transport = resolveTransportOption(context, recipient);
        boolean forceSms = recipient.isForceSmsSelection() && transport.isSms();
        int subscriptionId = transport.getSimSubscriptionId().or(-1);
        long expiresIn = TimeUnit.SECONDS.toMillis(recipient.getExpiresInSeconds());
        boolean needsSplit = !transport.isSms() && message != null && message.length() > transport.calculateCharacters(message).maxPrimaryMessageSize;
        boolean isMediaMessage = !multiShareArgs.getMedia().isEmpty() || (multiShareArgs.getDataUri() != null && multiShareArgs.getDataUri() != Uri.EMPTY) || multiShareArgs.getStickerLocator() != null || multiShareArgs.getLinkPreview() != null || recipient.isGroup() || recipient.getEmail().isPresent() || !mentions.isEmpty() || needsSplit;
        if ((recipient.isMmsGroup() || recipient.getEmail().isPresent()) && !isMmsEnabled) {
            results.add(new MultiShareSendResult(shareContactAndThread, MultiShareSendResult.Type.MMS_NOT_ENABLED));
        } else if (isMediaMessage) {
            sendMediaMessage(context, multiShareArgs, recipient, slideDeck, transport, shareContactAndThread.getThreadId(), forceSms, expiresIn, multiShareArgs.isViewOnce(), subscriptionId, mentions);
            results.add(new MultiShareSendResult(shareContactAndThread, MultiShareSendResult.Type.SUCCESS));
        } else {
            sendTextMessage(context, multiShareArgs, recipient, shareContactAndThread.getThreadId(), forceSms, expiresIn, subscriptionId);
            results.add(new MultiShareSendResult(shareContactAndThread, MultiShareSendResult.Type.SUCCESS));
        }
        // XXX We must do this to avoid sending out messages to the same recipient with the same
        // sentTimestamp. If we do this, they'll be considered dupes by the receiver.
        ThreadUtil.sleep(5);
    }
    return new MultiShareSendResultCollection(results);
}
Also used : Context(android.content.Context) ArrayList(java.util.ArrayList) Recipient(org.thoughtcrime.securesms.recipients.Recipient) SlideDeck(org.thoughtcrime.securesms.mms.SlideDeck) TransportOption(org.thoughtcrime.securesms.TransportOption) Mention(org.thoughtcrime.securesms.database.model.Mention) WorkerThread(androidx.annotation.WorkerThread)

Example 24 with SlideDeck

use of org.thoughtcrime.securesms.mms.SlideDeck in project Signal-Android by signalapp.

the class ConversationParentFragment method sendSticker.

private void sendSticker(@NonNull StickerLocator stickerLocator, @NonNull String contentType, @NonNull Uri uri, long size, boolean clearCompose) {
    if (sendButton.getSelectedTransport().isSms()) {
        Media media = new Media(uri, contentType, System.currentTimeMillis(), StickerSlide.WIDTH, StickerSlide.HEIGHT, size, 0, false, false, Optional.absent(), Optional.absent(), Optional.absent());
        Intent intent = MediaSelectionActivity.editor(requireContext(), sendButton.getSelectedTransport(), Collections.singletonList(media), recipient.getId(), composeText.getTextTrimmed());
        startActivityForResult(intent, MEDIA_SENDER);
        return;
    }
    long expiresIn = TimeUnit.SECONDS.toMillis(recipient.get().getExpiresInSeconds());
    int subscriptionId = sendButton.getSelectedTransport().getSimSubscriptionId().or(-1);
    boolean initiating = threadId == -1;
    TransportOption transport = sendButton.getSelectedTransport();
    SlideDeck slideDeck = new SlideDeck();
    Slide stickerSlide = new StickerSlide(requireContext(), uri, size, stickerLocator, contentType);
    slideDeck.addSlide(stickerSlide);
    sendMediaMessage(recipient.getId(), transport.isSms(), "", slideDeck, null, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), expiresIn, false, subscriptionId, initiating, clearCompose, null);
}
Also used : TransportOption(org.thoughtcrime.securesms.TransportOption) LocationSlide(org.thoughtcrime.securesms.mms.LocationSlide) StickerSlide(org.thoughtcrime.securesms.mms.StickerSlide) Slide(org.thoughtcrime.securesms.mms.Slide) GifSlide(org.thoughtcrime.securesms.mms.GifSlide) ImageSlide(org.thoughtcrime.securesms.mms.ImageSlide) AudioSlide(org.thoughtcrime.securesms.mms.AudioSlide) VideoSlide(org.thoughtcrime.securesms.mms.VideoSlide) Media(org.thoughtcrime.securesms.mediasend.Media) PendingIntent(android.app.PendingIntent) Intent(android.content.Intent) SlideDeck(org.thoughtcrime.securesms.mms.SlideDeck) StickerSlide(org.thoughtcrime.securesms.mms.StickerSlide) SuppressLint(android.annotation.SuppressLint)

Example 25 with SlideDeck

use of org.thoughtcrime.securesms.mms.SlideDeck in project Signal-Android by signalapp.

the class ConversationParentFragment method onActivityResult.

@Override
public void onActivityResult(final int reqCode, int resultCode, Intent data) {
    Log.i(TAG, "onActivityResult called: " + reqCode + ", " + resultCode + " , " + data);
    super.onActivityResult(reqCode, resultCode, data);
    if ((data == null && reqCode != TAKE_PHOTO && reqCode != SMS_DEFAULT) || (resultCode != Activity.RESULT_OK && reqCode != SMS_DEFAULT)) {
        updateLinkPreviewState();
        SignalStore.settings().setDefaultSms(Util.isDefaultSmsProvider(requireContext()));
        return;
    }
    switch(reqCode) {
        case PICK_DOCUMENT:
            setMedia(data.getData(), MediaType.DOCUMENT);
            break;
        case PICK_AUDIO:
            setMedia(data.getData(), MediaType.AUDIO);
            break;
        case PICK_CONTACT:
            if (isSecureText && !isSmsForced()) {
                openContactShareEditor(data.getData());
            } else {
                addAttachmentContactInfo(data.getData());
            }
            break;
        case GET_CONTACT_DETAILS:
            sendSharedContact(data.getParcelableArrayListExtra(ContactShareEditActivity.KEY_CONTACTS));
            break;
        case GROUP_EDIT:
            Recipient recipientSnapshot = recipient.get();
            onRecipientChanged(recipientSnapshot);
            titleView.setTitle(glideRequests, recipientSnapshot);
            NotificationChannels.updateContactChannelName(requireContext(), recipientSnapshot);
            setBlockedUserState(recipientSnapshot, isSecureText, isDefaultSms);
            invalidateOptionsMenu();
            break;
        case TAKE_PHOTO:
            handleImageFromDeviceCameraApp();
            break;
        case ADD_CONTACT:
            SimpleTask.run(() -> {
                try {
                    DirectoryHelper.refreshDirectoryFor(requireContext(), recipient.get(), false);
                } catch (IOException e) {
                    Log.w(TAG, "Failed to refresh user after adding to contacts.");
                }
                return null;
            }, nothing -> onRecipientChanged(recipient.get()));
            break;
        case PICK_LOCATION:
            SignalPlace place = new SignalPlace(PlacePickerActivity.addressFromData(data));
            attachmentManager.setLocation(place, getCurrentMediaConstraints());
            break;
        case PICK_GIF:
            onGifSelectSuccess(data.getData(), data.getIntExtra(GiphyActivity.EXTRA_WIDTH, 0), data.getIntExtra(GiphyActivity.EXTRA_HEIGHT, 0));
            break;
        case SMS_DEFAULT:
            initializeSecurity(isSecureText, isDefaultSms);
            break;
        case MEDIA_SENDER:
            MediaSendActivityResult result = MediaSendActivityResult.fromData(data);
            if (!Objects.equals(result.getRecipientId(), recipient.getId())) {
                Log.w(TAG, "Result's recipientId did not match ours! Result: " + result.getRecipientId() + ", Activity: " + recipient.getId());
                Toast.makeText(requireContext(), R.string.ConversationActivity_error_sending_media, Toast.LENGTH_SHORT).show();
                return;
            }
            sendButton.setTransport(result.getTransport());
            if (result.isPushPreUpload()) {
                sendMediaMessage(result);
                return;
            }
            long expiresIn = TimeUnit.SECONDS.toMillis(recipient.get().getExpiresInSeconds());
            int subscriptionId = sendButton.getSelectedTransport().getSimSubscriptionId().or(-1);
            boolean initiating = threadId == -1;
            QuoteModel quote = result.isViewOnce() ? null : inputPanel.getQuote().orNull();
            SlideDeck slideDeck = new SlideDeck();
            List<Mention> mentions = new ArrayList<>(result.getMentions());
            for (Media mediaItem : result.getNonUploadedMedia()) {
                if (MediaUtil.isVideoType(mediaItem.getMimeType())) {
                    slideDeck.addSlide(new VideoSlide(requireContext(), mediaItem.getUri(), mediaItem.getSize(), mediaItem.isVideoGif(), mediaItem.getWidth(), mediaItem.getHeight(), mediaItem.getCaption().orNull(), mediaItem.getTransformProperties().orNull()));
                } else if (MediaUtil.isGif(mediaItem.getMimeType())) {
                    slideDeck.addSlide(new GifSlide(requireContext(), mediaItem.getUri(), mediaItem.getSize(), mediaItem.getWidth(), mediaItem.getHeight(), mediaItem.isBorderless(), mediaItem.getCaption().orNull()));
                } else if (MediaUtil.isImageType(mediaItem.getMimeType())) {
                    slideDeck.addSlide(new ImageSlide(requireContext(), mediaItem.getUri(), mediaItem.getMimeType(), mediaItem.getSize(), mediaItem.getWidth(), mediaItem.getHeight(), mediaItem.isBorderless(), mediaItem.getCaption().orNull(), null, mediaItem.getTransformProperties().orNull()));
                } else {
                    Log.w(TAG, "Asked to send an unexpected mimeType: '" + mediaItem.getMimeType() + "'. Skipping.");
                }
            }
            final Context context = requireContext().getApplicationContext();
            sendMediaMessage(result.getRecipientId(), result.getTransport().isSms(), result.getBody(), slideDeck, quote, Collections.emptyList(), Collections.emptyList(), mentions, expiresIn, result.isViewOnce(), subscriptionId, initiating, true, null).addListener(new AssertedSuccessListener<Void>() {

                @Override
                public void onSuccess(Void result) {
                    AsyncTask.THREAD_POOL_EXECUTOR.execute(() -> {
                        Stream.of(slideDeck.getSlides()).map(Slide::getUri).withoutNulls().filter(BlobProvider::isAuthority).forEach(uri -> BlobProvider.getInstance().delete(context, uri));
                    });
                }
            });
            break;
    }
}
Also used : VideoSlide(org.thoughtcrime.securesms.mms.VideoSlide) Context(android.content.Context) Bundle(android.os.Bundle) BubbleOptOutReminder(org.thoughtcrime.securesms.components.reminder.BubbleOptOutReminder) LinkPreview(org.thoughtcrime.securesms.linkpreview.LinkPreview) NonNull(androidx.annotation.NonNull) ContextUtil(org.thoughtcrime.securesms.util.ContextUtil) OnBackPressedCallback(androidx.activity.OnBackPressedCallback) Media(org.thoughtcrime.securesms.mediasend.Media) EmojiEventListener(org.thoughtcrime.securesms.components.emoji.EmojiEventListener) ContextCompat(androidx.core.content.ContextCompat) OutgoingTextMessage(org.thoughtcrime.securesms.sms.OutgoingTextMessage) ConversationMessageFactory(org.thoughtcrime.securesms.conversation.ConversationMessage.ConversationMessageFactory) DecryptableStreamUriLoader(org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader) EmojiStrings(org.thoughtcrime.securesms.components.emoji.EmojiStrings) ApplicationDependencies(org.thoughtcrime.securesms.dependencies.ApplicationDependencies) IntentFilter(android.content.IntentFilter) CanNotSendPaymentDialog(org.thoughtcrime.securesms.payments.CanNotSendPaymentDialog) StickerSearchDialogFragment(org.thoughtcrime.securesms.keyboard.sticker.StickerSearchDialogFragment) SearchView(androidx.appcompat.widget.SearchView) AnimatingToggle(org.thoughtcrime.securesms.components.AnimatingToggle) GroupDatabase(org.thoughtcrime.securesms.database.GroupDatabase) ThreadDatabase(org.thoughtcrime.securesms.database.ThreadDatabase) ChatWallpaper(org.thoughtcrime.securesms.wallpaper.ChatWallpaper) GroupChangeFailureReason(org.thoughtcrime.securesms.groups.ui.GroupChangeFailureReason) ServiceOutageReminder(org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder) OutgoingMediaMessage(org.thoughtcrime.securesms.mms.OutgoingMediaMessage) MediaUtil(org.thoughtcrime.securesms.util.MediaUtil) QuoteId(org.thoughtcrime.securesms.mms.QuoteId) Types(org.thoughtcrime.securesms.database.MmsSmsColumns.Types) SignalDatabase(org.thoughtcrime.securesms.database.SignalDatabase) Stream(com.annimon.stream.Stream) MediaKeyboardMode(org.thoughtcrime.securesms.util.TextSecurePreferences.MediaKeyboardMode) MainActivity(org.thoughtcrime.securesms.MainActivity) GroupRecord(org.thoughtcrime.securesms.database.GroupDatabase.GroupRecord) DrawableCompat(androidx.core.graphics.drawable.DrawableCompat) RetrieveProfileJob(org.thoughtcrime.securesms.jobs.RetrieveProfileJob) ReviewBannerView(org.thoughtcrime.securesms.profiles.spoofing.ReviewBannerView) ReminderView(org.thoughtcrime.securesms.components.reminder.ReminderView) MessageRequestState(org.thoughtcrime.securesms.messagerequests.MessageRequestState) SpannableStringBuilder(android.text.SpannableStringBuilder) MenuInflater(android.view.MenuInflater) Toast(android.widget.Toast) Menu(android.view.Menu) UnverifiedBannerView(org.thoughtcrime.securesms.components.identity.UnverifiedBannerView) Type(org.thoughtcrime.securesms.TransportOption.Type) Settings(android.provider.Settings) OutgoingEncryptedMessage(org.thoughtcrime.securesms.sms.OutgoingEncryptedMessage) SignalSessionLock(org.whispersystems.signalservice.api.SignalSessionLock) ListenableFuture(org.thoughtcrime.securesms.util.concurrent.ListenableFuture) LiveRecipient(org.thoughtcrime.securesms.recipients.LiveRecipient) CustomTarget(com.bumptech.glide.request.target.CustomTarget) MessageId(org.thoughtcrime.securesms.database.model.MessageId) StickerSearchRepository(org.thoughtcrime.securesms.stickers.StickerSearchRepository) Collectors(com.annimon.stream.Collectors) DraftRepository(org.thoughtcrime.securesms.conversation.drafts.DraftRepository) UpdatedBodyAndMentions(org.thoughtcrime.securesms.database.MentionUtil.UpdatedBodyAndMentions) SafetyNumberChangeDialog(org.thoughtcrime.securesms.conversation.ui.error.SafetyNumberChangeDialog) IOException(java.io.IOException) GroupCallPeekEvent(org.thoughtcrime.securesms.events.GroupCallPeekEvent) ConversationUtil(org.thoughtcrime.securesms.util.ConversationUtil) VoiceNoteDraft(org.thoughtcrime.securesms.components.voice.VoiceNoteDraft) ManagePendingAndRequestingMembersActivity(org.thoughtcrime.securesms.groups.ui.invitesandrequests.ManagePendingAndRequestingMembersActivity) InviteReminderRepository(org.thoughtcrime.securesms.invites.InviteReminderRepository) Optional(org.whispersystems.libsignal.util.guava.Optional) ExecutionException(java.util.concurrent.ExecutionException) Reminder(org.thoughtcrime.securesms.components.reminder.Reminder) IconCompat(androidx.core.graphics.drawable.IconCompat) StickerLocator(org.thoughtcrime.securesms.stickers.StickerLocator) Drafts(org.thoughtcrime.securesms.database.DraftDatabase.Drafts) Camera(android.hardware.Camera) ImageButton(android.widget.ImageButton) ReentrantSessionLock(org.thoughtcrime.securesms.crypto.ReentrantSessionLock) StickerKeyboardPageFragment(org.thoughtcrime.securesms.keyboard.sticker.StickerKeyboardPageFragment) MaterialAlertDialogBuilder(com.google.android.material.dialog.MaterialAlertDialogBuilder) WindowManager(android.view.WindowManager) RequestGroupV2InfoJob(org.thoughtcrime.securesms.jobs.RequestGroupV2InfoJob) DrawableUtil(org.thoughtcrime.securesms.util.DrawableUtil) ViewUtil(org.thoughtcrime.securesms.util.ViewUtil) MediaKeyboard(org.thoughtcrime.securesms.components.emoji.MediaKeyboard) TypingStatusSender(org.thoughtcrime.securesms.components.TypingStatusSender) GroupV1MigrationJob(org.thoughtcrime.securesms.jobs.GroupV1MigrationJob) AttachmentManager(org.thoughtcrime.securesms.mms.AttachmentManager) PlayStoreUtil(org.thoughtcrime.securesms.util.PlayStoreUtil) LocationSlide(org.thoughtcrime.securesms.mms.LocationSlide) ContactsContract(android.provider.ContactsContract) OnFocusChangeListener(android.view.View.OnFocusChangeListener) SecurityEvent(org.thoughtcrime.securesms.crypto.SecurityEvent) RegisteredState(org.thoughtcrime.securesms.database.RecipientDatabase.RegisteredState) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Locale(java.util.Locale) AsynchronousCallback(org.thoughtcrime.securesms.util.AsynchronousCallback) ActivityInfo(android.content.pm.ActivityInfo) Button(android.widget.Button) VoiceNotePlaybackState(org.thoughtcrime.securesms.components.voice.VoiceNotePlaybackState) StickerSlide(org.thoughtcrime.securesms.mms.StickerSlide) AsyncTask(android.os.AsyncTask) RecipientDisappearingMessagesActivity(org.thoughtcrime.securesms.recipients.ui.disappearingmessages.RecipientDisappearingMessagesActivity) VoiceNotePlayerView(org.thoughtcrime.securesms.components.voice.VoiceNotePlayerView) OutgoingSecureMediaMessage(org.thoughtcrime.securesms.mms.OutgoingSecureMediaMessage) CharacterState(org.thoughtcrime.securesms.util.CharacterCalculator.CharacterState) PorterDuff(android.graphics.PorterDuff) ThreadUtil(org.signal.core.util.ThreadUtil) LinkPreviewViewModel(org.thoughtcrime.securesms.linkpreview.LinkPreviewViewModel) Objects(java.util.Objects) ChatWallpaperDimLevelUtil(org.thoughtcrime.securesms.wallpaper.ChatWallpaperDimLevelUtil) GroupsV1MigrationSuggestionsDialog(org.thoughtcrime.securesms.groups.ui.migration.GroupsV1MigrationSuggestionsDialog) Slide(org.thoughtcrime.securesms.mms.Slide) ActivityNotFoundException(android.content.ActivityNotFoundException) SignalPlace(org.thoughtcrime.securesms.components.location.SignalPlace) Draft(org.thoughtcrime.securesms.database.DraftDatabase.Draft) Toolbar(androidx.appcompat.widget.Toolbar) GiphyActivity(org.thoughtcrime.securesms.giph.ui.GiphyActivity) SmsUtil(org.thoughtcrime.securesms.util.SmsUtil) EditorInfo(android.view.inputmethod.EditorInfo) AlertDialog(androidx.appcompat.app.AlertDialog) KeyboardPage(org.thoughtcrime.securesms.keyboard.KeyboardPage) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) RecipientDatabase(org.thoughtcrime.securesms.database.RecipientDatabase) MenuItem(android.view.MenuItem) TextSecurePreferences(org.thoughtcrime.securesms.util.TextSecurePreferences) Lifecycle(androidx.lifecycle.Lifecycle) MaterialButton(com.google.android.material.button.MaterialButton) DiskCacheStrategy(com.bumptech.glide.load.engine.DiskCacheStrategy) PlacePickerActivity(org.thoughtcrime.securesms.maps.PlacePickerActivity) InviteReminderModel(org.thoughtcrime.securesms.invites.InviteReminderModel) QuoteModel(org.thoughtcrime.securesms.mms.QuoteModel) Build(android.os.Build) ShortcutLauncherActivity(org.thoughtcrime.securesms.ShortcutLauncherActivity) ConversationSearchBottomBar(org.thoughtcrime.securesms.components.ConversationSearchBottomBar) SimpleTask(org.thoughtcrime.securesms.util.concurrent.SimpleTask) StickerPackInstallEvent(org.thoughtcrime.securesms.stickers.StickerPackInstallEvent) Stub(org.thoughtcrime.securesms.util.views.Stub) LayoutInflater(android.view.LayoutInflater) MediaSelectionActivity(org.thoughtcrime.securesms.mediasend.v2.MediaSelectionActivity) FullscreenHelper(org.thoughtcrime.securesms.util.FullscreenHelper) GroupMembersDialog(org.thoughtcrime.securesms.GroupMembersDialog) GifSlide(org.thoughtcrime.securesms.mms.GifSlide) BlobProvider(org.thoughtcrime.securesms.providers.BlobProvider) CommunicationActions(org.thoughtcrime.securesms.util.CommunicationActions) WindowUtil(org.thoughtcrime.securesms.util.WindowUtil) Color(android.graphics.Color) GifKeyboardPageFragment(org.thoughtcrime.securesms.keyboard.gif.GifKeyboardPageFragment) OnKeyListener(android.view.View.OnKeyListener) ComposeText(org.thoughtcrime.securesms.components.ComposeText) MediaConstraints(org.thoughtcrime.securesms.mms.MediaConstraints) Bitmap(android.graphics.Bitmap) Transition(com.bumptech.glide.request.transition.Transition) Vibrator(android.os.Vibrator) ContactData(org.thoughtcrime.securesms.contacts.ContactAccessor.ContactData) DraftViewModel(org.thoughtcrime.securesms.conversation.drafts.DraftViewModel) Activity(android.app.Activity) ContactShareEditActivity(org.thoughtcrime.securesms.contactshare.ContactShareEditActivity) UnauthorizedReminder(org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder) PendingGroupJoinRequestsReminder(org.thoughtcrime.securesms.components.reminder.PendingGroupJoinRequestsReminder) RecaptchaProofBottomSheetFragment(org.thoughtcrime.securesms.ratelimit.RecaptchaProofBottomSheetFragment) RecipientUtil(org.thoughtcrime.securesms.recipients.RecipientUtil) SendButton(org.thoughtcrime.securesms.components.SendButton) Uri(android.net.Uri) FrameLayout(android.widget.FrameLayout) ImageView(android.widget.ImageView) EmojiSearchFragment(org.thoughtcrime.securesms.keyboard.emoji.search.EmojiSearchFragment) MediaOverviewActivity(org.thoughtcrime.securesms.mediaoverview.MediaOverviewActivity) Drawable(android.graphics.drawable.Drawable) ImageSlide(org.thoughtcrime.securesms.mms.ImageSlide) ShortcutManagerCompat(androidx.core.content.pm.ShortcutManagerCompat) SecureRandom(java.security.SecureRandom) MentionUtil(org.thoughtcrime.securesms.database.MentionUtil) Manifest(android.Manifest) ReviewCardDialogFragment(org.thoughtcrime.securesms.profiles.spoofing.ReviewCardDialogFragment) RecipientId(org.thoughtcrime.securesms.recipients.RecipientId) MmsMessageRecord(org.thoughtcrime.securesms.database.model.MmsMessageRecord) Fragment(androidx.fragment.app.Fragment) TargetApi(android.annotation.TargetApi) ServiceUtil(org.thoughtcrime.securesms.util.ServiceUtil) Set(java.util.Set) ReactionRecord(org.thoughtcrime.securesms.database.model.ReactionRecord) StickerManagementActivity(org.thoughtcrime.securesms.stickers.StickerManagementActivity) IdRes(androidx.annotation.IdRes) Nullable(androidx.annotation.Nullable) InsightsLauncher(org.thoughtcrime.securesms.insights.InsightsLauncher) IdentityRecord(org.thoughtcrime.securesms.database.model.IdentityRecord) Attachment(org.thoughtcrime.securesms.attachments.Attachment) TextWatcher(android.text.TextWatcher) Util(org.thoughtcrime.securesms.util.Util) WorkerThread(androidx.annotation.WorkerThread) Editable(android.text.Editable) MessageRequestsBottomView(org.thoughtcrime.securesms.messagerequests.MessageRequestsBottomView) ArrayList(java.util.ArrayList) GroupsV1MigrationInitiationBottomSheetDialogFragment(org.thoughtcrime.securesms.groups.ui.migration.GroupsV1MigrationInitiationBottomSheetDialogFragment) RecipientFormattingException(org.thoughtcrime.securesms.recipients.RecipientFormattingException) AudioRecorder(org.thoughtcrime.securesms.audio.AudioRecorder) KeyCachingService(org.thoughtcrime.securesms.service.KeyCachingService) InputAwareLayout(org.thoughtcrime.securesms.components.InputAwareLayout) IdentityUtil(org.thoughtcrime.securesms.util.IdentityUtil) ViewModelProvider(androidx.lifecycle.ViewModelProvider) Contact(org.thoughtcrime.securesms.contactshare.Contact) SpannableString(android.text.SpannableString) PaymentsValues(org.thoughtcrime.securesms.keyvalue.PaymentsValues) Permissions(org.thoughtcrime.securesms.permissions.Permissions) SpanUtil(org.thoughtcrime.securesms.util.SpanUtil) IdentityRecordList(org.thoughtcrime.securesms.database.identity.IdentityRecordList) AudioSlide(org.thoughtcrime.securesms.mms.AudioSlide) LinkPreviewRepository(org.thoughtcrime.securesms.linkpreview.LinkPreviewRepository) ContactAccessor(org.thoughtcrime.securesms.contacts.ContactAccessor) Configuration(android.content.res.Configuration) RecipientExporter(org.thoughtcrime.securesms.recipients.RecipientExporter) GroupErrors(org.thoughtcrime.securesms.groups.ui.GroupErrors) SignalStore(org.thoughtcrime.securesms.keyvalue.SignalStore) SlideDeck(org.thoughtcrime.securesms.mms.SlideDeck) BubbleUtil(org.thoughtcrime.securesms.util.BubbleUtil) MessageSender(org.thoughtcrime.securesms.sms.MessageSender) BlockUnblockDialog(org.thoughtcrime.securesms.BlockUnblockDialog) GroupCallViewModel(org.thoughtcrime.securesms.conversation.ui.groupcall.GroupCallViewModel) Spannable(android.text.Spannable) TimeoutException(java.util.concurrent.TimeoutException) PendingIntent(android.app.PendingIntent) LinkMovementMethod(android.text.method.LinkMovementMethod) R(org.thoughtcrime.securesms.R) Mention(org.thoughtcrime.securesms.database.model.Mention) MessageRecord(org.thoughtcrime.securesms.database.model.MessageRecord) Browser(android.provider.Browser) KeyboardPagerViewModel(org.thoughtcrime.securesms.keyboard.KeyboardPagerViewModel) View(android.view.View) Recipient(org.thoughtcrime.securesms.recipients.Recipient) SignalExecutors(org.signal.core.util.concurrent.SignalExecutors) MediaType(org.thoughtcrime.securesms.mms.SlideFactory.MediaType) ExpiredBuildReminder(org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder) Base64(org.thoughtcrime.securesms.util.Base64) StickerEventListener(org.thoughtcrime.securesms.stickers.StickerEventListener) ContactUtil(org.thoughtcrime.securesms.contactshare.ContactUtil) SimpleTextWatcher(org.thoughtcrime.securesms.contactshare.SimpleTextWatcher) InputPanel(org.thoughtcrime.securesms.components.InputPanel) MessageRequestViewModel(org.thoughtcrime.securesms.messagerequests.MessageRequestViewModel) InvalidMessageException(org.whispersystems.libsignal.InvalidMessageException) DraftDatabase(org.thoughtcrime.securesms.database.DraftDatabase) ThreadMode(org.greenrobot.eventbus.ThreadMode) BroadcastReceiver(android.content.BroadcastReceiver) ViewGroup(android.view.ViewGroup) Log(org.signal.core.util.logging.Log) List(java.util.List) TextView(android.widget.TextView) MentionAnnotation(org.thoughtcrime.securesms.components.mention.MentionAnnotation) GroupId(org.thoughtcrime.securesms.groups.GroupId) MessageResult(org.thoughtcrime.securesms.search.MessageResult) GlideRequests(org.thoughtcrime.securesms.mms.GlideRequests) GroupV2UpdateSelfProfileKeyJob(org.thoughtcrime.securesms.jobs.GroupV2UpdateSelfProfileKeyJob) BitmapUtil(org.thoughtcrime.securesms.util.BitmapUtil) GlideApp(org.thoughtcrime.securesms.mms.GlideApp) VideoSlide(org.thoughtcrime.securesms.mms.VideoSlide) Context(android.content.Context) RegistrationNavigationActivity(org.thoughtcrime.securesms.registration.RegistrationNavigationActivity) KeyEvent(android.view.KeyEvent) DirectoryHelper(org.thoughtcrime.securesms.contacts.sync.DirectoryHelper) ReactionsBottomSheetDialogFragment(org.thoughtcrime.securesms.reactions.ReactionsBottomSheetDialogFragment) SignalLocalMetrics(org.thoughtcrime.securesms.util.SignalLocalMetrics) Intent(android.content.Intent) AssertedSuccessListener(org.thoughtcrime.securesms.util.concurrent.AssertedSuccessListener) OnKeyboardShownListener(org.thoughtcrime.securesms.components.KeyboardAwareLinearLayout.OnKeyboardShownListener) TooltipPopup(org.thoughtcrime.securesms.components.TooltipPopup) SuppressLint(android.annotation.SuppressLint) Pair(org.whispersystems.libsignal.util.Pair) NotificationChannels(org.thoughtcrime.securesms.notifications.NotificationChannels) TransportOption(org.thoughtcrime.securesms.TransportOption) EmojiKeyboardPageFragment(org.thoughtcrime.securesms.keyboard.emoji.EmojiKeyboardPageFragment) MotionEvent(android.view.MotionEvent) EventBus(org.greenrobot.eventbus.EventBus) MessageUtil(org.thoughtcrime.securesms.util.MessageUtil) VoiceNoteMediaController(org.thoughtcrime.securesms.components.voice.VoiceNoteMediaController) ShortcutInfoCompat(androidx.core.content.pm.ShortcutInfoCompat) SettableFuture(org.thoughtcrime.securesms.util.concurrent.SettableFuture) VerifyIdentityActivity(org.thoughtcrime.securesms.verify.VerifyIdentityActivity) PromptMmsActivity(org.thoughtcrime.securesms.PromptMmsActivity) HidingLinearLayout(org.thoughtcrime.securesms.components.HidingLinearLayout) GroupsV1MigrationSuggestionsReminder(org.thoughtcrime.securesms.components.reminder.GroupsV1MigrationSuggestionsReminder) VerifiedStatus(org.thoughtcrime.securesms.database.IdentityDatabase.VerifiedStatus) MediaSendActivityResult(org.thoughtcrime.securesms.mediasend.MediaSendActivityResult) ActivityCompat(androidx.core.app.ActivityCompat) StickerRecord(org.thoughtcrime.securesms.database.model.StickerRecord) MessageDetailsFragment(org.thoughtcrime.securesms.messagedetails.MessageDetailsFragment) TombstoneAttachment(org.thoughtcrime.securesms.attachments.TombstoneAttachment) GroupActiveState(org.thoughtcrime.securesms.conversation.ConversationGroupViewModel.GroupActiveState) ConversationSettingsActivity(org.thoughtcrime.securesms.components.settings.conversation.ConversationSettingsActivity) TimeUnit(java.util.concurrent.TimeUnit) ServiceOutageDetectionJob(org.thoughtcrime.securesms.jobs.ServiceOutageDetectionJob) Observer(androidx.lifecycle.Observer) MentionsPickerViewModel(org.thoughtcrime.securesms.conversation.ui.mentions.MentionsPickerViewModel) Subscribe(org.greenrobot.eventbus.Subscribe) ReminderUpdateEvent(org.thoughtcrime.securesms.events.ReminderUpdateEvent) MuteDialog(org.thoughtcrime.securesms.MuteDialog) ReactWithAnyEmojiBottomSheetDialogFragment(org.thoughtcrime.securesms.reactions.any.ReactWithAnyEmojiBottomSheetDialogFragment) LeaveGroupDialog(org.thoughtcrime.securesms.groups.ui.LeaveGroupDialog) Collections(java.util.Collections) OnClickListener(android.view.View.OnClickListener) ArrayList(java.util.ArrayList) Media(org.thoughtcrime.securesms.mediasend.Media) LiveRecipient(org.thoughtcrime.securesms.recipients.LiveRecipient) Recipient(org.thoughtcrime.securesms.recipients.Recipient) MediaSendActivityResult(org.thoughtcrime.securesms.mediasend.MediaSendActivityResult) IOException(java.io.IOException) SlideDeck(org.thoughtcrime.securesms.mms.SlideDeck) SignalPlace(org.thoughtcrime.securesms.components.location.SignalPlace) SuppressLint(android.annotation.SuppressLint) QuoteModel(org.thoughtcrime.securesms.mms.QuoteModel) ImageSlide(org.thoughtcrime.securesms.mms.ImageSlide) LocationSlide(org.thoughtcrime.securesms.mms.LocationSlide) StickerSlide(org.thoughtcrime.securesms.mms.StickerSlide) Slide(org.thoughtcrime.securesms.mms.Slide) GifSlide(org.thoughtcrime.securesms.mms.GifSlide) ImageSlide(org.thoughtcrime.securesms.mms.ImageSlide) AudioSlide(org.thoughtcrime.securesms.mms.AudioSlide) VideoSlide(org.thoughtcrime.securesms.mms.VideoSlide) Mention(org.thoughtcrime.securesms.database.model.Mention) GifSlide(org.thoughtcrime.securesms.mms.GifSlide) BlobProvider(org.thoughtcrime.securesms.providers.BlobProvider)

Aggregations

SlideDeck (org.thoughtcrime.securesms.mms.SlideDeck)26 Recipient (org.thoughtcrime.securesms.recipients.Recipient)13 SuppressLint (android.annotation.SuppressLint)11 Context (android.content.Context)8 AudioSlide (org.thoughtcrime.securesms.mms.AudioSlide)8 OutgoingMediaMessage (org.thoughtcrime.securesms.mms.OutgoingMediaMessage)8 OutgoingSecureMediaMessage (org.thoughtcrime.securesms.mms.OutgoingSecureMediaMessage)7 Nullable (androidx.annotation.Nullable)6 WorkerThread (androidx.annotation.WorkerThread)6 ArrayList (java.util.ArrayList)6 Mention (org.thoughtcrime.securesms.database.model.Mention)6 MmsMessageRecord (org.thoughtcrime.securesms.database.model.MmsMessageRecord)6 GifSlide (org.thoughtcrime.securesms.mms.GifSlide)6 ImageSlide (org.thoughtcrime.securesms.mms.ImageSlide)6 Slide (org.thoughtcrime.securesms.mms.Slide)6 StickerSlide (org.thoughtcrime.securesms.mms.StickerSlide)6 OutgoingTextMessage (org.thoughtcrime.securesms.sms.OutgoingTextMessage)6 SpannableString (android.text.SpannableString)5 Attachment (org.thoughtcrime.securesms.attachments.Attachment)5 Contact (org.thoughtcrime.securesms.contactshare.Contact)5