Search in sources :

Example 1 with ServiceOutageReminder

use of org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder in project Signal-Android by signalapp.

the class ConversationParentFragment method updateReminders.

protected void updateReminders() {
    Context context = getContext();
    if (callback.onUpdateReminders() || context == null) {
        return;
    }
    Optional<Reminder> inviteReminder = inviteReminderModel.getReminder();
    Integer actionableRequestingMembers = groupViewModel.getActionableRequestingMembers().getValue();
    List<RecipientId> gv1MigrationSuggestions = groupViewModel.getGroupV1MigrationSuggestions().getValue();
    if (UnauthorizedReminder.isEligible(context)) {
        reminderView.get().showReminder(new UnauthorizedReminder(context));
    } else if (ExpiredBuildReminder.isEligible()) {
        reminderView.get().showReminder(new ExpiredBuildReminder(context));
        reminderView.get().setOnActionClickListener(this::handleReminderAction);
    } else if (ServiceOutageReminder.isEligible(context)) {
        ApplicationDependencies.getJobManager().add(new ServiceOutageDetectionJob());
        reminderView.get().showReminder(new ServiceOutageReminder(context));
    } else if (SignalStore.account().isRegistered() && TextSecurePreferences.isShowInviteReminders(context) && !isSecureText && inviteReminder.isPresent() && !recipient.get().isGroup()) {
        reminderView.get().setOnActionClickListener(this::handleReminderAction);
        reminderView.get().setOnDismissListener(() -> inviteReminderModel.dismissReminder());
        reminderView.get().showReminder(inviteReminder.get());
    } else if (actionableRequestingMembers != null && actionableRequestingMembers > 0) {
        reminderView.get().showReminder(PendingGroupJoinRequestsReminder.create(context, actionableRequestingMembers));
        reminderView.get().setOnActionClickListener(id -> {
            if (id == R.id.reminder_action_review_join_requests) {
                startActivity(ManagePendingAndRequestingMembersActivity.newIntent(context, getRecipient().getGroupId().get().requireV2()));
            }
        });
    } else if (gv1MigrationSuggestions != null && gv1MigrationSuggestions.size() > 0 && recipient.get().isPushV2Group()) {
        reminderView.get().showReminder(new GroupsV1MigrationSuggestionsReminder(context, gv1MigrationSuggestions));
        reminderView.get().setOnActionClickListener(actionId -> {
            if (actionId == R.id.reminder_action_gv1_suggestion_add_members) {
                GroupsV1MigrationSuggestionsDialog.show(requireActivity(), recipient.get().requireGroupId().requireV2(), gv1MigrationSuggestions);
            } else if (actionId == R.id.reminder_action_gv1_suggestion_no_thanks) {
                groupViewModel.onSuggestedMembersBannerDismissed(recipient.get().requireGroupId(), gv1MigrationSuggestions);
            }
        });
        reminderView.get().setOnDismissListener(() -> {
        });
    } else if (isInBubble() && !SignalStore.tooltips().hasSeenBubbleOptOutTooltip() && Build.VERSION.SDK_INT > 29) {
        reminderView.get().showReminder(new BubbleOptOutReminder(context));
        reminderView.get().setOnActionClickListener(actionId -> {
            SignalStore.tooltips().markBubbleOptOutTooltipSeen();
            reminderView.get().hide();
            if (actionId == R.id.reminder_action_turn_off) {
                Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_BUBBLE_SETTINGS).putExtra(Settings.EXTRA_APP_PACKAGE, requireContext().getPackageName()).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(intent);
            }
        });
    } else if (reminderView.resolved()) {
        reminderView.get().hide();
    }
}
Also used : 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) BubbleOptOutReminder(org.thoughtcrime.securesms.components.reminder.BubbleOptOutReminder) ServiceOutageReminder(org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder) Reminder(org.thoughtcrime.securesms.components.reminder.Reminder) UnauthorizedReminder(org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder) PendingGroupJoinRequestsReminder(org.thoughtcrime.securesms.components.reminder.PendingGroupJoinRequestsReminder) ExpiredBuildReminder(org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder) GroupsV1MigrationSuggestionsReminder(org.thoughtcrime.securesms.components.reminder.GroupsV1MigrationSuggestionsReminder) RecipientId(org.thoughtcrime.securesms.recipients.RecipientId) GroupsV1MigrationSuggestionsReminder(org.thoughtcrime.securesms.components.reminder.GroupsV1MigrationSuggestionsReminder) ExpiredBuildReminder(org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder) PendingIntent(android.app.PendingIntent) Intent(android.content.Intent) ServiceOutageDetectionJob(org.thoughtcrime.securesms.jobs.ServiceOutageDetectionJob) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ServiceOutageReminder(org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder) BubbleOptOutReminder(org.thoughtcrime.securesms.components.reminder.BubbleOptOutReminder) UnauthorizedReminder(org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder)

Example 2 with ServiceOutageReminder

use of org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder in project Signal-Android by signalapp.

