From 1e93d4651ce46ad72509296a7345dde5377b84cb Mon Sep 17 00:00:00 2001 From: Ryan ZHAO Date: Tue, 2 Feb 2021 15:40:43 +1100 Subject: [PATCH] clean --- .../thoughtcrime/securesms/ApplicationContext.java | 6 +----- .../securesms/BindableConversationItem.java | 3 --- .../securesms/backup/FullBackupExporter.kt | 2 +- .../securesms/backup/FullBackupImporter.kt | 2 +- .../securesms/components/AvatarImageView.java | 7 +++---- .../securesms/contactshare/ContactModelMapper.java | 4 ++-- .../securesms/contactshare/ContactUtil.java | 2 +- .../conversation/ConversationActivity.java | 2 +- .../securesms/database/MmsDatabase.java | 2 +- .../securesms/database/ThreadDatabase.java | 2 +- .../database/model/MediaMmsMessageRecord.java | 2 +- .../securesms/database/model/MmsMessageRecord.java | 2 +- .../securesms/glide/ContactPhotoFetcher.java | 2 +- .../securesms/glide/ContactPhotoLoader.java | 2 +- .../securesms/jobs/PushDecryptJob.java | 2 +- .../thoughtcrime/securesms/jobs/PushSendJob.java | 2 +- .../securesms/jobs/RetrieveProfileAvatarJob.java | 2 +- .../securesms/loki/activities/SettingsActivity.kt | 2 +- .../securesms/loki/views/ProfilePictureView.kt | 2 +- .../securesms/mms/IncomingMediaMessage.java | 2 +- .../securesms/mms/OutgoingGroupMediaMessage.java | 2 +- .../securesms/mms/OutgoingMediaMessage.java | 2 +- .../securesms/mms/OutgoingSecureMediaMessage.java | 2 +- .../securesms/mms/SignalGlideModule.java | 2 +- .../notifications/DefaultMessageNotifier.java | 2 +- .../SingleRecipientNotificationBuilder.java | 6 +++--- .../{contacts => }/avatars/AvatarHelper.java | 2 +- .../{contacts => }/avatars/ContactColors.java | 2 +- .../avatars/ContactColorsLegacy.java | 2 +- .../{contacts => }/avatars/ContactPhoto.java | 2 +- .../avatars/FallbackContactPhoto.java | 2 +- .../avatars/GeneratedContactPhoto.java | 2 +- .../avatars/GroupRecordContactPhoto.java | 2 +- .../avatars/ProfileContactPhoto.java | 2 +- .../avatars/ResourceContactPhoto.java | 3 +-- .../{contacts => }/avatars/SystemContactPhoto.java | 2 +- .../avatars/TransparentContactPhoto.java | 6 +----- .../{contacts => sharecontacts}/Contact.java | 2 +- .../{contacts => sharecontacts}/Selectable.java | 2 +- .../messaging/threads/recipients/Recipient.java | 14 ++++++-------- 40 files changed, 49 insertions(+), 64 deletions(-) rename libsession/src/main/java/org/session/libsession/messaging/{contacts => }/avatars/AvatarHelper.java (96%) rename libsession/src/main/java/org/session/libsession/messaging/{contacts => }/avatars/ContactColors.java (93%) rename libsession/src/main/java/org/session/libsession/messaging/{contacts => }/avatars/ContactColorsLegacy.java (93%) rename libsession/src/main/java/org/session/libsession/messaging/{contacts => }/avatars/ContactPhoto.java (87%) rename libsession/src/main/java/org/session/libsession/messaging/{contacts => }/avatars/FallbackContactPhoto.java (81%) rename libsession/src/main/java/org/session/libsession/messaging/{contacts => }/avatars/GeneratedContactPhoto.java (98%) rename libsession/src/main/java/org/session/libsession/messaging/{contacts => }/avatars/GroupRecordContactPhoto.java (97%) rename libsession/src/main/java/org/session/libsession/messaging/{contacts => }/avatars/ProfileContactPhoto.java (96%) rename libsession/src/main/java/org/session/libsession/messaging/{contacts => }/avatars/ResourceContactPhoto.java (94%) rename libsession/src/main/java/org/session/libsession/messaging/{contacts => }/avatars/SystemContactPhoto.java (96%) rename libsession/src/main/java/org/session/libsession/messaging/{contacts => }/avatars/TransparentContactPhoto.java (80%) rename libsession/src/main/java/org/session/libsession/messaging/sending_receiving/{contacts => sharecontacts}/Contact.java (99%) rename libsession/src/main/java/org/session/libsession/messaging/sending_receiving/{contacts => sharecontacts}/Selectable.java (56%) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java b/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java index af6b39db39..f2dcb248a5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java +++ b/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java @@ -34,7 +34,7 @@ import com.google.firebase.iid.FirebaseInstanceId; import org.conscrypt.Conscrypt; import org.jetbrains.annotations.NotNull; import org.session.libsession.messaging.MessagingConfiguration; -import org.session.libsession.messaging.contacts.avatars.AvatarHelper; +import org.session.libsession.messaging.avatars.AvatarHelper; import org.session.libsession.utilities.SSKEnvironment; import org.session.libsession.messaging.sending_receiving.notifications.MessageNotifier; import org.session.libsession.utilities.dynamiclanguage.DynamicLanguageContextWrapper; @@ -42,7 +42,6 @@ import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; import org.session.libsession.utilities.dynamiclanguage.LocaleParser; -import org.session.libsignal.libsignal.state.SessionRecord; import org.signal.aesgcmprovider.AesGcmProvider; import org.thoughtcrime.securesms.loki.api.SessionProtocolImpl; import org.thoughtcrime.securesms.sskenvironment.ProfileManager; @@ -52,7 +51,6 @@ import org.thoughtcrime.securesms.components.TypingStatusSender; import org.thoughtcrime.securesms.crypto.IdentityKeyUtil; import org.thoughtcrime.securesms.crypto.MasterSecretUtil; import org.thoughtcrime.securesms.crypto.ProfileKeyUtil; -import org.thoughtcrime.securesms.crypto.storage.TextSecureSessionStore; import org.session.libsession.messaging.threads.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.GroupDatabase; @@ -99,10 +97,8 @@ import org.webrtc.PeerConnectionFactory; import org.webrtc.PeerConnectionFactory.InitializationOptions; import org.webrtc.voiceengine.WebRtcAudioManager; import org.webrtc.voiceengine.WebRtcAudioUtils; -import org.session.libsignal.libsignal.SignalProtocolAddress; import org.session.libsignal.libsignal.logging.SignalProtocolLoggerProvider; import org.session.libsignal.service.api.messages.SignalServiceEnvelope; -import org.session.libsignal.service.api.push.SignalServiceAddress; import org.session.libsignal.service.api.util.StreamDetails; import org.session.libsignal.service.internal.push.SignalServiceProtos; import org.session.libsignal.service.loki.api.Poller; diff --git a/app/src/main/java/org/thoughtcrime/securesms/BindableConversationItem.java b/app/src/main/java/org/thoughtcrime/securesms/BindableConversationItem.java index 5b693dfd6c..a4193c4e7c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/BindableConversationItem.java +++ b/app/src/main/java/org/thoughtcrime/securesms/BindableConversationItem.java @@ -2,7 +2,6 @@ package org.thoughtcrime.securesms; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import android.view.View; import org.thoughtcrime.securesms.database.model.MessageRecord; @@ -11,12 +10,10 @@ import org.thoughtcrime.securesms.mms.GlideRequests; import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsession.messaging.sending_receiving.attachments.StickerLocator; -import org.session.libsession.messaging.sending_receiving.contacts.Contact; import org.session.libsession.messaging.sending_receiving.linkpreview.LinkPreview; import org.session.libsession.messaging.threads.Address; import org.session.libsession.messaging.threads.recipients.Recipient; -import java.util.List; import java.util.Locale; import java.util.Set; diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupExporter.kt b/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupExporter.kt index 09fa90bad1..c7a818864d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupExporter.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupExporter.kt @@ -12,7 +12,7 @@ import net.sqlcipher.database.SQLiteDatabase import org.greenrobot.eventbus.EventBus import org.session.libsession.messaging.sending_receiving.attachments.AttachmentId -import org.session.libsession.messaging.contacts.avatars.AvatarHelper +import org.session.libsession.messaging.avatars.AvatarHelper import org.session.libsession.utilities.Conversions import org.thoughtcrime.securesms.backup.BackupProtos.* 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 f431e22057..51b395f36b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupImporter.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupImporter.kt @@ -14,7 +14,7 @@ import org.thoughtcrime.securesms.database.* import org.thoughtcrime.securesms.logging.Log import org.thoughtcrime.securesms.util.BackupUtil -import org.session.libsession.messaging.contacts.avatars.AvatarHelper +import org.session.libsession.messaging.avatars.AvatarHelper import org.session.libsession.messaging.sending_receiving.attachments.AttachmentId import org.session.libsession.messaging.threads.Address import org.session.libsession.utilities.Conversions 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 9ab33c7cee..aef998e90e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/AvatarImageView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/AvatarImageView.java @@ -6,7 +6,6 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Outline; import android.graphics.Paint; -import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.provider.ContactsContract; import androidx.annotation.NonNull; @@ -24,9 +23,9 @@ import org.thoughtcrime.securesms.loki.utilities.AvatarPlaceholderGenerator; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.mms.GlideRequests; -import org.session.libsession.messaging.contacts.avatars.ContactColors; -import org.session.libsession.messaging.contacts.avatars.ContactPhoto; -import org.session.libsession.messaging.contacts.avatars.ResourceContactPhoto; +import org.session.libsession.messaging.avatars.ContactColors; +import org.session.libsession.messaging.avatars.ContactPhoto; +import org.session.libsession.messaging.avatars.ResourceContactPhoto; import org.session.libsession.messaging.threads.Address; import org.session.libsession.messaging.threads.recipients.Recipient; import org.session.libsession.messaging.threads.recipients.RecipientExporter; 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 eeb88a02bf..c724d443bb 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.contacts.Contact; -import static org.session.libsession.messaging.sending_receiving.contacts.Contact.*; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; +import static org.session.libsession.messaging.sending_receiving.sharecontacts.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 a29e8f10b5..e1bb4b645d 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.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.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 2dda54c36b..b3587e1b9f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -196,7 +196,7 @@ import org.thoughtcrime.securesms.util.PushCharacterCalculator; import org.session.libsession.utilities.ServiceUtil; import org.session.libsession.utilities.Util; -import org.session.libsession.messaging.sending_receiving.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.session.libsession.messaging.sending_receiving.linkpreview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; import org.session.libsession.messaging.sending_receiving.attachments.StickerLocator; 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 fbfc0bf524..f08900a704 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.java @@ -59,7 +59,7 @@ 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.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.session.libsession.messaging.sending_receiving.linkpreview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; import org.session.libsession.messaging.threads.Address; 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 139e58464e..8675126e00 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/ThreadDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/ThreadDatabase.java @@ -40,7 +40,7 @@ import org.thoughtcrime.securesms.logging.Log; import org.thoughtcrime.securesms.mms.Slide; import org.thoughtcrime.securesms.mms.SlideDeck; -import org.session.libsession.messaging.sending_receiving.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.session.libsession.messaging.threads.GroupRecord; import org.session.libsession.messaging.threads.Address; import org.session.libsession.messaging.threads.recipients.Recipient; 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 6579da6a0d..dc86623cf1 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.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.session.libsession.messaging.sending_receiving.linkpreview.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 eaadf4cb3f..0ad53ab397 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.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.session.libsession.messaging.sending_receiving.linkpreview.LinkPreview; import org.session.libsession.messaging.threads.recipients.Recipient; diff --git a/app/src/main/java/org/thoughtcrime/securesms/glide/ContactPhotoFetcher.java b/app/src/main/java/org/thoughtcrime/securesms/glide/ContactPhotoFetcher.java index 2a891bab6b..aef3738683 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/glide/ContactPhotoFetcher.java +++ b/app/src/main/java/org/thoughtcrime/securesms/glide/ContactPhotoFetcher.java @@ -8,7 +8,7 @@ import com.bumptech.glide.Priority; import com.bumptech.glide.load.DataSource; import com.bumptech.glide.load.data.DataFetcher; -import org.session.libsession.messaging.contacts.avatars.ContactPhoto; +import org.session.libsession.messaging.avatars.ContactPhoto; import java.io.IOException; import java.io.InputStream; diff --git a/app/src/main/java/org/thoughtcrime/securesms/glide/ContactPhotoLoader.java b/app/src/main/java/org/thoughtcrime/securesms/glide/ContactPhotoLoader.java index c9f4c4f0ee..c25339652f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/glide/ContactPhotoLoader.java +++ b/app/src/main/java/org/thoughtcrime/securesms/glide/ContactPhotoLoader.java @@ -9,7 +9,7 @@ import com.bumptech.glide.load.model.ModelLoader; import com.bumptech.glide.load.model.ModelLoaderFactory; import com.bumptech.glide.load.model.MultiModelLoaderFactory; -import org.session.libsession.messaging.contacts.avatars.ContactPhoto; +import org.session.libsession.messaging.avatars.ContactPhoto; import java.io.InputStream; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java index 0515638e23..fd228f7ed9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java @@ -36,7 +36,7 @@ import org.session.libsession.messaging.sending_receiving.attachments.Attachment import org.session.libsession.messaging.sending_receiving.attachments.DatabaseAttachment; import org.session.libsession.messaging.sending_receiving.attachments.PointerAttachment; import org.session.libsession.messaging.sending_receiving.attachments.UriAttachment; -import org.session.libsession.messaging.sending_receiving.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; import org.session.libsession.messaging.sending_receiving.attachments.StickerLocator; import org.session.libsession.messaging.threads.Address; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java index 2263dd948e..b460155ad4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java @@ -9,7 +9,7 @@ import android.text.TextUtils; import com.annimon.stream.Stream; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; -import org.session.libsession.messaging.sending_receiving.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.session.libsession.utilities.MediaTypes; import org.session.libsignal.utilities.Base64; import org.session.libsession.utilities.TextSecurePreferences; 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 fbcfc93da7..037f23e49d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileAvatarJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileAvatarJob.java @@ -8,7 +8,7 @@ import android.text.TextUtils; import org.session.libsession.messaging.jobs.Data; import org.session.libsession.messaging.threads.Address; import org.session.libsession.messaging.threads.recipients.Recipient; -import org.session.libsession.messaging.contacts.avatars.AvatarHelper; +import org.session.libsession.messaging.avatars.AvatarHelper; import org.session.libsession.utilities.Util; import org.thoughtcrime.securesms.jobmanager.Job; 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 12815a017a..fc0c2b1235 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 @@ -40,7 +40,7 @@ import org.thoughtcrime.securesms.loki.utilities.push import org.thoughtcrime.securesms.mms.GlideApp import org.thoughtcrime.securesms.mms.GlideRequests import org.thoughtcrime.securesms.permissions.Permissions -import org.session.libsession.messaging.contacts.avatars.AvatarHelper +import org.session.libsession.messaging.avatars.AvatarHelper import org.thoughtcrime.securesms.profiles.ProfileMediaConstraints import org.thoughtcrime.securesms.util.BitmapDecodingException import org.thoughtcrime.securesms.util.BitmapUtil 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 7103c7cc2e..517cab6288 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 @@ -10,7 +10,7 @@ import androidx.annotation.DimenRes import com.bumptech.glide.load.engine.DiskCacheStrategy import kotlinx.android.synthetic.main.view_profile_picture.view.* import network.loki.messenger.R -import org.session.libsession.messaging.contacts.avatars.ProfileContactPhoto +import org.session.libsession.messaging.avatars.ProfileContactPhoto import org.session.libsession.messaging.threads.Address import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.loki.utilities.AvatarPlaceholderGenerator diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingMediaMessage.java b/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingMediaMessage.java index ab724a301c..1ade07f466 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingMediaMessage.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingMediaMessage.java @@ -2,7 +2,7 @@ package org.thoughtcrime.securesms.mms; 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.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.session.libsession.messaging.threads.Address; import org.session.libsession.messaging.sending_receiving.linkpreview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingGroupMediaMessage.java b/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingGroupMediaMessage.java index e4823d59a6..d34a14909c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingGroupMediaMessage.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingGroupMediaMessage.java @@ -5,7 +5,7 @@ import androidx.annotation.Nullable; import org.thoughtcrime.securesms.database.ThreadDatabase; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; -import org.session.libsession.messaging.sending_receiving.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.session.libsession.messaging.sending_receiving.linkpreview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; import org.session.libsession.messaging.threads.recipients.Recipient; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingMediaMessage.java b/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingMediaMessage.java index a5cc2608fd..903c44cbd7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingMediaMessage.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingMediaMessage.java @@ -7,7 +7,7 @@ import android.text.TextUtils; import org.thoughtcrime.securesms.database.documents.IdentityKeyMismatch; import org.thoughtcrime.securesms.database.documents.NetworkFailure; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; -import org.session.libsession.messaging.sending_receiving.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.session.libsession.messaging.sending_receiving.linkpreview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; import org.session.libsession.messaging.threads.recipients.Recipient; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingSecureMediaMessage.java b/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingSecureMediaMessage.java index 599e4878be..527f7bdd0e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingSecureMediaMessage.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/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.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.session.libsession.messaging.sending_receiving.linkpreview.LinkPreview; import org.session.libsession.messaging.sending_receiving.quotes.QuoteModel; import org.session.libsession.messaging.threads.recipients.Recipient; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/SignalGlideModule.java b/app/src/main/java/org/thoughtcrime/securesms/mms/SignalGlideModule.java index a62188c29d..a15f9ef06f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/SignalGlideModule.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/SignalGlideModule.java @@ -20,7 +20,7 @@ import com.bumptech.glide.load.resource.gif.GifDrawable; import com.bumptech.glide.load.resource.gif.StreamGifDecoder; import com.bumptech.glide.module.AppGlideModule; -import org.session.libsession.messaging.contacts.avatars.ContactPhoto; +import org.session.libsession.messaging.avatars.ContactPhoto; import org.thoughtcrime.securesms.crypto.AttachmentSecret; import org.thoughtcrime.securesms.crypto.AttachmentSecretProvider; import org.thoughtcrime.securesms.giph.model.ChunkedImageUrl; 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 1a5b915699..fe9fda3174 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 android.text.TextUtils; import org.session.libsession.messaging.sending_receiving.notifications.MessageNotifier; import org.thoughtcrime.securesms.ApplicationContext; -import org.session.libsession.messaging.sending_receiving.contacts.Contact; +import org.session.libsession.messaging.sending_receiving.sharecontacts.Contact; import org.thoughtcrime.securesms.contactshare.ContactUtil; import org.thoughtcrime.securesms.conversation.ConversationActivity; import org.thoughtcrime.securesms.database.DatabaseFactory; 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 112a79f10b..ccd48965d7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java @@ -25,9 +25,9 @@ import androidx.core.app.RemoteInput; import com.bumptech.glide.load.engine.DiskCacheStrategy; -import org.session.libsession.messaging.contacts.avatars.ContactColors; -import org.session.libsession.messaging.contacts.avatars.ContactPhoto; -import org.session.libsession.messaging.contacts.avatars.GeneratedContactPhoto; +import org.session.libsession.messaging.avatars.ContactColors; +import org.session.libsession.messaging.avatars.ContactPhoto; +import org.session.libsession.messaging.avatars.GeneratedContactPhoto; import org.thoughtcrime.securesms.logging.Log; import org.thoughtcrime.securesms.loki.utilities.AvatarPlaceholderGenerator; import org.thoughtcrime.securesms.loki.utilities.NotificationUtilities; diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/AvatarHelper.java b/libsession/src/main/java/org/session/libsession/messaging/avatars/AvatarHelper.java similarity index 96% rename from libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/AvatarHelper.java rename to libsession/src/main/java/org/session/libsession/messaging/avatars/AvatarHelper.java index 5c5051ed9a..b5286cd1ca 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/AvatarHelper.java +++ b/libsession/src/main/java/org/session/libsession/messaging/avatars/AvatarHelper.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.contacts.avatars; +package org.session.libsession.messaging.avatars; import android.content.Context; diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ContactColors.java b/libsession/src/main/java/org/session/libsession/messaging/avatars/ContactColors.java similarity index 93% rename from libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ContactColors.java rename to libsession/src/main/java/org/session/libsession/messaging/avatars/ContactColors.java index e157034f34..8c118cd978 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ContactColors.java +++ b/libsession/src/main/java/org/session/libsession/messaging/avatars/ContactColors.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.contacts.avatars; +package org.session.libsession.messaging.avatars; import androidx.annotation.NonNull; diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ContactColorsLegacy.java b/libsession/src/main/java/org/session/libsession/messaging/avatars/ContactColorsLegacy.java similarity index 93% rename from libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ContactColorsLegacy.java rename to libsession/src/main/java/org/session/libsession/messaging/avatars/ContactColorsLegacy.java index af7201f715..b605c24fcb 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ContactColorsLegacy.java +++ b/libsession/src/main/java/org/session/libsession/messaging/avatars/ContactColorsLegacy.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.contacts.avatars; +package org.session.libsession.messaging.avatars; import androidx.annotation.NonNull; diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ContactPhoto.java b/libsession/src/main/java/org/session/libsession/messaging/avatars/ContactPhoto.java similarity index 87% rename from libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ContactPhoto.java rename to libsession/src/main/java/org/session/libsession/messaging/avatars/ContactPhoto.java index 62b7e7ab95..93bc7957a6 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ContactPhoto.java +++ b/libsession/src/main/java/org/session/libsession/messaging/avatars/ContactPhoto.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.contacts.avatars; +package org.session.libsession.messaging.avatars; import android.content.Context; diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/FallbackContactPhoto.java b/libsession/src/main/java/org/session/libsession/messaging/avatars/FallbackContactPhoto.java similarity index 81% rename from libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/FallbackContactPhoto.java rename to libsession/src/main/java/org/session/libsession/messaging/avatars/FallbackContactPhoto.java index 1ce982f986..388266b6c8 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/FallbackContactPhoto.java +++ b/libsession/src/main/java/org/session/libsession/messaging/avatars/FallbackContactPhoto.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.contacts.avatars; +package org.session.libsession.messaging.avatars; import android.content.Context; import android.graphics.drawable.Drawable; diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/GeneratedContactPhoto.java b/libsession/src/main/java/org/session/libsession/messaging/avatars/GeneratedContactPhoto.java similarity index 98% rename from libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/GeneratedContactPhoto.java rename to libsession/src/main/java/org/session/libsession/messaging/avatars/GeneratedContactPhoto.java index 56a177d415..6066db0321 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/GeneratedContactPhoto.java +++ b/libsession/src/main/java/org/session/libsession/messaging/avatars/GeneratedContactPhoto.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.contacts.avatars; +package org.session.libsession.messaging.avatars; import android.content.Context; import android.graphics.Color; diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/GroupRecordContactPhoto.java b/libsession/src/main/java/org/session/libsession/messaging/avatars/GroupRecordContactPhoto.java similarity index 97% rename from libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/GroupRecordContactPhoto.java rename to libsession/src/main/java/org/session/libsession/messaging/avatars/GroupRecordContactPhoto.java index c9689b9f93..818b6df3c6 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/GroupRecordContactPhoto.java +++ b/libsession/src/main/java/org/session/libsession/messaging/avatars/GroupRecordContactPhoto.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.contacts.avatars; +package org.session.libsession.messaging.avatars; import android.content.Context; diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ProfileContactPhoto.java b/libsession/src/main/java/org/session/libsession/messaging/avatars/ProfileContactPhoto.java similarity index 96% rename from libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ProfileContactPhoto.java rename to libsession/src/main/java/org/session/libsession/messaging/avatars/ProfileContactPhoto.java index fd9d5b5e43..164f4dd747 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ProfileContactPhoto.java +++ b/libsession/src/main/java/org/session/libsession/messaging/avatars/ProfileContactPhoto.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.contacts.avatars; +package org.session.libsession.messaging.avatars; import android.content.Context; diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ResourceContactPhoto.java b/libsession/src/main/java/org/session/libsession/messaging/avatars/ResourceContactPhoto.java similarity index 94% rename from libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ResourceContactPhoto.java rename to libsession/src/main/java/org/session/libsession/messaging/avatars/ResourceContactPhoto.java index 5298a699a1..cc157424ff 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/ResourceContactPhoto.java +++ b/libsession/src/main/java/org/session/libsession/messaging/avatars/ResourceContactPhoto.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.contacts.avatars; +package org.session.libsession.messaging.avatars; import android.content.Context; import android.graphics.Color; @@ -8,7 +8,6 @@ import android.graphics.drawable.LayerDrawable; import android.widget.ImageView; import androidx.annotation.DrawableRes; -import androidx.appcompat.content.res.AppCompatResources; import com.amulyakhare.textdrawable.TextDrawable; import com.makeramen.roundedimageview.RoundedDrawable; diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/SystemContactPhoto.java b/libsession/src/main/java/org/session/libsession/messaging/avatars/SystemContactPhoto.java similarity index 96% rename from libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/SystemContactPhoto.java rename to libsession/src/main/java/org/session/libsession/messaging/avatars/SystemContactPhoto.java index 53b798f7ce..b9395b75d6 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/SystemContactPhoto.java +++ b/libsession/src/main/java/org/session/libsession/messaging/avatars/SystemContactPhoto.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.contacts.avatars; +package org.session.libsession.messaging.avatars; import android.content.Context; diff --git a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/TransparentContactPhoto.java b/libsession/src/main/java/org/session/libsession/messaging/avatars/TransparentContactPhoto.java similarity index 80% rename from libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/TransparentContactPhoto.java rename to libsession/src/main/java/org/session/libsession/messaging/avatars/TransparentContactPhoto.java index c6a685a4bd..619593b0c8 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/contacts/avatars/TransparentContactPhoto.java +++ b/libsession/src/main/java/org/session/libsession/messaging/avatars/TransparentContactPhoto.java @@ -1,14 +1,10 @@ -package org.session.libsession.messaging.contacts.avatars; +package org.session.libsession.messaging.avatars; import android.content.Context; import android.graphics.drawable.Drawable; -import androidx.core.content.ContextCompat; - import com.makeramen.roundedimageview.RoundedDrawable; -import org.session.libsession.R; - public class TransparentContactPhoto implements FallbackContactPhoto { public TransparentContactPhoto() {} diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/contacts/Contact.java b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Contact.java similarity index 99% rename from libsession/src/main/java/org/session/libsession/messaging/sending_receiving/contacts/Contact.java rename to libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Contact.java index 37307cd79b..0945c5a666 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/contacts/Contact.java +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Contact.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.sending_receiving.contacts; +package org.session.libsession.messaging.sending_receiving.sharecontacts; import android.net.Uri; import android.os.Parcel; diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/contacts/Selectable.java b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Selectable.java similarity index 56% rename from libsession/src/main/java/org/session/libsession/messaging/sending_receiving/contacts/Selectable.java rename to libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Selectable.java index e85455c20c..308491ebcf 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/contacts/Selectable.java +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/sharecontacts/Selectable.java @@ -1,4 +1,4 @@ -package org.session.libsession.messaging.sending_receiving.contacts; +package org.session.libsession.messaging.sending_receiving.sharecontacts; public interface Selectable { void setSelected(boolean selected); diff --git a/libsession/src/main/java/org/session/libsession/messaging/threads/recipients/Recipient.java b/libsession/src/main/java/org/session/libsession/messaging/threads/recipients/Recipient.java index ef3532ac18..1e639cdb84 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/threads/recipients/Recipient.java +++ b/libsession/src/main/java/org/session/libsession/messaging/threads/recipients/Recipient.java @@ -29,7 +29,7 @@ import com.annimon.stream.function.Consumer; import org.greenrobot.eventbus.EventBus; import org.session.libsession.messaging.MessagingConfiguration; -import org.session.libsession.messaging.contacts.avatars.TransparentContactPhoto; +import org.session.libsession.messaging.avatars.TransparentContactPhoto; import org.session.libsession.messaging.threads.Address; import org.session.libsession.messaging.threads.GroupRecord; import org.session.libsession.messaging.threads.recipients.RecipientProvider.RecipientDetails; @@ -39,11 +39,11 @@ import org.session.libsession.utilities.color.MaterialColor; import org.session.libsignal.libsignal.logging.Log; import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsignal.service.loki.protocol.shelved.multidevice.MultiDeviceProtocol; -import org.session.libsession.messaging.contacts.avatars.ContactColors; -import org.session.libsession.messaging.contacts.avatars.ContactPhoto; -import org.session.libsession.messaging.contacts.avatars.GroupRecordContactPhoto; -import org.session.libsession.messaging.contacts.avatars.ProfileContactPhoto; -import org.session.libsession.messaging.contacts.avatars.SystemContactPhoto; +import org.session.libsession.messaging.avatars.ContactColors; +import org.session.libsession.messaging.avatars.ContactPhoto; +import org.session.libsession.messaging.avatars.GroupRecordContactPhoto; +import org.session.libsession.messaging.avatars.ProfileContactPhoto; +import org.session.libsession.messaging.avatars.SystemContactPhoto; import org.session.libsession.utilities.ProfilePictureModifiedEvent; import org.session.libsession.utilities.FutureTaskListener; import org.session.libsession.utilities.ListenableFutureTask; @@ -56,8 +56,6 @@ import java.util.Set; import java.util.WeakHashMap; import java.util.concurrent.ExecutionException; -import org.session.libsession.R; - public class Recipient implements RecipientModifiedListener { private static final String TAG = Recipient.class.getSimpleName();