From 6243443262cee98dc23a62b1857749c113f158ad Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Tue, 18 May 2021 16:11:38 +1000 Subject: [PATCH] Move files --- .../securesms/ApplicationContext.java | 4 +- .../securesms/BindableConversationItem.java | 2 +- .../securesms/MediaOverviewActivity.java | 2 +- .../securesms/MediaPreviewActivity.java | 2 +- .../securesms/MessageDetailsActivity.java | 2 +- .../thoughtcrime/securesms/ShareActivity.java | 2 +- .../securesms/ShortcutLauncherActivity.java | 2 +- .../attachments/DatabaseAttachmentProvider.kt | 2 +- .../securesms/backup/FullBackupImporter.kt | 2 +- .../components/AlbumThumbnailView.java | 2 +- .../securesms/components/AvatarImageView.java | 2 +- .../securesms/components/FromTextView.java | 2 +- .../securesms/components/MediaView.java | 2 +- .../contactshare/ContactModelMapper.java | 4 +- .../securesms/contactshare/ContactUtil.java | 2 +- .../conversation/ConversationActivity.java | 6 +- .../conversation/ConversationFragment.java | 2 +- .../conversation/ConversationItem.java | 2 +- .../securesms/database/EarlyReceiptCache.java | 2 +- .../securesms/database/GroupDatabase.java | 2 +- .../database/GroupReceiptDatabase.java | 2 +- .../securesms/database/MediaDatabase.java | 2 +- .../securesms/database/MessagingDatabase.java | 2 +- .../securesms/database/MmsDatabase.java | 4 +- .../securesms/database/MmsSmsDatabase.java | 2 +- .../securesms/database/RecipientDatabase.java | 4 +- .../securesms/database/SmsDatabase.java | 2 +- .../securesms/database/Storage.kt | 6 +- .../securesms/database/ThreadDatabase.java | 4 +- .../loaders/BucketedThreadMediaLoader.java | 2 +- .../database/loaders/ThreadMediaLoader.java | 2 +- .../database/model/MediaMmsMessageRecord.java | 2 +- .../database/model/MmsMessageRecord.java | 2 +- .../securesms/database/model/Quote.java | 2 +- .../securesms/giph/ui/GiphyAdapter.java | 2 +- .../securesms/groups/GroupManager.java | 2 +- .../jobs/RetrieveProfileAvatarJob.java | 2 +- .../activities/CreateClosedGroupActivity.kt | 2 +- .../activities/CreatePrivateChatActivity.kt | 2 +- .../activities/EditClosedGroupActivity.kt | 2 +- .../EditClosedGroupMembersAdapter.kt | 2 +- .../loki/activities/JoinPublicChatActivity.kt | 2 +- .../loki/activities/QRCodeActivity.kt | 2 +- .../loki/activities/SelectContactsAdapter.kt | 2 +- .../loki/activities/SettingsActivity.kt | 4 +- .../loki/database/LokiThreadDatabase.kt | 2 +- .../loki/database/LokiUserDatabase.kt | 2 +- .../loki/protocol/ClosedGroupsProtocolV2.kt | 2 +- .../loki/protocol/MultiDeviceProtocol.kt | 2 +- .../loki/protocol/SessionMetaProtocol.kt | 2 +- .../loki/utilities/OpenGroupUtilities.kt | 2 +- .../loki/views/ProfilePictureView.kt | 2 +- .../longmessage/LongMessageActivity.java | 4 +- .../mediasend/MediaSendActivity.java | 2 +- .../mediasend/MediaSendFragment.java | 2 +- .../securesms/mms/AttachmentManager.java | 2 +- .../thoughtcrime/securesms/mms/QuoteId.java | 2 +- .../AbstractNotificationBuilder.java | 2 +- .../AndroidAutoReplyReceiver.java | 2 +- .../notifications/DefaultMessageNotifier.java | 2 +- .../FailedNotificationBuilder.java | 2 +- .../notifications/MarkReadReceiver.java | 2 +- .../MultipleRecipientNotificationBuilder.java | 2 +- .../notifications/NotificationChannels.java | 2 +- .../PendingMessageNotificationBuilder.java | 2 +- .../notifications/RemoteReplyReceiver.java | 2 +- .../SingleRecipientNotificationBuilder.java | 2 +- .../securesms/search/SearchRepository.java | 2 +- .../service/ExpiringMessageManager.java | 2 +- .../service/QuickResponseService.java | 2 +- .../sskenvironment/ReadReceiptManager.kt | 2 +- .../TypingStatusRepository.java | 2 +- .../recipients/RecipientExporterTest.java | 2 +- .../libsession/avatars/AvatarHelper.java | 2 +- .../libsession/avatars/ContactColors.java | 2 +- .../avatars/GroupRecordContactPhoto.java | 2 +- .../avatars/ProfileContactPhoto.java | 2 +- .../avatars/SystemContactPhoto.java | 2 +- .../database/MessageDataProvider.kt | 2 +- .../libsession/database/StorageProtocol.kt | 2 +- .../messaging/messages/Destination.kt | 2 +- .../control/ClosedGroupControlMessage.kt | 2 +- .../messages/control/ConfigurationMessage.kt | 4 +- .../messages/signal/IncomingMediaMessage.java | 4 +- .../messages/signal/IncomingTextMessage.java | 2 +- .../signal/OutgoingGroupMediaMessage.java | 2 +- .../messages/signal/OutgoingMediaMessage.java | 2 +- .../signal/OutgoingSecureMediaMessage.java | 2 +- .../messages/visible/VisibleMessage.kt | 2 +- .../sending_receiving/MessageSender.kt | 2 +- .../MessageSenderClosedGroupHandler.kt | 2 +- .../ReceivedMessageHandler.kt | 4 +- .../pollers/OpenGroupPoller.kt | 2 +- .../pollers/OpenGroupV2Poller.kt | 2 +- .../sending_receiving/quotes/QuoteModel.kt | 2 +- .../libsession/messaging/threads/Address.kt | 185 ------------------ .../CenterAlignedRelativeSizeSpan.java | 2 +- .../sharecontacts => utilities}/Contact.java | 3 +- .../libsession/utilities/GroupRecord.kt | 2 +- .../utilities/IdentityKeyMismatch.java | 2 +- .../utilities/{color => }/MaterialColor.java | 2 +- .../libsession/utilities/NetworkFailure.java | 2 +- .../NotificationPrivacyPreference.java | 2 +- .../{preferences => }/ProfileKeyUtil.java | 2 +- .../utilities/ProfilePictureUtilities.kt | 1 - .../libsession/utilities/SSKEnvironment.kt | 2 +- .../Selectable.java | 2 +- .../utilities/{views => }/Stub.java | 2 +- .../utilities/TextSecurePreferences.kt | 1 - .../libsession/utilities/ViewUtil.java | 1 - .../utilities/recipients/Recipient.java | 4 +- .../recipients/RecipientExporter.java | 2 +- .../recipients/RecipientProvider.java | 4 +- 113 files changed, 125 insertions(+), 314 deletions(-) delete mode 100644 libsession/src/main/java/org/session/libsession/messaging/threads/Address.kt rename libsession/src/main/java/org/session/libsession/utilities/{color/spans => }/CenterAlignedRelativeSizeSpan.java (91%) rename libsession/src/main/java/org/session/libsession/{messaging/sending_receiving/sharecontacts => utilities}/Contact.java (99%) rename libsession/src/main/java/org/session/libsession/utilities/{color => }/MaterialColor.java (99%) rename libsession/src/main/java/org/session/libsession/utilities/{preferences => }/NotificationPrivacyPreference.java (87%) rename libsession/src/main/java/org/session/libsession/utilities/{preferences => }/ProfileKeyUtil.java (96%) rename libsession/src/main/java/org/session/libsession/{messaging/sending_receiving/sharecontacts => utilities}/Selectable.java (56%) rename libsession/src/main/java/org/session/libsession/utilities/{views => }/Stub.java (89%) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java b/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java index c0cf0f75ab..9f34af636b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java +++ b/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java @@ -38,7 +38,7 @@ import org.session.libsession.messaging.open_groups.OpenGroupAPI; import org.session.libsession.messaging.sending_receiving.notifications.MessageNotifier; import org.session.libsession.messaging.sending_receiving.pollers.ClosedGroupPoller; import org.session.libsession.messaging.sending_receiving.pollers.Poller; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.snode.SnodeModule; import org.session.libsession.utilities.IdentityKeyUtil; import org.session.libsession.utilities.ProfilePictureUtilities; @@ -47,7 +47,7 @@ import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; import org.session.libsession.utilities.dynamiclanguage.DynamicLanguageContextWrapper; import org.session.libsession.utilities.dynamiclanguage.LocaleParser; -import org.session.libsession.utilities.preferences.ProfileKeyUtil; +import org.session.libsession.utilities.ProfileKeyUtil; import org.session.libsignal.database.LokiAPIDatabaseProtocol; import org.session.libsignal.utilities.ThreadUtils; import org.session.libsignal.utilities.Log; diff --git a/app/src/main/java/org/thoughtcrime/securesms/BindableConversationItem.java b/app/src/main/java/org/thoughtcrime/securesms/BindableConversationItem.java index defaee86bf..93313e5270 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/BindableConversationItem.java +++ b/app/src/main/java/org/thoughtcrime/securesms/BindableConversationItem.java @@ -10,7 +10,7 @@ import org.thoughtcrime.securesms.mms.GlideRequests; import org.session.libsignal.utilities.guava.Optional; import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import java.util.Locale; diff --git a/app/src/main/java/org/thoughtcrime/securesms/MediaOverviewActivity.java b/app/src/main/java/org/thoughtcrime/securesms/MediaOverviewActivity.java index 96e0922619..7b25c4f1bb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/MediaOverviewActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/MediaOverviewActivity.java @@ -54,7 +54,7 @@ import com.google.android.material.tabs.TabLayout; import org.session.libsession.messaging.messages.control.DataExtractionNotification; import org.session.libsession.messaging.sending_receiving.MessageSender; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.database.CursorRecyclerViewAdapter; import org.thoughtcrime.securesms.database.MediaDatabase; import org.thoughtcrime.securesms.database.loaders.BucketedThreadMediaLoader; diff --git a/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java b/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java index c90d37f409..431d0b4e3f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java @@ -54,7 +54,7 @@ import androidx.recyclerview.widget.RecyclerView; import androidx.viewpager.widget.PagerAdapter; import androidx.viewpager.widget.ViewPager; import org.session.libsession.messaging.sending_receiving.attachments.DatabaseAttachment; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.recipients.RecipientModifiedListener; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/MessageDetailsActivity.java b/app/src/main/java/org/thoughtcrime/securesms/MessageDetailsActivity.java index a14d17293e..f61186144c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/MessageDetailsActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/MessageDetailsActivity.java @@ -45,7 +45,7 @@ import org.session.libsession.messaging.open_groups.OpenGroup; import org.session.libsession.messaging.sending_receiving.MessageSender; import org.session.libsession.messaging.utilities.UpdateMessageData; import org.thoughtcrime.securesms.MessageDetailsRecipientAdapter.RecipientDeliveryStatus; -import org.session.libsession.utilities.color.MaterialColor; +import org.session.libsession.utilities.MaterialColor; import org.thoughtcrime.securesms.conversation.ConversationItem; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.GroupReceiptDatabase; diff --git a/app/src/main/java/org/thoughtcrime/securesms/ShareActivity.java b/app/src/main/java/org/thoughtcrime/securesms/ShareActivity.java index 4754de4b0c..a4a17b7389 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ShareActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/ShareActivity.java @@ -38,7 +38,7 @@ import androidx.appcompat.widget.Toolbar; import org.session.libsession.utilities.DistributionTypes; import org.thoughtcrime.securesms.components.SearchToolbar; import org.thoughtcrime.securesms.conversation.ConversationActivity; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.session.libsignal.utilities.Log; import org.thoughtcrime.securesms.loki.fragments.ContactSelectionListFragment; diff --git a/app/src/main/java/org/thoughtcrime/securesms/ShortcutLauncherActivity.java b/app/src/main/java/org/thoughtcrime/securesms/ShortcutLauncherActivity.java index 910ff55a21..d593cdca96 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ShortcutLauncherActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/ShortcutLauncherActivity.java @@ -10,7 +10,7 @@ import androidx.core.app.TaskStackBuilder; import androidx.appcompat.app.AppCompatActivity; import android.widget.Toast; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.loki.activities.HomeActivity; import org.session.libsession.utilities.recipients.Recipient; import org.thoughtcrime.securesms.util.CommunicationActions; diff --git a/app/src/main/java/org/thoughtcrime/securesms/attachments/DatabaseAttachmentProvider.kt b/app/src/main/java/org/thoughtcrime/securesms/attachments/DatabaseAttachmentProvider.kt index 69eb94ab42..8608426055 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/attachments/DatabaseAttachmentProvider.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/attachments/DatabaseAttachmentProvider.kt @@ -7,7 +7,7 @@ import org.greenrobot.eventbus.EventBus import org.session.libsession.database.MessageDataProvider import org.session.libsession.messaging.open_groups.OpenGroup import org.session.libsession.messaging.sending_receiving.attachments.* -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.messaging.utilities.DotNetAPI import org.session.libsession.utilities.Util import org.session.libsignal.utilities.guava.Optional diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupImporter.kt b/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupImporter.kt index 977d2d1073..81f314458b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupImporter.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupImporter.kt @@ -16,7 +16,7 @@ import org.thoughtcrime.securesms.util.BackupUtil import org.session.libsession.avatars.AvatarHelper import org.session.libsession.messaging.sending_receiving.attachments.AttachmentId -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.Conversions import org.session.libsession.utilities.Util import org.session.libsignal.crypto.kdf.HKDFv3 diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/AlbumThumbnailView.java b/app/src/main/java/org/thoughtcrime/securesms/components/AlbumThumbnailView.java index 4dcaeb0230..9f472fb069 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/AlbumThumbnailView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/AlbumThumbnailView.java @@ -16,7 +16,7 @@ import org.thoughtcrime.securesms.mms.GlideRequests; import org.thoughtcrime.securesms.mms.Slide; import org.thoughtcrime.securesms.mms.SlideClickListener; import org.thoughtcrime.securesms.mms.SlidesClickedListener; -import org.session.libsession.utilities.views.Stub; +import org.session.libsession.utilities.Stub; import java.util.List; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/AvatarImageView.java b/app/src/main/java/org/thoughtcrime/securesms/components/AvatarImageView.java index e568b59faa..c0757fea24 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/AvatarImageView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/AvatarImageView.java @@ -26,7 +26,7 @@ import org.thoughtcrime.securesms.mms.GlideRequests; import org.session.libsession.avatars.ContactColors; import org.session.libsession.avatars.ContactPhoto; import org.session.libsession.avatars.ResourceContactPhoto; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.recipients.RecipientExporter; import org.session.libsession.utilities.ThemeUtil; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/FromTextView.java b/app/src/main/java/org/thoughtcrime/securesms/components/FromTextView.java index c79705cd23..d98c56ede5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/FromTextView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/FromTextView.java @@ -17,7 +17,7 @@ import network.loki.messenger.R; import org.thoughtcrime.securesms.components.emoji.EmojiTextView; import org.session.libsession.utilities.recipients.Recipient; import org.thoughtcrime.securesms.util.ResUtil; -import org.session.libsession.utilities.color.spans.CenterAlignedRelativeSizeSpan; +import org.session.libsession.utilities.CenterAlignedRelativeSizeSpan; public class FromTextView extends EmojiTextView { diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/MediaView.java b/app/src/main/java/org/thoughtcrime/securesms/components/MediaView.java index 149b3817da..14b70a53d6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/MediaView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/MediaView.java @@ -17,7 +17,7 @@ import org.thoughtcrime.securesms.mms.GlideRequests; import org.thoughtcrime.securesms.mms.VideoSlide; import org.thoughtcrime.securesms.video.VideoPlayer; -import org.session.libsession.utilities.views.Stub; +import org.session.libsession.utilities.Stub; import java.io.IOException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactModelMapper.java b/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactModelMapper.java index 5a77a88828..ef783da791 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactModelMapper.java +++ b/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactModelMapper.java @@ -11,8 +11,8 @@ import java.util.ArrayList; import java.util.LinkedList; import java.util.List; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; -import static org.session.libsession.messaging.sending_receiving.sharecontacts.Contact.*; +import org.session.libsession.utilities.Contact; +import static org.session.libsession.utilities.Contact.*; public class ContactModelMapper { diff --git a/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactUtil.java b/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactUtil.java index e1bb4b645d..4a1059ffd9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactUtil.java @@ -5,7 +5,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.text.TextUtils; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; +import org.session.libsession.utilities.Contact; import org.thoughtcrime.securesms.components.emoji.EmojiStrings; import org.thoughtcrime.securesms.util.SpanUtil; diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java index d7698c874f..22504aa80b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -96,8 +96,8 @@ import org.session.libsession.messaging.sending_receiving.MessageSender; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Contact; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.DistributionTypes; import org.session.libsession.utilities.GroupRecord; import org.session.libsession.utilities.recipients.Recipient; @@ -111,7 +111,7 @@ import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; import org.session.libsession.utilities.ViewUtil; import org.session.libsession.utilities.concurrent.AssertedSuccessListener; -import org.session.libsession.utilities.views.Stub; +import org.session.libsession.utilities.Stub; import org.session.libsignal.exceptions.InvalidMessageException; import org.session.libsignal.utilities.guava.Optional; import org.session.libsession.messaging.mentions.Mention; diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationFragment.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationFragment.java index 1e5ffa9c4a..275cbba606 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationFragment.java @@ -70,7 +70,7 @@ import org.session.libsession.messaging.open_groups.OpenGroupV2; import org.session.libsession.messaging.sending_receiving.MessageSender; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationItem.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationItem.java index 47a520caa3..1454e94336 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationItem.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationItem.java @@ -69,7 +69,7 @@ import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.ThemeUtil; import org.session.libsession.utilities.Util; import org.session.libsession.utilities.ViewUtil; -import org.session.libsession.utilities.views.Stub; +import org.session.libsession.utilities.Stub; import org.session.libsignal.utilities.guava.Optional; import org.session.libsignal.utilities.Log; import org.thoughtcrime.securesms.BindableConversationItem; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/EarlyReceiptCache.java b/app/src/main/java/org/thoughtcrime/securesms/database/EarlyReceiptCache.java index ac21ff3bed..2792a8fd3b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/EarlyReceiptCache.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/EarlyReceiptCache.java @@ -1,7 +1,7 @@ package org.thoughtcrime.securesms.database; import org.session.libsignal.utilities.Log; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.util.LRUCache; import java.util.HashMap; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/GroupDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/GroupDatabase.java index ee31ea20a2..c3f25bf907 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/GroupDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/GroupDatabase.java @@ -18,7 +18,7 @@ import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper; import org.thoughtcrime.securesms.util.BitmapUtil; import org.session.libsession.utilities.recipients.Recipient; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.GroupRecord; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/GroupReceiptDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/GroupReceiptDatabase.java index 410399270c..2664aea804 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/GroupReceiptDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/GroupReceiptDatabase.java @@ -10,7 +10,7 @@ import net.sqlcipher.database.SQLiteDatabase; import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import java.util.LinkedList; import java.util.List; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/MediaDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/MediaDatabase.java index 9e0f549fd3..c33f8d0e7d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/MediaDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/MediaDatabase.java @@ -9,7 +9,7 @@ import androidx.annotation.Nullable; import net.sqlcipher.database.SQLiteDatabase; import org.session.libsession.messaging.sending_receiving.attachments.DatabaseAttachment; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/MessagingDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/MessagingDatabase.java index 64bc996121..0fcb61d741 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/MessagingDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/MessagingDatabase.java @@ -14,7 +14,7 @@ import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper; import org.session.libsignal.utilities.Log; import org.session.libsignal.crypto.IdentityKey; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsignal.utilities.JsonUtil; import java.io.IOException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.java index 69bb0a8b33..4ee953b0b6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.java @@ -58,10 +58,10 @@ import org.thoughtcrime.securesms.mms.SlideDeck; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; import org.session.libsession.messaging.sending_receiving.attachments.AttachmentId; import org.session.libsession.messaging.sending_receiving.attachments.DatabaseAttachment; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; +import org.session.libsession.utilities.Contact; import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.recipients.RecipientFormattingException; import org.session.libsignal.utilities.JsonUtil; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/MmsSmsDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/MmsSmsDatabase.java index ffa4c3642a..f21b1ae622 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/MmsSmsDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/MmsSmsDatabase.java @@ -25,7 +25,7 @@ import androidx.annotation.Nullable; import net.sqlcipher.database.SQLiteDatabase; import net.sqlcipher.database.SQLiteQueryBuilder; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.Util; import org.thoughtcrime.securesms.database.MessagingDatabase.SyncMessageId; import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/RecipientDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/RecipientDatabase.java index a0f2fdbe6f..d2b6ace217 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/RecipientDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/RecipientDatabase.java @@ -12,8 +12,8 @@ import com.annimon.stream.Stream; import net.sqlcipher.database.SQLiteDatabase; import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper; -import org.session.libsession.utilities.color.MaterialColor; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.MaterialColor; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.recipients.Recipient.*; import org.session.libsignal.utilities.Base64; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java index 7c84273dc1..613bff7414 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java @@ -40,7 +40,7 @@ import org.session.libsession.messaging.messages.signal.IncomingGroupMessage; import org.session.libsession.messaging.messages.signal.IncomingTextMessage; import org.session.libsession.messaging.messages.signal.OutgoingTextMessage; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsignal.utilities.JsonUtil; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt index ed5b8b7b0b..020fd9a0ed 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt @@ -20,15 +20,15 @@ import org.session.libsession.messaging.sending_receiving.attachments.DatabaseAt import org.session.libsession.messaging.sending_receiving.data_extraction.DataExtractionNotificationInfoMessage import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel -import org.session.libsession.messaging.threads.Address -import org.session.libsession.messaging.threads.Address.Companion.fromSerialized +import org.session.libsession.utilities.Address +import org.session.libsession.utilities.Address.Companion.fromSerialized import org.session.libsession.utilities.GroupRecord import org.session.libsession.utilities.recipients.Recipient import org.session.libsession.messaging.utilities.UpdateMessageData import org.session.libsession.utilities.GroupUtil import org.session.libsession.utilities.IdentityKeyUtil import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsession.utilities.preferences.ProfileKeyUtil +import org.session.libsession.utilities.ProfileKeyUtil import org.session.libsignal.crypto.ecc.ECKeyPair import org.session.libsignal.utilities.KeyHelper import org.session.libsignal.utilities.guava.Optional diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/ThreadDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/ThreadDatabase.java index f95ced3dad..ea73484659 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/ThreadDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/ThreadDatabase.java @@ -31,8 +31,8 @@ import com.annimon.stream.Stream; import net.sqlcipher.database.SQLiteDatabase; import org.session.libsession.utilities.DistributionTypes; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Contact; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.GroupRecord; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.recipients.Recipient.RecipientSettings; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java b/app/src/main/java/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java index 67d6fa34f6..750b6a7c80 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/loaders/BucketedThreadMediaLoader.java @@ -10,7 +10,7 @@ import androidx.loader.content.AsyncTaskLoader; import com.annimon.stream.Stream; import network.loki.messenger.R; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.MediaDatabase; import org.session.libsession.utilities.recipients.Recipient; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/loaders/ThreadMediaLoader.java b/app/src/main/java/org/thoughtcrime/securesms/database/loaders/ThreadMediaLoader.java index fe2054948c..3762c89bef 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/loaders/ThreadMediaLoader.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/loaders/ThreadMediaLoader.java @@ -5,7 +5,7 @@ import android.content.Context; import android.database.Cursor; import androidx.annotation.NonNull; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.session.libsession.utilities.recipients.Recipient; import org.thoughtcrime.securesms.util.AbstractCursorLoader; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/model/MediaMmsMessageRecord.java b/app/src/main/java/org/thoughtcrime/securesms/database/model/MediaMmsMessageRecord.java index 222cd5e65b..97b7329bc4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/model/MediaMmsMessageRecord.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/model/MediaMmsMessageRecord.java @@ -22,7 +22,7 @@ import androidx.annotation.Nullable; import android.text.SpannableString; import network.loki.messenger.R; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; +import org.session.libsession.utilities.Contact; import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview; import org.thoughtcrime.securesms.database.MmsDatabase; import org.thoughtcrime.securesms.database.SmsDatabase.Status; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/model/MmsMessageRecord.java b/app/src/main/java/org/thoughtcrime/securesms/database/model/MmsMessageRecord.java index 012bfc092d..528720547c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/model/MmsMessageRecord.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/model/MmsMessageRecord.java @@ -4,7 +4,7 @@ package org.thoughtcrime.securesms.database.model; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; +import org.session.libsession.utilities.Contact; import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview; import org.session.libsession.utilities.recipients.Recipient; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/model/Quote.java b/app/src/main/java/org/thoughtcrime/securesms/database/model/Quote.java index eb2ec381e0..e79626c66b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/model/Quote.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/model/Quote.java @@ -5,7 +5,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.mms.SlideDeck; public class Quote { diff --git a/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyAdapter.java b/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyAdapter.java index a955f368fd..277b2e847c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyAdapter.java +++ b/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyAdapter.java @@ -32,7 +32,7 @@ import org.thoughtcrime.securesms.giph.model.ChunkedImageUrl; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.mms.GlideRequests; -import org.session.libsession.utilities.color.MaterialColor; +import org.session.libsession.utilities.MaterialColor; import org.session.libsession.utilities.Util; import org.session.libsession.utilities.ViewUtil; diff --git a/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManager.java b/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManager.java index 700db60ca4..0b5b7340d6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManager.java +++ b/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManager.java @@ -6,7 +6,7 @@ import android.graphics.Bitmap; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.DistributionTypes; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.GroupUtil; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileAvatarJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileAvatarJob.java index 614b1084d5..080ce6c88c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileAvatarJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileAvatarJob.java @@ -7,7 +7,7 @@ import androidx.annotation.NonNull; import org.session.libsession.avatars.AvatarHelper; import org.session.libsession.messaging.utilities.Data; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.DownloadUtilities; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/CreateClosedGroupActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/CreateClosedGroupActivity.kt index 17ba185540..f13dee1d46 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/CreateClosedGroupActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/CreateClosedGroupActivity.kt @@ -18,7 +18,7 @@ import org.session.libsession.messaging.sending_receiving.MessageSender import org.session.libsession.messaging.sending_receiving.groupSizeLimit import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity import org.thoughtcrime.securesms.conversation.ConversationActivity -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.DistributionTypes import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.loki.utilities.fadeIn diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/CreatePrivateChatActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/CreatePrivateChatActivity.kt index 4fb93a53b1..25c6dec9a4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/CreatePrivateChatActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/CreatePrivateChatActivity.kt @@ -17,7 +17,7 @@ import kotlinx.android.synthetic.main.fragment_enter_public_key.* import network.loki.messenger.R import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity import org.thoughtcrime.securesms.conversation.ConversationActivity -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.DistributionTypes import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.loki.fragments.ScanQRCodeWrapperFragment diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/EditClosedGroupActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/EditClosedGroupActivity.kt index 385af011dd..d6508e8975 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/EditClosedGroupActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/EditClosedGroupActivity.kt @@ -22,7 +22,7 @@ import nl.komponents.kovenant.ui.successUi import org.session.libsession.messaging.sending_receiving.MessageSender import org.session.libsession.messaging.sending_receiving.groupSizeLimit import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.loki.dialogs.ClosedGroupEditingOptionsBottomSheet import org.thoughtcrime.securesms.loki.utilities.fadeIn diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/EditClosedGroupMembersAdapter.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/EditClosedGroupMembersAdapter.kt index 123e2ca97d..ab5e79d105 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/EditClosedGroupMembersAdapter.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/EditClosedGroupMembersAdapter.kt @@ -3,7 +3,7 @@ package org.thoughtcrime.securesms.loki.activities import android.content.Context import androidx.recyclerview.widget.RecyclerView import android.view.ViewGroup -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.thoughtcrime.securesms.loki.views.UserView import org.thoughtcrime.securesms.mms.GlideRequests import org.session.libsession.utilities.recipients.Recipient diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/JoinPublicChatActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/JoinPublicChatActivity.kt index 4d7065053d..bec0732995 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/JoinPublicChatActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/JoinPublicChatActivity.kt @@ -24,7 +24,7 @@ import kotlinx.coroutines.withContext import network.loki.messenger.R import okhttp3.HttpUrl import org.session.libsession.messaging.open_groups.OpenGroupAPIV2.DefaultGroup -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.DistributionTypes import org.session.libsession.utilities.recipients.Recipient import org.session.libsession.utilities.GroupUtil diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/QRCodeActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/QRCodeActivity.kt index dc65b0d33a..dd6bf3420e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/QRCodeActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/QRCodeActivity.kt @@ -15,7 +15,7 @@ import kotlinx.android.synthetic.main.fragment_view_my_qr_code.* import network.loki.messenger.R import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity import org.thoughtcrime.securesms.conversation.ConversationActivity -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.DistributionTypes import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.loki.fragments.ScanQRCodeWrapperFragment diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SelectContactsAdapter.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SelectContactsAdapter.kt index d8e8d17216..2ce6d89ebf 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SelectContactsAdapter.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SelectContactsAdapter.kt @@ -3,7 +3,7 @@ package org.thoughtcrime.securesms.loki.activities import android.content.Context import androidx.recyclerview.widget.RecyclerView import android.view.ViewGroup -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.thoughtcrime.securesms.loki.views.UserView import org.thoughtcrime.securesms.mms.GlideRequests import org.session.libsession.utilities.recipients.Recipient diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt index 0d0e96ac41..354810015f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt @@ -27,11 +27,11 @@ import nl.komponents.kovenant.ui.alwaysUi import nl.komponents.kovenant.ui.successUi import org.session.libsession.avatars.AvatarHelper import org.session.libsession.messaging.open_groups.OpenGroupAPI -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.ProfilePictureUtilities import org.session.libsession.utilities.SSKEnvironment.ProfileManagerProtocol import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsession.utilities.preferences.ProfileKeyUtil +import org.session.libsession.utilities.ProfileKeyUtil import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity import org.thoughtcrime.securesms.avatar.AvatarSelection diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiThreadDatabase.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiThreadDatabase.kt index 63098e4dbc..c591160c32 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiThreadDatabase.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiThreadDatabase.kt @@ -11,7 +11,7 @@ import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper import org.thoughtcrime.securesms.loki.utilities.* import org.session.libsession.messaging.open_groups.OpenGroupV2 -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.recipients.Recipient import org.session.libsignal.utilities.JsonUtil diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiUserDatabase.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiUserDatabase.kt index 33138449f4..3323283514 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiUserDatabase.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiUserDatabase.kt @@ -4,7 +4,7 @@ import android.content.ContentValues import android.content.Context import android.database.sqlite.SQLiteDatabase import org.session.libsignal.utilities.Log -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.thoughtcrime.securesms.database.Database import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper import org.thoughtcrime.securesms.loki.utilities.get diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocolV2.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocolV2.kt index a661884c79..1ac34bc1e7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocolV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocolV2.kt @@ -18,7 +18,7 @@ import org.thoughtcrime.securesms.loki.api.LokiPushNotificationManager import org.thoughtcrime.securesms.loki.api.LokiPushNotificationManager.ClosedGroupOperation import org.thoughtcrime.securesms.loki.database.LokiAPIDatabase -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.GroupRecord import org.session.libsession.utilities.recipients.Recipient import org.session.libsession.utilities.GroupUtil diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt index c7ba42ecf5..e9e88215ea 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt @@ -6,7 +6,7 @@ import org.session.libsession.messaging.MessagingModuleConfiguration import org.session.libsession.messaging.messages.Destination import org.session.libsession.messaging.messages.control.ConfigurationMessage import org.session.libsession.messaging.sending_receiving.MessageSender -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.TextSecurePreferences import org.thoughtcrime.securesms.loki.utilities.ContactUtilities diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/SessionMetaProtocol.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/SessionMetaProtocol.kt index 374b3e333d..c1145c5f49 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/SessionMetaProtocol.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/SessionMetaProtocol.kt @@ -2,7 +2,7 @@ package org.thoughtcrime.securesms.loki.protocol import android.content.Context import org.thoughtcrime.securesms.ApplicationContext -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.jobs.RetrieveProfileAvatarJob import org.session.libsession.utilities.recipients.Recipient diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/OpenGroupUtilities.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/OpenGroupUtilities.kt index 31dacd8886..fa0d7a82e2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/OpenGroupUtilities.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/OpenGroupUtilities.kt @@ -11,7 +11,7 @@ import org.session.libsession.messaging.open_groups.OpenGroupV2 import org.session.libsession.utilities.recipients.Recipient import org.session.libsession.utilities.GroupUtil import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsession.utilities.preferences.ProfileKeyUtil +import org.session.libsession.utilities.ProfileKeyUtil import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.groups.GroupManager diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt index 68188a06ab..fbc469379e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/views/ProfilePictureView.kt @@ -12,7 +12,7 @@ import kotlinx.android.synthetic.main.view_profile_picture.view.* import network.loki.messenger.R import org.session.libsession.avatars.ProfileContactPhoto import org.session.libsession.messaging.mentions.MentionsManager -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.recipients.Recipient import org.session.libsession.utilities.TextSecurePreferences import org.thoughtcrime.securesms.database.DatabaseFactory diff --git a/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageActivity.java b/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageActivity.java index 50e71cead7..d3c683dd46 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageActivity.java @@ -24,12 +24,12 @@ import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity; import org.thoughtcrime.securesms.components.ConversationItemFooter; import org.thoughtcrime.securesms.linkpreview.LinkPreviewUtil; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.ThemeUtil; import org.session.libsession.utilities.Util; -import org.session.libsession.utilities.views.Stub; +import org.session.libsession.utilities.Stub; import java.util.Locale; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendActivity.java b/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendActivity.java index 49840795e4..d2b36a6892 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendActivity.java @@ -28,7 +28,7 @@ import org.thoughtcrime.securesms.permissions.Permissions; import org.thoughtcrime.securesms.providers.BlobProvider; import org.thoughtcrime.securesms.scribbles.ImageEditorFragment; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.concurrent.SimpleTask; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java b/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java index 481234e74d..0df65497c8 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java @@ -51,7 +51,7 @@ import org.session.libsignal.utilities.guava.Optional; import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; -import org.session.libsession.utilities.views.Stub; +import org.session.libsession.utilities.Stub; import org.session.libsignal.utilities.ListenableFuture; import org.session.libsignal.utilities.SettableFuture; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/AttachmentManager.java b/app/src/main/java/org/thoughtcrime/securesms/mms/AttachmentManager.java index c6e24adfd4..dcac22909c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/AttachmentManager.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/AttachmentManager.java @@ -57,7 +57,7 @@ import org.session.libsession.messaging.sending_receiving.attachments.Attachment import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.ThemeUtil; import org.session.libsession.utilities.ViewUtil; -import org.session.libsession.utilities.views.Stub; +import org.session.libsession.utilities.Stub; import org.session.libsignal.utilities.ListenableFuture; import org.session.libsignal.utilities.ListenableFuture.Listener; import org.session.libsignal.utilities.SettableFuture; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/QuoteId.java b/app/src/main/java/org/thoughtcrime/securesms/mms/QuoteId.java index 39f4a71faa..06cb3175b6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/QuoteId.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/QuoteId.java @@ -5,7 +5,7 @@ import androidx.annotation.Nullable; import org.json.JSONException; import org.json.JSONObject; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.database.model.MessageRecord; import org.session.libsignal.utilities.Log; diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/AbstractNotificationBuilder.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/AbstractNotificationBuilder.java index b1089b8fda..89296691fa 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/AbstractNotificationBuilder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/AbstractNotificationBuilder.java @@ -11,7 +11,7 @@ import android.text.SpannableStringBuilder; import android.text.TextUtils; import network.loki.messenger.R; -import org.session.libsession.utilities.preferences.NotificationPrivacyPreference; +import org.session.libsession.utilities.NotificationPrivacyPreference; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.recipients.Recipient.*; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/AndroidAutoReplyReceiver.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/AndroidAutoReplyReceiver.java index 363abf8aeb..d76071399f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/AndroidAutoReplyReceiver.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/AndroidAutoReplyReceiver.java @@ -28,7 +28,7 @@ import androidx.core.app.RemoteInput; import org.session.libsession.messaging.messages.visible.VisibleMessage; import org.session.libsession.messaging.sending_receiving.MessageSender; import org.thoughtcrime.securesms.ApplicationContext; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.MessagingDatabase.MarkedMessageInfo; import org.thoughtcrime.securesms.mms.MmsException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java index 6375bc64a5..d5ab94c1a0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java @@ -40,7 +40,7 @@ import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationManagerCompat; import org.session.libsession.messaging.sending_receiving.notifications.MessageNotifier; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; +import org.session.libsession.utilities.Contact; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.ServiceUtil; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/FailedNotificationBuilder.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/FailedNotificationBuilder.java index f2ca8258e5..1ffd74be63 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/FailedNotificationBuilder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/FailedNotificationBuilder.java @@ -7,7 +7,7 @@ import android.graphics.BitmapFactory; import network.loki.messenger.R; import org.session.libsession.utilities.recipients.Recipient; -import org.session.libsession.utilities.preferences.NotificationPrivacyPreference; +import org.session.libsession.utilities.NotificationPrivacyPreference; public class FailedNotificationBuilder extends AbstractNotificationBuilder { diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/MarkReadReceiver.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/MarkReadReceiver.java index 8483694af3..3df423a6de 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/MarkReadReceiver.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/MarkReadReceiver.java @@ -15,7 +15,7 @@ import org.session.libsession.messaging.messages.control.ReadReceipt; import org.session.libsession.messaging.sending_receiving.MessageSender; import org.session.libsession.utilities.TextSecurePreferences; import org.thoughtcrime.securesms.ApplicationContext; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.MessagingDatabase.ExpirationInfo; import org.thoughtcrime.securesms.database.MessagingDatabase.MarkedMessageInfo; diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/MultipleRecipientNotificationBuilder.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/MultipleRecipientNotificationBuilder.java index 5430a49772..9527282d39 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/MultipleRecipientNotificationBuilder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/MultipleRecipientNotificationBuilder.java @@ -11,7 +11,7 @@ import android.text.SpannableStringBuilder; import org.thoughtcrime.securesms.loki.activities.HomeActivity; import org.thoughtcrime.securesms.loki.utilities.NotificationUtilities; -import org.session.libsession.utilities.preferences.NotificationPrivacyPreference; +import org.session.libsession.utilities.NotificationPrivacyPreference; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/NotificationChannels.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/NotificationChannels.java index 1e12a8dbc2..74cb8dd2b8 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/NotificationChannels.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/NotificationChannels.java @@ -22,7 +22,7 @@ import com.annimon.stream.Stream; import network.loki.messenger.BuildConfig; import network.loki.messenger.R; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.RecipientDatabase; import org.session.libsession.utilities.recipients.Recipient; diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/PendingMessageNotificationBuilder.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/PendingMessageNotificationBuilder.java index ac6ace3708..efd040a26d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/PendingMessageNotificationBuilder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/PendingMessageNotificationBuilder.java @@ -8,7 +8,7 @@ import androidx.core.app.NotificationCompat; import org.session.libsession.utilities.recipients.Recipient; import org.thoughtcrime.securesms.loki.activities.HomeActivity; -import org.session.libsession.utilities.preferences.NotificationPrivacyPreference; +import org.session.libsession.utilities.NotificationPrivacyPreference; import org.session.libsession.utilities.TextSecurePreferences; import network.loki.messenger.R; diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/RemoteReplyReceiver.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/RemoteReplyReceiver.java index 0d0736b560..92ef8fd97c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/RemoteReplyReceiver.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/RemoteReplyReceiver.java @@ -30,7 +30,7 @@ import org.session.libsession.messaging.messages.visible.VisibleMessage; import org.session.libsession.messaging.sending_receiving.MessageSender; import org.session.libsignal.utilities.Log; import org.thoughtcrime.securesms.ApplicationContext; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.MessagingDatabase.MarkedMessageInfo; import org.thoughtcrime.securesms.mms.MmsException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java index 9e59ee38f8..0ed628034f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java @@ -35,7 +35,7 @@ import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.mms.Slide; import org.thoughtcrime.securesms.mms.SlideDeck; -import org.session.libsession.utilities.preferences.NotificationPrivacyPreference; +import org.session.libsession.utilities.NotificationPrivacyPreference; import org.session.libsession.utilities.recipients.Recipient; import org.thoughtcrime.securesms.util.BitmapUtil; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/search/SearchRepository.java b/app/src/main/java/org/thoughtcrime/securesms/search/SearchRepository.java index c13e1a5899..df4cb1d174 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/search/SearchRepository.java +++ b/app/src/main/java/org/thoughtcrime/securesms/search/SearchRepository.java @@ -9,7 +9,7 @@ import android.text.TextUtils; import com.annimon.stream.Stream; import org.thoughtcrime.securesms.contacts.ContactAccessor; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.thoughtcrime.securesms.database.CursorList; import org.thoughtcrime.securesms.database.MmsSmsColumns; import org.thoughtcrime.securesms.database.SearchDatabase; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/ExpiringMessageManager.java b/app/src/main/java/org/thoughtcrime/securesms/service/ExpiringMessageManager.java index 9d2339029f..59545c0fa0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/ExpiringMessageManager.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/ExpiringMessageManager.java @@ -6,7 +6,7 @@ import android.content.Context; import org.jetbrains.annotations.NotNull; import org.session.libsession.messaging.messages.control.ExpirationTimerUpdate; import org.session.libsession.messaging.messages.signal.OutgoingExpirationUpdateMessage; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.GroupUtil; import org.session.libsession.utilities.SSKEnvironment; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/QuickResponseService.java b/app/src/main/java/org/thoughtcrime/securesms/service/QuickResponseService.java index 89f218faf6..0f5a3f17a6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/QuickResponseService.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/QuickResponseService.java @@ -9,7 +9,7 @@ import android.widget.Toast; import network.loki.messenger.R; import org.session.libsession.messaging.messages.visible.VisibleMessage; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsignal.utilities.Log; import org.session.libsession.messaging.sending_receiving.MessageSender; import org.thoughtcrime.securesms.util.Rfc5724Uri; diff --git a/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ReadReceiptManager.kt b/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ReadReceiptManager.kt index d5adfe9f15..2fc8c1cbaf 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ReadReceiptManager.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ReadReceiptManager.kt @@ -1,7 +1,7 @@ package org.thoughtcrime.securesms.sskenvironment import android.content.Context -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.SSKEnvironment import org.session.libsession.utilities.TextSecurePreferences import org.session.libsignal.utilities.Log diff --git a/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/TypingStatusRepository.java b/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/TypingStatusRepository.java index ad9833b8c1..c1d6e53690 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/TypingStatusRepository.java +++ b/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/TypingStatusRepository.java @@ -10,7 +10,7 @@ import com.annimon.stream.Collectors; import com.annimon.stream.Stream; import org.jetbrains.annotations.NotNull; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.recipients.Recipient; import org.session.libsession.utilities.SSKEnvironment; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/test/java/org/thoughtcrime/securesms/recipients/RecipientExporterTest.java b/app/src/test/java/org/thoughtcrime/securesms/recipients/RecipientExporterTest.java index 5cf7df5da5..fef1954038 100644 --- a/app/src/test/java/org/thoughtcrime/securesms/recipients/RecipientExporterTest.java +++ b/app/src/test/java/org/thoughtcrime/securesms/recipients/RecipientExporterTest.java @@ -9,7 +9,7 @@ import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.runners.MockitoJUnitRunner; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import static android.provider.ContactsContract.Intents.Insert.EMAIL; import static android.provider.ContactsContract.Intents.Insert.NAME; diff --git a/libsession/src/main/java/org/session/libsession/avatars/AvatarHelper.java b/libsession/src/main/java/org/session/libsession/avatars/AvatarHelper.java index 1fe9f684fb..1215757f26 100644 --- a/libsession/src/main/java/org/session/libsession/avatars/AvatarHelper.java +++ b/libsession/src/main/java/org/session/libsession/avatars/AvatarHelper.java @@ -7,7 +7,7 @@ import androidx.annotation.Nullable; import com.annimon.stream.Stream; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import java.io.File; import java.io.FileInputStream; diff --git a/libsession/src/main/java/org/session/libsession/avatars/ContactColors.java b/libsession/src/main/java/org/session/libsession/avatars/ContactColors.java index b6ac9811d9..95b720e9ff 100644 --- a/libsession/src/main/java/org/session/libsession/avatars/ContactColors.java +++ b/libsession/src/main/java/org/session/libsession/avatars/ContactColors.java @@ -2,7 +2,7 @@ package org.session.libsession.avatars; import androidx.annotation.NonNull; -import org.session.libsession.utilities.color.MaterialColor; +import org.session.libsession.utilities.MaterialColor; import java.util.ArrayList; import java.util.Arrays; diff --git a/libsession/src/main/java/org/session/libsession/avatars/GroupRecordContactPhoto.java b/libsession/src/main/java/org/session/libsession/avatars/GroupRecordContactPhoto.java index f2cb3b1e34..bd0edd3449 100644 --- a/libsession/src/main/java/org/session/libsession/avatars/GroupRecordContactPhoto.java +++ b/libsession/src/main/java/org/session/libsession/avatars/GroupRecordContactPhoto.java @@ -8,7 +8,7 @@ import androidx.annotation.Nullable; import org.session.libsession.messaging.MessagingModuleConfiguration; import org.session.libsession.database.StorageProtocol; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.GroupRecord; import org.session.libsession.utilities.Conversions; import org.session.libsignal.utilities.guava.Optional; diff --git a/libsession/src/main/java/org/session/libsession/avatars/ProfileContactPhoto.java b/libsession/src/main/java/org/session/libsession/avatars/ProfileContactPhoto.java index d614c5e0fe..f8675b031f 100644 --- a/libsession/src/main/java/org/session/libsession/avatars/ProfileContactPhoto.java +++ b/libsession/src/main/java/org/session/libsession/avatars/ProfileContactPhoto.java @@ -6,7 +6,7 @@ import android.net.Uri; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import java.io.IOException; import java.io.InputStream; diff --git a/libsession/src/main/java/org/session/libsession/avatars/SystemContactPhoto.java b/libsession/src/main/java/org/session/libsession/avatars/SystemContactPhoto.java index e29df14f14..55abfff6e1 100644 --- a/libsession/src/main/java/org/session/libsession/avatars/SystemContactPhoto.java +++ b/libsession/src/main/java/org/session/libsession/avatars/SystemContactPhoto.java @@ -7,7 +7,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.Conversions; import java.io.FileNotFoundException; diff --git a/libsession/src/main/java/org/session/libsession/database/MessageDataProvider.kt b/libsession/src/main/java/org/session/libsession/database/MessageDataProvider.kt index fef2acf6da..4650afc528 100644 --- a/libsession/src/main/java/org/session/libsession/database/MessageDataProvider.kt +++ b/libsession/src/main/java/org/session/libsession/database/MessageDataProvider.kt @@ -2,7 +2,7 @@ package org.session.libsession.database import org.session.libsession.messaging.open_groups.OpenGroup import org.session.libsession.messaging.sending_receiving.attachments.* -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.messaging.utilities.DotNetAPI import org.session.libsignal.messages.SignalServiceAttachmentPointer import org.session.libsignal.messages.SignalServiceAttachmentStream diff --git a/libsession/src/main/java/org/session/libsession/database/StorageProtocol.kt b/libsession/src/main/java/org/session/libsession/database/StorageProtocol.kt index af1093336a..1afc8afae5 100644 --- a/libsession/src/main/java/org/session/libsession/database/StorageProtocol.kt +++ b/libsession/src/main/java/org/session/libsession/database/StorageProtocol.kt @@ -16,7 +16,7 @@ import org.session.libsession.messaging.sending_receiving.data_extraction.DataEx import org.session.libsession.messaging.sending_receiving.attachments.DatabaseAttachment import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.GroupRecord import org.session.libsession.utilities.recipients.Recipient.RecipientSettings import org.session.libsignal.crypto.ecc.ECKeyPair diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/Destination.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/Destination.kt index cfcd73efe0..9a65978afc 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/Destination.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/Destination.kt @@ -3,7 +3,7 @@ package org.session.libsession.messaging.messages import org.session.libsession.messaging.MessagingModuleConfiguration import org.session.libsession.messaging.open_groups.OpenGroupV2 import org.session.libsession.messaging.open_groups.OpenGroup -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.GroupUtil import org.session.libsignal.utilities.toHexString diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ClosedGroupControlMessage.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ClosedGroupControlMessage.kt index 41345ea26d..6503582f89 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ClosedGroupControlMessage.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ClosedGroupControlMessage.kt @@ -2,7 +2,7 @@ package org.session.libsession.messaging.messages.control import com.google.protobuf.ByteString import org.session.libsession.messaging.MessagingModuleConfiguration -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.recipients.Recipient import org.session.libsession.utilities.GroupUtil import org.session.libsignal.crypto.ecc.DjbECPrivateKey diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt index 79fd100a8b..6eefd63c7b 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt @@ -2,10 +2,10 @@ package org.session.libsession.messaging.messages.control import com.google.protobuf.ByteString import org.session.libsession.messaging.MessagingModuleConfiguration -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.GroupUtil import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsession.utilities.preferences.ProfileKeyUtil +import org.session.libsession.utilities.ProfileKeyUtil import org.session.libsignal.crypto.ecc.DjbECPrivateKey import org.session.libsignal.crypto.ecc.DjbECPublicKey import org.session.libsignal.crypto.ecc.ECKeyPair diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/signal/IncomingMediaMessage.java b/libsession/src/main/java/org/session/libsession/messaging/messages/signal/IncomingMediaMessage.java index bea675ee44..79cccd2eb1 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/signal/IncomingMediaMessage.java +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/signal/IncomingMediaMessage.java @@ -4,8 +4,8 @@ import org.session.libsession.messaging.messages.visible.VisibleMessage; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; import org.session.libsession.messaging.sending_receiving.attachments.PointerAttachment; import org.session.libsession.messaging.sending_receiving.data_extraction.DataExtractionNotificationInfoMessage; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Contact; +import org.session.libsession.utilities.Address; import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; import org.session.libsession.utilities.GroupUtil; diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/signal/IncomingTextMessage.java b/libsession/src/main/java/org/session/libsession/messaging/messages/signal/IncomingTextMessage.java index ca54a62f71..5ef9179d0e 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/signal/IncomingTextMessage.java +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/signal/IncomingTextMessage.java @@ -7,7 +7,7 @@ import androidx.annotation.Nullable; import org.session.libsession.messaging.messages.visible.OpenGroupInvitation; import org.session.libsession.messaging.messages.visible.VisibleMessage; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.messaging.utilities.UpdateMessageData; import org.session.libsession.utilities.GroupUtil; import org.session.libsignal.utilities.guava.Optional; diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingGroupMediaMessage.java b/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingGroupMediaMessage.java index f4d2b4a96a..43eac8dea9 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingGroupMediaMessage.java +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingGroupMediaMessage.java @@ -5,7 +5,7 @@ import androidx.annotation.Nullable; import org.session.libsession.utilities.DistributionTypes; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; +import org.session.libsession.utilities.Contact; import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; import org.session.libsession.utilities.recipients.Recipient; diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingMediaMessage.java b/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingMediaMessage.java index b76484bbd2..a163b667d9 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingMediaMessage.java +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingMediaMessage.java @@ -8,7 +8,7 @@ import org.session.libsession.utilities.DistributionTypes; import org.session.libsession.utilities.IdentityKeyMismatch; import org.session.libsession.utilities.NetworkFailure; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; +import org.session.libsession.utilities.Contact; import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; import org.session.libsession.utilities.recipients.Recipient; diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingSecureMediaMessage.java b/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingSecureMediaMessage.java index fcb334e3e7..907d1a9dda 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingSecureMediaMessage.java +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/signal/OutgoingSecureMediaMessage.java @@ -4,7 +4,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; -import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; +import org.session.libsession.utilities.Contact; import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; import org.session.libsession.utilities.recipients.Recipient; diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/visible/VisibleMessage.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/visible/VisibleMessage.kt index 6f4067c558..6fde15d673 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/visible/VisibleMessage.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/visible/VisibleMessage.kt @@ -4,7 +4,7 @@ import com.goterl.lazycode.lazysodium.BuildConfig import org.session.libsession.messaging.MessagingModuleConfiguration import org.session.libsession.messaging.messages.Message import org.session.libsession.messaging.sending_receiving.attachments.DatabaseAttachment -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.recipients.Recipient import org.session.libsession.utilities.GroupUtil import org.session.libsignal.protos.SignalServiceProtos diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSender.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSender.kt index 03e8c359ef..d08bcfcfad 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSender.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSender.kt @@ -13,7 +13,7 @@ import org.session.libsession.messaging.messages.control.ConfigurationMessage import org.session.libsession.messaging.messages.control.ExpirationTimerUpdate import org.session.libsession.messaging.messages.visible.* import org.session.libsession.messaging.open_groups.* -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.messaging.utilities.MessageWrapper import org.session.libsession.snode.RawResponsePromise import org.session.libsession.snode.SnodeAPI diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroupHandler.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroupHandler.kt index 1a91048a31..aceeda6635 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroupHandler.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageSenderClosedGroupHandler.kt @@ -9,7 +9,7 @@ import org.session.libsession.messaging.MessagingModuleConfiguration import org.session.libsession.messaging.messages.control.ClosedGroupControlMessage import org.session.libsession.messaging.sending_receiving.MessageSender.Error import org.session.libsession.messaging.sending_receiving.notifications.PushNotificationAPI -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.GroupUtil import org.session.libsession.utilities.TextSecurePreferences import org.session.libsignal.crypto.ecc.Curve diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt index 83eec29462..8081435e95 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt @@ -13,13 +13,13 @@ import org.session.libsession.messaging.sending_receiving.data_extraction.DataEx import org.session.libsession.messaging.sending_receiving.link_preview.LinkPreview import org.session.libsession.messaging.sending_receiving.notifications.PushNotificationAPI import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.GroupRecord import org.session.libsession.utilities.recipients.Recipient import org.session.libsession.utilities.GroupUtil import org.session.libsession.utilities.SSKEnvironment import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsession.utilities.preferences.ProfileKeyUtil +import org.session.libsession.utilities.ProfileKeyUtil import org.session.libsignal.crypto.ecc.DjbECPrivateKey import org.session.libsignal.crypto.ecc.DjbECPublicKey import org.session.libsignal.crypto.ecc.ECKeyPair diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupPoller.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupPoller.kt index 9c37e1e8b9..c33056e9a6 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupPoller.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupPoller.kt @@ -9,7 +9,7 @@ import org.session.libsession.messaging.jobs.MessageReceiveJob import org.session.libsession.messaging.open_groups.OpenGroup import org.session.libsession.messaging.open_groups.OpenGroupAPI import org.session.libsession.messaging.open_groups.OpenGroupMessage -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.GroupUtil import org.session.libsignal.protos.SignalServiceProtos.* import org.session.libsignal.utilities.Log diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupV2Poller.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupV2Poller.kt index 35d1624231..d101fa70ff 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupV2Poller.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupV2Poller.kt @@ -7,7 +7,7 @@ import org.session.libsession.messaging.jobs.MessageReceiveJob import org.session.libsession.messaging.open_groups.OpenGroupAPIV2 import org.session.libsession.messaging.open_groups.OpenGroupMessageV2 import org.session.libsession.messaging.open_groups.OpenGroupV2 -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.GroupUtil import org.session.libsignal.protos.SignalServiceProtos import org.session.libsignal.utilities.Log diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/quotes/QuoteModel.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/quotes/QuoteModel.kt index fe4d8d6b21..ab47690db5 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/quotes/QuoteModel.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/quotes/QuoteModel.kt @@ -1,7 +1,7 @@ package org.session.libsession.messaging.sending_receiving.quotes import org.session.libsession.messaging.sending_receiving.attachments.Attachment -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address class QuoteModel(val id: Long, val author: Address, diff --git a/libsession/src/main/java/org/session/libsession/messaging/threads/Address.kt b/libsession/src/main/java/org/session/libsession/messaging/threads/Address.kt deleted file mode 100644 index 7ff2c3862e..0000000000 --- a/libsession/src/main/java/org/session/libsession/messaging/threads/Address.kt +++ /dev/null @@ -1,185 +0,0 @@ -package org.session.libsession.messaging.threads - -import android.content.Context -import android.os.Parcel -import android.os.Parcelable -import android.util.Pair -import androidx.annotation.VisibleForTesting -import org.session.libsession.utilities.DelimiterUtil -import org.session.libsession.utilities.GroupUtil -import org.session.libsignal.utilities.guava.Optional -import org.session.libsignal.utilities.Util -import java.util.* -import java.util.concurrent.atomic.AtomicReference -import java.util.regex.Matcher -import java.util.regex.Pattern - -class Address private constructor(address: String) : Parcelable, Comparable { - private val address: String = address.toLowerCase() - - constructor(`in`: Parcel) : this(`in`.readString()!!) {} - - val isGroup: Boolean - get() = GroupUtil.isEncodedGroup(address) - val isClosedGroup: Boolean - get() = GroupUtil.isClosedGroup(address) - val isOpenGroup: Boolean - get() = GroupUtil.isOpenGroup(address) - val isContact: Boolean - get() = !isGroup - - fun contactIdentifier(): String { - if (!isContact && !isOpenGroup) { - if (isGroup) throw AssertionError("Not e164, is group") - throw AssertionError("Not e164, unknown") - } - return address - } - - fun toGroupString(): String { - if (!isGroup) throw AssertionError("Not group") - return address - } - - override fun toString(): String { - return address - } - - fun serialize(): String { - return address - } - - override fun equals(other: Any?): Boolean { - if (this === other) return true - return if (other == null || other !is Address) false else address == other.address - } - - override fun hashCode(): Int { - return address.hashCode() - } - - override fun describeContents(): Int { - return 0 - } - - override fun writeToParcel(dest: Parcel, flags: Int) { - dest.writeString(address) - } - - override fun compareTo(other: Address?): Int { - return address.compareTo(other?.address!!) - } - - @VisibleForTesting - class ExternalAddressFormatter internal constructor(localCountryCode: String, countryCode: Boolean) { - private val localNumber: Optional - private val localCountryCode: String - private val ALPHA_PATTERN = Pattern.compile("[a-zA-Z]") - fun format(number: String?): String { - return number ?: "Unknown" - } - - private fun parseAreaCode(e164Number: String, countryCode: Int): String? { - when (countryCode) { - 1 -> return e164Number.substring(2, 5) - 55 -> return e164Number.substring(3, 5) - } - return null - } - - private fun applyAreaCodeRules(localNumber: Optional, testNumber: String): String { - if (!localNumber.isPresent || !localNumber.get().areaCode.isPresent) { - return testNumber - } - val matcher: Matcher - when (localNumber.get().countryCode) { - 1 -> { - matcher = US_NO_AREACODE.matcher(testNumber) - if (matcher.matches()) { - return localNumber.get().areaCode.toString() + matcher.group() - } - } - 55 -> { - matcher = BR_NO_AREACODE.matcher(testNumber) - if (matcher.matches()) { - return localNumber.get().areaCode.toString() + matcher.group() - } - } - } - return testNumber - } - - private class PhoneNumber internal constructor(val e164Number: String, val countryCode: Int, areaCode: String?) { - val areaCode: Optional - - init { - this.areaCode = Optional.fromNullable(areaCode) - } - } - - companion object { - private val TAG = ExternalAddressFormatter::class.java.simpleName - private val SHORT_COUNTRIES: HashSet = object : HashSet() { - init { - add("NU") - add("TK") - add("NC") - add("AC") - } - } - private val US_NO_AREACODE = Pattern.compile("^(\\d{7})$") - private val BR_NO_AREACODE = Pattern.compile("^(9?\\d{8})$") - } - - init { - localNumber = Optional.absent() - this.localCountryCode = localCountryCode - } - } - - companion object { - @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { - override fun createFromParcel(`in`: Parcel): Address { - return Address(`in`) - } - - override fun newArray(size: Int): Array { - return arrayOfNulls(size) - } - } - val UNKNOWN = Address("Unknown") - private val TAG = Address::class.java.simpleName - private val cachedFormatter = AtomicReference>() - - @JvmStatic - fun fromSerialized(serialized: String): Address { - return Address(serialized) - } - - @JvmStatic - fun fromExternal(context: Context, external: String?): Address { - return fromSerialized(external!!) - } - - @JvmStatic - fun fromSerializedList(serialized: String, delimiter: Char): List
{ - val escapedAddresses = DelimiterUtil.split(serialized, delimiter) - val addresses: MutableList
= LinkedList() - for (escapedAddress in escapedAddresses) { - addresses.add(fromSerialized(DelimiterUtil.unescape(escapedAddress, delimiter))) - } - return addresses - } - - @JvmStatic - fun toSerializedList(addresses: List
, delimiter: Char): String { - Collections.sort(addresses) - val escapedAddresses: MutableList = LinkedList() - for (address in addresses) { - escapedAddresses.add(DelimiterUtil.escape(address.serialize(), delimiter)) - } - return Util.join(escapedAddresses, delimiter.toString() + "") - } - } - -} \ No newline at end of file diff --git a/libsession/src/main/java/org/session/libsession/utilities/color/spans/CenterAlignedRelativeSizeSpan.java b/libsession/src/main/java/org/session/libsession/utilities/CenterAlignedRelativeSizeSpan.java similarity index 91% rename from libsession/src/main/java/org/session/libsession/utilities/color/spans/CenterAlignedRelativeSizeSpan.java rename to libsession/src/main/java/org/session/libsession/utilities/CenterAlignedRelativeSizeSpan.java index 9fca16c3c7..033fafb76c 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/color/spans/CenterAlignedRelativeSizeSpan.java +++ b/libsession/src/main/java/org/session/libsession/utilities/CenterAlignedRelativeSizeSpan.java @@ -1,4 +1,4 @@ -package org.session.libsession.utilities.color.spans; +package org.session.libsession.utilities; import androidx.annotation.NonNull; import android.text.TextPaint; diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Contact.java b/libsession/src/main/java/org/session/libsession/utilities/Contact.java similarity index 99% rename from libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Contact.java rename to libsession/src/main/java/org/session/libsession/utilities/Contact.java index 9158a7f827..a0d181ad62 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Contact.java +++ b/libsession/src/main/java/org/session/libsession/utilities/Contact.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.sending_receiving.sharecontacts; +package org.session.libsession.utilities; import android.net.Uri; import android.os.Parcel; @@ -17,7 +17,6 @@ import org.session.libsession.messaging.sending_receiving.attachments.Attachment import org.session.libsession.messaging.sending_receiving.attachments.AttachmentId; import org.session.libsession.messaging.sending_receiving.attachments.UriAttachment; import org.session.libsignal.utilities.JsonUtil; -import org.session.libsession.utilities.MediaTypes; import java.io.IOException; import java.util.Collections; diff --git a/libsession/src/main/java/org/session/libsession/utilities/GroupRecord.kt b/libsession/src/main/java/org/session/libsession/utilities/GroupRecord.kt index 3be8f4b69f..348b6bcae9 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/GroupRecord.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/GroupRecord.kt @@ -1,7 +1,7 @@ package org.session.libsession.utilities import android.text.TextUtils -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import java.io.IOException import java.util.* diff --git a/libsession/src/main/java/org/session/libsession/utilities/IdentityKeyMismatch.java b/libsession/src/main/java/org/session/libsession/utilities/IdentityKeyMismatch.java index ceb59d140f..f0308daa7d 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/IdentityKeyMismatch.java +++ b/libsession/src/main/java/org/session/libsession/utilities/IdentityKeyMismatch.java @@ -13,7 +13,7 @@ import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsignal.utilities.Base64; import org.session.libsignal.crypto.IdentityKey; import org.session.libsignal.exceptions.InvalidKeyException; diff --git a/libsession/src/main/java/org/session/libsession/utilities/color/MaterialColor.java b/libsession/src/main/java/org/session/libsession/utilities/MaterialColor.java similarity index 99% rename from libsession/src/main/java/org/session/libsession/utilities/color/MaterialColor.java rename to libsession/src/main/java/org/session/libsession/utilities/MaterialColor.java index 31e99f6632..03b54745ad 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/color/MaterialColor.java +++ b/libsession/src/main/java/org/session/libsession/utilities/MaterialColor.java @@ -1,4 +1,4 @@ -package org.session.libsession.utilities.color; +package org.session.libsession.utilities; import android.content.Context; import android.graphics.Color; diff --git a/libsession/src/main/java/org/session/libsession/utilities/NetworkFailure.java b/libsession/src/main/java/org/session/libsession/utilities/NetworkFailure.java index f4bfb91540..5d930ef1a9 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/NetworkFailure.java +++ b/libsession/src/main/java/org/session/libsession/utilities/NetworkFailure.java @@ -3,7 +3,7 @@ package org.session.libsession.utilities; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; public class NetworkFailure { diff --git a/libsession/src/main/java/org/session/libsession/utilities/preferences/NotificationPrivacyPreference.java b/libsession/src/main/java/org/session/libsession/utilities/NotificationPrivacyPreference.java similarity index 87% rename from libsession/src/main/java/org/session/libsession/utilities/preferences/NotificationPrivacyPreference.java rename to libsession/src/main/java/org/session/libsession/utilities/NotificationPrivacyPreference.java index 66352ae083..ee5b5f0a61 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/preferences/NotificationPrivacyPreference.java +++ b/libsession/src/main/java/org/session/libsession/utilities/NotificationPrivacyPreference.java @@ -1,4 +1,4 @@ -package org.session.libsession.utilities.preferences; +package org.session.libsession.utilities; public class NotificationPrivacyPreference { diff --git a/libsession/src/main/java/org/session/libsession/utilities/preferences/ProfileKeyUtil.java b/libsession/src/main/java/org/session/libsession/utilities/ProfileKeyUtil.java similarity index 96% rename from libsession/src/main/java/org/session/libsession/utilities/preferences/ProfileKeyUtil.java rename to libsession/src/main/java/org/session/libsession/utilities/ProfileKeyUtil.java index 3f7646c9ea..9e3842fc67 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/preferences/ProfileKeyUtil.java +++ b/libsession/src/main/java/org/session/libsession/utilities/ProfileKeyUtil.java @@ -1,4 +1,4 @@ -package org.session.libsession.utilities.preferences; +package org.session.libsession.utilities; import android.content.Context; import androidx.annotation.NonNull; diff --git a/libsession/src/main/java/org/session/libsession/utilities/ProfilePictureUtilities.kt b/libsession/src/main/java/org/session/libsession/utilities/ProfilePictureUtilities.kt index 60f4656e3c..df9802417f 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/ProfilePictureUtilities.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/ProfilePictureUtilities.kt @@ -5,7 +5,6 @@ import nl.komponents.kovenant.Promise import nl.komponents.kovenant.deferred import okio.Buffer import org.session.libsession.messaging.file_server.FileServerAPIV2 -import org.session.libsession.utilities.preferences.ProfileKeyUtil import org.session.libsignal.streams.ProfileCipherOutputStream import org.session.libsignal.utilities.ProfileAvatarData import org.session.libsignal.streams.DigestingRequestBody diff --git a/libsession/src/main/java/org/session/libsession/utilities/SSKEnvironment.kt b/libsession/src/main/java/org/session/libsession/utilities/SSKEnvironment.kt index 766f8b3ead..8cd7913655 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/SSKEnvironment.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/SSKEnvironment.kt @@ -3,7 +3,7 @@ package org.session.libsession.utilities import android.content.Context import org.session.libsession.messaging.messages.control.ExpirationTimerUpdate import org.session.libsession.messaging.sending_receiving.notifications.MessageNotifier -import org.session.libsession.messaging.threads.Address +import org.session.libsession.utilities.Address import org.session.libsession.utilities.recipients.Recipient class SSKEnvironment( diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Selectable.java b/libsession/src/main/java/org/session/libsession/utilities/Selectable.java similarity index 56% rename from libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Selectable.java rename to libsession/src/main/java/org/session/libsession/utilities/Selectable.java index 308491ebcf..8bb77f6242 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Selectable.java +++ b/libsession/src/main/java/org/session/libsession/utilities/Selectable.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.sending_receiving.sharecontacts; +package org.session.libsession.utilities; public interface Selectable { void setSelected(boolean selected); diff --git a/libsession/src/main/java/org/session/libsession/utilities/views/Stub.java b/libsession/src/main/java/org/session/libsession/utilities/Stub.java similarity index 89% rename from libsession/src/main/java/org/session/libsession/utilities/views/Stub.java rename to libsession/src/main/java/org/session/libsession/utilities/Stub.java index 292f051247..336877ad52 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/views/Stub.java +++ b/libsession/src/main/java/org/session/libsession/utilities/Stub.java @@ -1,4 +1,4 @@ -package org.session.libsession.utilities.views; +package org.session.libsession.utilities; import android.view.ViewStub; diff --git a/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt b/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt index bf67c45e9b..9e48d133c4 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt @@ -11,7 +11,6 @@ import kotlinx.coroutines.channels.BufferOverflow import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.asSharedFlow import org.session.libsession.R -import org.session.libsession.utilities.preferences.NotificationPrivacyPreference import org.session.libsignal.utilities.Log import java.io.IOException import java.util.* diff --git a/libsession/src/main/java/org/session/libsession/utilities/ViewUtil.java b/libsession/src/main/java/org/session/libsession/utilities/ViewUtil.java index 202e184ef4..34a0212c63 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/ViewUtil.java +++ b/libsession/src/main/java/org/session/libsession/utilities/ViewUtil.java @@ -38,7 +38,6 @@ import androidx.interpolator.view.animation.FastOutSlowInInterpolator; import org.session.libsignal.utilities.ListenableFuture; import org.session.libsignal.utilities.SettableFuture; -import org.session.libsession.utilities.views.Stub; public class ViewUtil { @SuppressWarnings("deprecation") diff --git a/libsession/src/main/java/org/session/libsession/utilities/recipients/Recipient.java b/libsession/src/main/java/org/session/libsession/utilities/recipients/Recipient.java index 1dc689cadb..b81222e222 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/recipients/Recipient.java +++ b/libsession/src/main/java/org/session/libsession/utilities/recipients/Recipient.java @@ -30,12 +30,12 @@ import com.annimon.stream.function.Consumer; import org.greenrobot.eventbus.EventBus; import org.session.libsession.messaging.MessagingModuleConfiguration; import org.session.libsession.avatars.TransparentContactPhoto; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.GroupRecord; import org.session.libsession.utilities.recipients.RecipientProvider.RecipientDetails; import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; -import org.session.libsession.utilities.color.MaterialColor; +import org.session.libsession.utilities.MaterialColor; import org.session.libsignal.utilities.Log; import org.session.libsignal.utilities.guava.Optional; import org.session.libsession.avatars.ContactColors; diff --git a/libsession/src/main/java/org/session/libsession/utilities/recipients/RecipientExporter.java b/libsession/src/main/java/org/session/libsession/utilities/recipients/RecipientExporter.java index b41c4124b2..f01a8174ae 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/recipients/RecipientExporter.java +++ b/libsession/src/main/java/org/session/libsession/utilities/recipients/RecipientExporter.java @@ -4,7 +4,7 @@ import android.content.Intent; import android.provider.ContactsContract; import android.text.TextUtils; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.Address; import static android.content.Intent.ACTION_INSERT_OR_EDIT; diff --git a/libsession/src/main/java/org/session/libsession/utilities/recipients/RecipientProvider.java b/libsession/src/main/java/org/session/libsession/utilities/recipients/RecipientProvider.java index 1e39d9c80a..8bbabae97a 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/recipients/RecipientProvider.java +++ b/libsession/src/main/java/org/session/libsession/utilities/recipients/RecipientProvider.java @@ -25,8 +25,8 @@ import androidx.annotation.Nullable; import org.session.libsession.messaging.MessagingModuleConfiguration; import org.session.libsignal.utilities.guava.Optional; -import org.session.libsession.utilities.color.MaterialColor; -import org.session.libsession.messaging.threads.Address; +import org.session.libsession.utilities.MaterialColor; +import org.session.libsession.utilities.Address; import org.session.libsession.utilities.GroupRecord; import org.session.libsession.utilities.recipients.Recipient.RecipientSettings; import org.session.libsession.utilities.recipients.Recipient.RegisteredState;