the class ConversationListFragment method updateReminders.

private void updateReminders() {
    Context context = requireContext();
    SimpleTask.run(getViewLifecycleOwner().getLifecycle(), () -> {
        if (UnauthorizedReminder.isEligible(context)) {
            return Optional.of(new UnauthorizedReminder(context));
        } else if (ExpiredBuildReminder.isEligible()) {
            return Optional.of(new ExpiredBuildReminder(context));
        } else if (ServiceOutageReminder.isEligible(context)) {
            ApplicationDependencies.getJobManager().add(new ServiceOutageDetectionJob());
            return Optional.of(new ServiceOutageReminder(context));
        } else if (OutdatedBuildReminder.isEligible()) {
            return Optional.of(new OutdatedBuildReminder(context));
        } else if (PushRegistrationReminder.isEligible(context)) {
            return Optional.of((new PushRegistrationReminder(context)));
        } else if (DozeReminder.isEligible(context)) {
            return Optional.of(new DozeReminder(context));
        } else {
            return Optional.<Reminder>absent();
        }
    }, reminder -> {
        if (reminder.isPresent() && getActivity() != null && !isRemoving()) {
            if (!reminderView.resolved()) {
                initializeReminderView();
            }
            reminderView.get().showReminder(reminder.get());
        } else if (reminderView.resolved() && !reminder.isPresent()) {
            reminderView.get().hide();
        }
    });
}
Also used : Context(android.content.Context) PushRegistrationReminder(org.thoughtcrime.securesms.components.reminder.PushRegistrationReminder) DozeReminder(org.thoughtcrime.securesms.components.reminder.DozeReminder) ServiceOutageReminder(org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder) ExpiredBuildReminder(org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder) OutdatedBuildReminder(org.thoughtcrime.securesms.components.reminder.OutdatedBuildReminder) UnauthorizedReminder(org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder) ServiceOutageDetectionJob(org.thoughtcrime.securesms.jobs.ServiceOutageDetectionJob)

Example 3 with ServiceOutageReminder

use of org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder in project Signal-Android by WhisperSystems.

the class ConversationListFragment method updateReminders.

private void updateReminders() {
    Context context = requireContext();
    SimpleTask.run(getViewLifecycleOwner().getLifecycle(), () -> {
        if (UnauthorizedReminder.isEligible(context)) {
            return Optional.of(new UnauthorizedReminder(context));
        } else if (ExpiredBuildReminder.isEligible()) {
            return Optional.of(new ExpiredBuildReminder(context));
        } else if (ServiceOutageReminder.isEligible(context)) {
            ApplicationDependencies.getJobManager().add(new ServiceOutageDetectionJob());
            return Optional.of(new ServiceOutageReminder(context));
        } else if (OutdatedBuildReminder.isEligible()) {
            return Optional.of(new OutdatedBuildReminder(context));
        } else if (PushRegistrationReminder.isEligible(context)) {
            return Optional.of((new PushRegistrationReminder(context)));
        } else if (DozeReminder.isEligible(context)) {
            return Optional.of(new DozeReminder(context));
        } else {
            return Optional.<Reminder>absent();
        }
    }, reminder -> {
        if (reminder.isPresent() && getActivity() != null && !isRemoving()) {
            if (!reminderView.resolved()) {
                initializeReminderView();
            }
            reminderView.get().showReminder(reminder.get());
        } else if (reminderView.resolved() && !reminder.isPresent()) {
            reminderView.get().hide();
        }
    });
}
Also used : Context(android.content.Context) PushRegistrationReminder(org.thoughtcrime.securesms.components.reminder.PushRegistrationReminder) DozeReminder(org.thoughtcrime.securesms.components.reminder.DozeReminder) ServiceOutageReminder(org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder) ExpiredBuildReminder(org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder) OutdatedBuildReminder(org.thoughtcrime.securesms.components.reminder.OutdatedBuildReminder) UnauthorizedReminder(org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder) ServiceOutageDetectionJob(org.thoughtcrime.securesms.jobs.ServiceOutageDetectionJob)

Example 4 with ServiceOutageReminder

use of org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder in project Signal-Android by WhisperSystems.

the class ConversationParentFragment method updateReminders.

protected void updateReminders() {
    Context context = getContext();
    if (callback.onUpdateReminders() || context == null) {
        return;
    }
    Optional<Reminder> inviteReminder = inviteReminderModel.getReminder();
    Integer actionableRequestingMembers = groupViewModel.getActionableRequestingMembers().getValue();
    List<RecipientId> gv1MigrationSuggestions = groupViewModel.getGroupV1MigrationSuggestions().getValue();
    if (UnauthorizedReminder.isEligible(context)) {
        reminderView.get().showReminder(new UnauthorizedReminder(context));
    } else if (ExpiredBuildReminder.isEligible()) {
        reminderView.get().showReminder(new ExpiredBuildReminder(context));
        reminderView.get().setOnActionClickListener(this::handleReminderAction);
    } else if (ServiceOutageReminder.isEligible(context)) {
        ApplicationDependencies.getJobManager().add(new ServiceOutageDetectionJob());
        reminderView.get().showReminder(new ServiceOutageReminder(context));
    } else if (SignalStore.account().isRegistered() && TextSecurePreferences.isShowInviteReminders(context) && !isSecureText && inviteReminder.isPresent() && !recipient.get().isGroup()) {
        reminderView.get().setOnActionClickListener(this::handleReminderAction);
        reminderView.get().setOnDismissListener(() -> inviteReminderModel.dismissReminder());
        reminderView.get().showReminder(inviteReminder.get());
    } else if (actionableRequestingMembers != null && actionableRequestingMembers > 0) {
        reminderView.get().showReminder(PendingGroupJoinRequestsReminder.create(context, actionableRequestingMembers));
        reminderView.get().setOnActionClickListener(id -> {
            if (id == R.id.reminder_action_review_join_requests) {
                startActivity(ManagePendingAndRequestingMembersActivity.newIntent(context, getRecipient().getGroupId().get().requireV2()));
            }
        });
    } else if (gv1MigrationSuggestions != null && gv1MigrationSuggestions.size() > 0 && recipient.get().isPushV2Group()) {
        reminderView.get().showReminder(new GroupsV1MigrationSuggestionsReminder(context, gv1MigrationSuggestions));
        reminderView.get().setOnActionClickListener(actionId -> {
            if (actionId == R.id.reminder_action_gv1_suggestion_add_members) {
                GroupsV1MigrationSuggestionsDialog.show(requireActivity(), recipient.get().requireGroupId().requireV2(), gv1MigrationSuggestions);
            } else if (actionId == R.id.reminder_action_gv1_suggestion_no_thanks) {
                groupViewModel.onSuggestedMembersBannerDismissed(recipient.get().requireGroupId(), gv1MigrationSuggestions);
            }
        });
        reminderView.get().setOnDismissListener(() -> {
        });
    } else if (isInBubble() && !SignalStore.tooltips().hasSeenBubbleOptOutTooltip() && Build.VERSION.SDK_INT > 29) {
        reminderView.get().showReminder(new BubbleOptOutReminder(context));
        reminderView.get().setOnActionClickListener(actionId -> {
            SignalStore.tooltips().markBubbleOptOutTooltipSeen();
            reminderView.get().hide();
            if (actionId == R.id.reminder_action_turn_off) {
                Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_BUBBLE_SETTINGS).putExtra(Settings.EXTRA_APP_PACKAGE, requireContext().getPackageName()).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(intent);
            }
        });
    } else if (reminderView.resolved()) {
        reminderView.get().hide();
    }
}
Also used : 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) BubbleOptOutReminder(org.thoughtcrime.securesms.components.reminder.BubbleOptOutReminder) ServiceOutageReminder(org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder) Reminder(org.thoughtcrime.securesms.components.reminder.Reminder) UnauthorizedReminder(org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder) PendingGroupJoinRequestsReminder(org.thoughtcrime.securesms.components.reminder.PendingGroupJoinRequestsReminder) ExpiredBuildReminder(org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder) GroupsV1MigrationSuggestionsReminder(org.thoughtcrime.securesms.components.reminder.GroupsV1MigrationSuggestionsReminder) RecipientId(org.thoughtcrime.securesms.recipients.RecipientId) GroupsV1MigrationSuggestionsReminder(org.thoughtcrime.securesms.components.reminder.GroupsV1MigrationSuggestionsReminder) ExpiredBuildReminder(org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder) PendingIntent(android.app.PendingIntent) Intent(android.content.Intent) ServiceOutageDetectionJob(org.thoughtcrime.securesms.jobs.ServiceOutageDetectionJob) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ServiceOutageReminder(org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder) BubbleOptOutReminder(org.thoughtcrime.securesms.components.reminder.BubbleOptOutReminder) UnauthorizedReminder(org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder)

Aggregations

Context (android.content.Context)4 ExpiredBuildReminder (org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder)4 ServiceOutageReminder (org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder)4 UnauthorizedReminder (org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder)4 ServiceOutageDetectionJob (org.thoughtcrime.securesms.jobs.ServiceOutageDetectionJob)4 Manifest (android.Manifest)2 SuppressLint (android.annotation.SuppressLint)2 TargetApi (android.annotation.TargetApi)2 Activity (android.app.Activity)2 PendingIntent (android.app.PendingIntent)2 ActivityNotFoundException (android.content.ActivityNotFoundException)2 BroadcastReceiver (android.content.BroadcastReceiver)2 Intent (android.content.Intent)2 IntentFilter (android.content.IntentFilter)2 ActivityInfo (android.content.pm.ActivityInfo)2 Configuration (android.content.res.Configuration)2 Bitmap (android.graphics.Bitmap)2 Color (android.graphics.Color)2 PorterDuff (android.graphics.PorterDuff)2 Drawable (android.graphics.drawable.Drawable)2