From 307da3b2bedf2fca575ddbd409c2012fa6170d36 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Wed, 3 Feb 2021 12:22:40 +1100 Subject: [PATCH] clean logging --- .../securesms/ApplicationContext.java | 8 +- .../securesms/DatabaseUpgradeActivity.java | 2 +- .../securesms/LogSubmitActivity.java | 2 +- .../securesms/MediaDocumentsAdapter.java | 2 +- .../securesms/MediaPreviewActivity.java | 2 +- .../securesms/MessageDetailsActivity.java | 2 +- .../securesms/PassphrasePromptActivity.java | 2 +- .../PassphraseRequiredActionBarActivity.java | 2 +- .../thoughtcrime/securesms/ShareActivity.java | 2 +- .../attachments/AttachmentServer.java | 2 +- .../securesms/audio/AudioCodec.java | 2 +- .../securesms/audio/AudioRecorder.java | 2 +- .../securesms/audio/AudioSlidePlayer.java | 2 +- .../securesms/avatar/AvatarSelection.java | 6 +- .../securesms/backup/BackupDialog.java | 2 +- .../securesms/backup/BackupPassphrase.java | 2 +- .../securesms/backup/BackupPreferences.kt | 2 +- .../securesms/backup/FullBackupExporter.kt | 2 +- .../securesms/backup/FullBackupImporter.kt | 2 +- .../securesms/components/ComposeText.java | 2 +- .../components/CustomDefaultPreference.java | 2 +- .../securesms/components/InputPanel.java | 2 +- .../components/KeyboardAwareLinearLayout.java | 2 +- .../securesms/components/ThumbnailView.java | 2 +- .../components/ZoomingImageView.java | 2 +- .../components/camera/CameraUtils.java | 2 +- .../components/camera/CameraView.java | 2 +- .../components/emoji/EmojiProvider.java | 2 +- .../components/emoji/MediaKeyboard.java | 2 +- .../emoji/RecentEmojiPageModel.java | 2 +- .../emoji/parsing/EmojiPageBitmap.java | 2 +- .../components/location/SignalPlace.java | 2 +- .../subsampling/AttachmentRegionDecoder.java | 2 +- .../conversation/ConversationActivity.java | 2 +- .../conversation/ConversationAdapter.java | 2 +- .../conversation/ConversationFragment.java | 2 +- .../conversation/ConversationItem.java | 2 +- .../ConversationPopupActivity.java | 2 +- .../ClassicDecryptingPartInputStream.java | 2 +- .../securesms/crypto/MasterCipher.java | 2 +- .../securesms/crypto/MasterSecretUtil.java | 2 +- .../securesms/crypto/PublicKey.java | 2 +- .../crypto/UnidentifiedAccessUtil.java | 2 +- .../storage/TextSecureSessionStore.java | 2 +- .../securesms/database/ApnDatabase.java | 2 +- .../database/AttachmentDatabase.java | 4 +- .../securesms/database/EarlyReceiptCache.java | 2 +- .../securesms/database/MessagingDatabase.java | 2 +- .../securesms/database/MmsDatabase.java | 2 +- .../database/OneTimePreKeyDatabase.java | 2 +- .../securesms/database/PushDatabase.java | 2 +- .../securesms/database/RecipientDatabase.java | 2 +- .../securesms/database/SessionDatabase.java | 2 +- .../database/SignedPreKeyDatabase.java | 2 +- .../securesms/database/SmsDatabase.java | 2 +- .../securesms/database/SmsMigrator.java | 2 +- .../securesms/database/StickerDatabase.java | 2 +- .../securesms/database/ThreadDatabase.java | 2 +- .../documents/IdentityKeyMismatch.java | 2 +- .../database/helpers/SQLCipherOpenHelper.java | 2 +- .../SignalCommunicationModule.java | 2 +- .../securesms/giph/net/GiphyLoader.java | 2 +- .../securesms/giph/ui/GiphyActivity.java | 2 +- .../securesms/giph/ui/GiphyAdapter.java | 2 +- .../glide/ChunkedImageUrlFetcher.java | 2 +- .../cache/EncryptedBitmapCacheDecoder.java | 2 +- .../cache/EncryptedBitmapResourceEncoder.java | 2 +- .../glide/cache/EncryptedCacheEncoder.java | 2 +- .../glide/cache/EncryptedGifCacheDecoder.java | 2 +- .../EncryptedGifDrawableResourceEncoder.java | 2 +- .../groups/GroupMessageProcessor.java | 2 +- .../jobmanager/AlarmManagerScheduler.java | 2 +- .../securesms/jobmanager/InAppScheduler.java | 2 +- .../securesms/jobmanager/Job.java | 2 +- .../securesms/jobmanager/JobController.java | 2 +- .../securesms/jobmanager/JobManager.java | 2 +- .../securesms/jobmanager/JobRunner.java | 2 +- .../jobmanager/JobSchedulerScheduler.java | 2 +- .../jobmanager/impl/JsonDataSerializer.java | 2 +- .../jobmanager/migration/DataMigrator.java | 2 +- .../securesms/jobs/AttachmentDownloadJob.java | 2 +- .../securesms/jobs/AttachmentUploadJob.java | 2 +- .../securesms/jobs/AvatarDownloadJob.java | 2 +- .../thoughtcrime/securesms/jobs/BaseJob.java | 2 +- .../securesms/jobs/LocalBackupJob.java | 4 +- .../securesms/jobs/MmsDownloadJob.java | 2 +- .../securesms/jobs/MmsReceiveJob.java | 2 +- .../securesms/jobs/MmsSendJob.java | 2 +- .../securesms/jobs/PushDecryptJob.java | 2 +- .../securesms/jobs/PushGroupSendJob.java | 3 +- .../securesms/jobs/PushGroupUpdateJob.java | 2 +- .../securesms/jobs/PushMediaSendJob.java | 2 +- .../jobs/PushNotificationReceiveJob.java | 2 +- .../securesms/jobs/PushReceivedJob.java | 3 +- .../securesms/jobs/PushSendJob.java | 2 +- .../securesms/jobs/PushTextSendJob.java | 3 +- .../jobs/RetrieveProfileAvatarJob.java | 2 +- .../jobs/SendDeliveryReceiptJob.java | 2 +- .../thoughtcrime/securesms/jobs/SendJob.java | 2 +- .../securesms/jobs/SendReadReceiptJob.java | 2 +- .../securesms/jobs/SmsReceiveJob.java | 2 +- .../securesms/jobs/SmsSentJob.java | 2 +- .../securesms/jobs/StickerDownloadJob.java | 2 +- .../jobs/StickerPackDownloadJob.java | 2 +- .../securesms/jobs/TrimThreadJob.java | 2 +- .../securesms/jobs/TypingSendJob.java | 2 +- .../securesms/jobs/UpdateApkJob.java | 2 +- .../linkpreview/LinkPreviewRepository.java | 2 +- .../securesms/logging/AndroidLogger.java | 2 + .../logging/CustomSignalProtocolLogger.java | 29 ------ .../securesms/logging/GrowingBuffer.java | 13 --- .../securesms/logging/LogFile.java | 12 +++ .../securesms/logging/PersistentLogger.java | 3 +- .../logging/UncaughtExceptionLogger.java | 2 + .../logsubmit/SubmitLogFragment.java | 2 +- .../loki/activities/BackupRestoreActivity.kt | 2 +- .../loki/activities/JoinPublicChatActivity.kt | 2 +- .../loki/api/BackgroundPollWorker.kt | 2 +- .../securesms/loki/api/ClosedGroupPoller.kt | 2 +- .../loki/api/LokiPushNotificationManager.kt | 2 +- .../api/PrepareAttachmentAudioExtrasJob.kt | 2 +- .../loki/api/PublicChatInfoUpdateWorker.kt | 2 +- .../securesms/loki/api/PublicChatPoller.kt | 3 +- .../loki/api/PushNotificationService.kt | 4 +- .../loki/api/ResetThreadSessionJob.kt | 2 +- .../loki/database/LokiAPIDatabase.kt | 2 +- .../loki/database/LokiUserDatabase.kt | 2 +- .../fragments/ContactSelectionListFragment.kt | 2 +- .../ClosedGroupUpdateMessageSendJob.kt | 2 +- .../ClosedGroupUpdateMessageSendJobV2.kt | 2 +- .../loki/protocol/ClosedGroupsProtocol.kt | 2 +- .../loki/protocol/NullMessageSendJob.kt | 2 +- .../protocol/SessionManagementProtocol.kt | 2 +- .../loki/utilities/GroupDescription.kt | 2 +- .../securesms/loki/utilities/IP2Country.kt | 2 +- .../securesms/loki/views/MessageAudioView.kt | 3 +- .../longmessage/LongMessageRepository.java | 2 +- .../mediasend/Camera1Controller.java | 2 +- .../securesms/mediasend/Camera1Fragment.java | 2 +- .../mediasend/MediaSendActivity.java | 2 +- .../mediasend/MediaSendFragment.java | 2 +- .../mediasend/MediaSendVideoFragment.java | 2 +- .../mediasend/MediaSendViewModel.java | 2 +- .../securesms/mms/AttachmentManager.java | 6 +- .../mms/AttachmentStreamLocalUriFetcher.java | 2 +- .../securesms/mms/CompatMmsConnection.java | 2 +- .../mms/DecryptableStreamLocalUriFetcher.java | 2 +- .../securesms/mms/DocumentSlide.java | 2 +- .../mms/IncomingLegacyMmsConnection.java | 2 +- .../mms/IncomingLollipopMmsConnection.java | 2 +- .../securesms/mms/LegacyMmsConnection.java | 2 +- .../securesms/mms/LollipopMmsConnection.java | 2 +- .../securesms/mms/MediaConstraints.java | 2 +- .../thoughtcrime/securesms/mms/MmsRadio.java | 2 +- .../mms/OutgoingLegacyMmsConnection.java | 2 +- .../mms/OutgoingLollipopMmsConnection.java | 2 +- .../securesms/mms/PartParser.java | 2 +- .../thoughtcrime/securesms/mms/QuoteId.java | 2 +- .../securesms/net/ChunkedDataFetcher.java | 2 +- .../net/ContentProxySafetyInterceptor.java | 2 +- .../securesms/net/ContentProxySelector.java | 2 +- .../AndroidAutoHeardReceiver.java | 2 +- .../AndroidAutoReplyReceiver.java | 2 +- .../notifications/DefaultMessageNotifier.java | 2 +- .../notifications/MarkReadReceiver.java | 2 +- .../notifications/NotificationChannels.java | 2 +- .../notifications/NotificationState.java | 2 +- .../SingleRecipientNotificationBuilder.java | 2 +- .../preferences/ChatsPreferenceFragment.java | 2 +- .../securesms/providers/BlobProvider.java | 2 +- .../DeprecatedPersistentBlobProvider.java | 2 +- .../securesms/providers/MmsBodyProvider.java | 2 +- .../securesms/providers/PartProvider.java | 2 +- .../org/thoughtcrime/securesms/qr/QrCode.java | 2 +- .../securesms/qr/ScanningThread.java | 2 +- .../scribbles/ImageEditorFragment.java | 2 +- .../securesms/scribbles/StickerLoader.java | 2 +- .../securesms/search/SearchRepository.java | 2 +- .../securesms/service/DirectShareService.java | 2 +- .../service/ExpiringMessageManager.java | 2 +- .../service/GenericForegroundService.java | 2 +- .../service/IncomingMessageObserver.java | 2 +- .../securesms/service/KeyCachingService.java | 2 +- .../securesms/service/MmsListener.java | 2 +- .../PersistentAlarmManagerListener.java | 2 +- .../PersistentConnectionBootListener.java | 2 +- .../service/QuickResponseService.java | 2 +- .../service/SmsDeliveryListener.java | 2 +- .../securesms/service/SmsListener.java | 2 +- .../service/UpdateApkReadyListener.java | 2 +- .../service/UpdateApkRefreshListener.java | 2 +- .../securesms/sms/MessageSender.java | 7 +- .../sskenvironment/ReadReceiptManager.kt | 2 +- .../TypingStatusRepository.java | 2 +- .../stickers/StickerKeyboardPageFragment.java | 2 +- .../stickers/StickerPackPreviewActivity.java | 2 +- .../StickerPackPreviewRepository.java | 2 +- .../stickers/StickerRemoteUriFetcher.java | 2 +- .../securesms/util/AttachmentUtil.java | 2 +- .../thoughtcrime/securesms/util/BackupUtil.kt | 2 +- .../securesms/util/BackupUtilOld.java | 2 +- .../securesms/util/BitmapUtil.java | 2 +- .../securesms/util/DateUtils.java | 2 +- .../securesms/util/ExternalStorageUtil.java | 66 ------------- .../securesms/util/MediaUtil.java | 2 +- .../securesms/util/RealtimeSleepTimer.java | 4 +- .../thoughtcrime/securesms/util/ResUtil.java | 2 +- .../securesms/util/SaveAttachmentTask.kt | 2 +- .../securesms/util/SingleLiveEvent.java | 2 +- .../util/SmsCharacterCalculator.java | 2 +- .../securesms/util/Stopwatch.java | 2 +- .../securesms/util/TelephonyUtil.java | 2 +- .../securesms/util/WakeLockUtil.java | 2 +- .../dualsim/SubscriptionManagerCompat.java | 2 +- .../securesms/video/VideoPlayer.java | 2 +- .../thoughtcrime/securesms/BaseUnitTest.java | 2 +- .../securesms/logging/LogTest.java | 1 + .../messaging/fileserver/FileServerAPI.kt | 2 +- .../messaging/jobs/AttachmentUploadJob.kt | 2 +- .../libsession/messaging/jobs/JobQueue.kt | 2 +- .../messaging/jobs/MessageReceiveJob.kt | 2 +- .../messaging/jobs/MessageSendJob.kt | 2 +- .../messaging/jobs/NotifyPNServerJob.kt | 2 +- .../control/ClosedGroupControlMessage.kt | 2 +- .../messages/control/ClosedGroupUpdate.kt | 2 +- .../messages/control/ExpirationTimerUpdate.kt | 2 +- .../messaging/messages/control/ReadReceipt.kt | 2 +- .../messages/control/TypingIndicator.kt | 2 +- .../messages/control/unused/NullMessage.kt | 2 +- .../messages/control/unused/SessionRequest.kt | 2 +- .../messaging/messages/visible/LinkPreview.kt | 2 +- .../messaging/messages/visible/Profile.kt | 3 +- .../messaging/messages/visible/Quote.kt | 3 +- .../messages/visible/VisibleMessage.kt | 2 +- .../messaging/opengroups/OpenGroupAPI.kt | 2 +- .../messaging/opengroups/OpenGroupMessage.kt | 2 +- .../MessageReceiverHandler.kt | 2 +- .../sending_receiving/MessageSender.kt | 2 +- .../notifications/PushNotificationAPI.kt | 2 +- .../pollers/ClosedGroupPoller.kt | 2 +- .../pollers/OpenGroupPoller.kt | 2 +- .../sending_receiving/pollers/Poller.kt | 2 +- .../threads/recipients/Recipient.java | 2 +- .../messaging/utilities/DotNetAPI.kt | 2 +- .../messaging/utilities/MessageWrapper.kt | 2 +- .../utilities/UnidentifiedAccessUtil.kt | 2 +- .../libsession/snode/OnionRequestAPI.kt | 2 +- .../org/session/libsession/snode/SnodeAPI.kt | 2 +- .../utilities/TextSecurePreferences.kt | 2 +- .../libsession/utilities/ThemeUtil.java | 2 +- .../org/session/libsession/utilities/Util.kt | 2 +- .../DynamicLanguageActivityHelper.java | 2 +- libsignal/build.gradle | 1 + .../libsignal/libsignal/SessionBuilder.java | 2 +- .../libsignal/libsignal/logging/Log.java | 94 ------------------- .../logging/SignalProtocolLogger.java | 18 ---- .../logging/SignalProtocolLoggerProvider.java | 19 ---- .../loki/ClosedGroupCiphertextMessage.kt | 2 +- .../libsignal/state/SessionState.java | 2 +- .../api/SignalServiceAccountManager.java | 2 +- .../api/SignalServiceMessageSender.java | 2 +- .../api/messages/SignalServiceEnvelope.java | 2 +- .../DeviceContactsInputStream.java | 2 +- .../api/util/PhoneNumberFormatter.java | 3 +- .../internal/push/PushServiceSocket.java | 2 +- .../internal/push/PushTransportDetails.java | 2 +- .../websocket/WebSocketConnection.java | 2 +- .../libsignal/service/loki/api/DotNetAPI.kt | 2 +- .../libsignal/service/loki/api/LokiMessage.kt | 2 +- .../service/loki/api/MessageWrapper.kt | 2 +- .../libsignal/service/loki/api/Poller.kt | 2 +- .../service/loki/api/PushNotificationAPI.kt | 2 +- .../libsignal/service/loki/api/SnodeAPI.kt | 2 +- .../libsignal/service/loki/api/SwarmAPI.kt | 2 +- .../service/loki/api/crypto/ProofOfWork.kt | 2 +- .../loki/api/fileserver/FileServerAPI.kt | 2 +- .../loki/api/onionrequests/OnionRequestAPI.kt | 2 +- .../loki/api/opengroups/PublicChatAPI.kt | 2 +- .../loki/api/opengroups/PublicChatMessage.kt | 2 +- .../service/loki/api/utilities/HTTP.kt | 2 +- .../closedgroups/ClosedGroupSenderKey.kt | 2 +- .../SharedSenderKeysImplementation.kt | 2 +- .../SessionManagementProtocol.kt | 6 +- .../shelved/multidevice/DeviceLink.kt | 2 +- .../loki/utilities/DownloadUtilities.kt | 2 +- .../session/libsignal/utilities/JsonUtil.java | 3 +- .../libsignal/utilities/PromiseUtilities.kt | 2 +- .../externalstorage/ExternalStorageUtil.kt | 55 +++++++++++ .../NoExternalStorageException.java | 2 +- .../libsignal/utilities}/logging/Log.java | 2 +- 290 files changed, 360 insertions(+), 549 deletions(-) delete mode 100644 app/src/main/java/org/thoughtcrime/securesms/logging/CustomSignalProtocolLogger.java delete mode 100644 app/src/main/java/org/thoughtcrime/securesms/logging/GrowingBuffer.java delete mode 100644 app/src/main/java/org/thoughtcrime/securesms/util/ExternalStorageUtil.java delete mode 100644 libsignal/src/main/java/org/session/libsignal/libsignal/logging/Log.java delete mode 100644 libsignal/src/main/java/org/session/libsignal/libsignal/logging/SignalProtocolLogger.java delete mode 100644 libsignal/src/main/java/org/session/libsignal/libsignal/logging/SignalProtocolLoggerProvider.java create mode 100644 libsignal/src/main/java/org/session/libsignal/utilities/externalstorage/ExternalStorageUtil.kt rename {app/src/main/java/org/thoughtcrime/securesms/database => libsignal/src/main/java/org/session/libsignal/utilities/externalstorage}/NoExternalStorageException.java (95%) rename {app/src/main/java/org/thoughtcrime/securesms => libsignal/src/main/java/org/session/libsignal/utilities}/logging/Log.java (98%) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java b/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java index f2dcb248a5..5cee8acc10 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java +++ b/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java @@ -64,8 +64,7 @@ import org.thoughtcrime.securesms.jobs.JobManagerFactories; import org.thoughtcrime.securesms.jobs.PushContentReceiveJob; import org.thoughtcrime.securesms.jobs.PushNotificationReceiveJob; import org.thoughtcrime.securesms.logging.AndroidLogger; -import org.thoughtcrime.securesms.logging.CustomSignalProtocolLogger; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.logging.PersistentLogger; import org.thoughtcrime.securesms.logging.UncaughtExceptionLogger; import org.thoughtcrime.securesms.loki.activities.HomeActivity; @@ -97,7 +96,6 @@ import org.webrtc.PeerConnectionFactory; import org.webrtc.PeerConnectionFactory.InitializationOptions; import org.webrtc.voiceengine.WebRtcAudioManager; import org.webrtc.voiceengine.WebRtcAudioUtils; -import org.session.libsignal.libsignal.logging.SignalProtocolLoggerProvider; import org.session.libsignal.service.api.messages.SignalServiceEnvelope; import org.session.libsignal.service.api.util.StreamDetails; import org.session.libsignal.service.internal.push.SignalServiceProtos; @@ -349,9 +347,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc private void initializeLogging() { persistentLogger = new PersistentLogger(this); - org.thoughtcrime.securesms.logging.Log.initialize(new AndroidLogger(), persistentLogger); - - SignalProtocolLoggerProvider.setProvider(new CustomSignalProtocolLogger()); + Log.initialize(new AndroidLogger(), persistentLogger); } private void initializeCrashHandling() { diff --git a/app/src/main/java/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java b/app/src/main/java/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java index 57b4bd1f48..346c2f1e0b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java @@ -35,7 +35,7 @@ import org.thoughtcrime.securesms.database.PushDatabase; import org.thoughtcrime.securesms.database.model.MessageRecord; import org.thoughtcrime.securesms.jobs.AttachmentDownloadJob; import org.thoughtcrime.securesms.jobs.PushDecryptJob; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.util.Util; import org.thoughtcrime.securesms.util.VersionTracker; diff --git a/app/src/main/java/org/thoughtcrime/securesms/LogSubmitActivity.java b/app/src/main/java/org/thoughtcrime/securesms/LogSubmitActivity.java index a6391f59ed..e432df4381 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/LogSubmitActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/LogSubmitActivity.java @@ -7,7 +7,7 @@ import androidx.fragment.app.FragmentTransaction; import android.view.MenuItem; import android.widget.Toast; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.logsubmit.SubmitLogFragment; import org.thoughtcrime.securesms.util.DynamicTheme; diff --git a/app/src/main/java/org/thoughtcrime/securesms/MediaDocumentsAdapter.java b/app/src/main/java/org/thoughtcrime/securesms/MediaDocumentsAdapter.java index eaf4e6b754..6e69e78d08 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/MediaDocumentsAdapter.java +++ b/app/src/main/java/org/thoughtcrime/securesms/MediaDocumentsAdapter.java @@ -18,7 +18,7 @@ import org.thoughtcrime.securesms.MediaDocumentsAdapter.ViewHolder; import org.thoughtcrime.securesms.components.DocumentView; import org.thoughtcrime.securesms.database.CursorRecyclerViewAdapter; import org.thoughtcrime.securesms.database.MediaDatabase; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.DocumentSlide; import org.thoughtcrime.securesms.mms.PartAuthority; import org.thoughtcrime.securesms.mms.Slide; diff --git a/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java b/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java index 9860224423..6399dbc022 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/MediaPreviewActivity.java @@ -62,7 +62,7 @@ import org.session.libsession.utilities.Util; import org.thoughtcrime.securesms.components.MediaView; import org.thoughtcrime.securesms.database.MediaDatabase.MediaRecord; import org.thoughtcrime.securesms.database.loaders.PagingMediaLoader; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mediapreview.MediaPreviewViewModel; import org.thoughtcrime.securesms.mediapreview.MediaRailAdapter; import org.thoughtcrime.securesms.mms.GlideApp; diff --git a/app/src/main/java/org/thoughtcrime/securesms/MessageDetailsActivity.java b/app/src/main/java/org/thoughtcrime/securesms/MessageDetailsActivity.java index cd20d11ff5..988890ae05 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/MessageDetailsActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/MessageDetailsActivity.java @@ -49,7 +49,7 @@ import org.thoughtcrime.securesms.database.MmsSmsDatabase; import org.thoughtcrime.securesms.database.SmsDatabase; import org.thoughtcrime.securesms.database.loaders.MessageDetailsLoader; import org.thoughtcrime.securesms.database.model.MessageRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.database.LokiMessageDatabase; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.mms.GlideRequests; diff --git a/app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java b/app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java index f7e6386a4b..b058c99c91 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java @@ -41,7 +41,7 @@ import androidx.core.os.CancellationSignal; import org.thoughtcrime.securesms.animation.AnimationCompleteListener; import org.thoughtcrime.securesms.components.AnimatingToggle; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.service.KeyCachingService; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/PassphraseRequiredActionBarActivity.java b/app/src/main/java/org/thoughtcrime/securesms/PassphraseRequiredActionBarActivity.java index 2ac70f2667..4cc0210a1d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/PassphraseRequiredActionBarActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/PassphraseRequiredActionBarActivity.java @@ -11,7 +11,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.activities.HomeActivity; import org.thoughtcrime.securesms.loki.activities.LandingActivity; import org.thoughtcrime.securesms.service.KeyCachingService; diff --git a/app/src/main/java/org/thoughtcrime/securesms/ShareActivity.java b/app/src/main/java/org/thoughtcrime/securesms/ShareActivity.java index ca51382d82..0eaf6f44fd 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ShareActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/ShareActivity.java @@ -40,7 +40,7 @@ import org.thoughtcrime.securesms.conversation.ConversationActivity; import org.session.libsession.messaging.threads.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.ThreadDatabase; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.fragments.ContactSelectionListFragment; import org.thoughtcrime.securesms.loki.fragments.ContactSelectionListLoader.DisplayMode; import org.thoughtcrime.securesms.mediasend.Media; diff --git a/app/src/main/java/org/thoughtcrime/securesms/attachments/AttachmentServer.java b/app/src/main/java/org/thoughtcrime/securesms/attachments/AttachmentServer.java index 68c69ed401..96e615824d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/attachments/AttachmentServer.java +++ b/app/src/main/java/org/thoughtcrime/securesms/attachments/AttachmentServer.java @@ -5,7 +5,7 @@ import android.content.Context; import android.net.Uri; import androidx.annotation.NonNull; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.PartAuthority; import org.session.libsignal.utilities.Hex; diff --git a/app/src/main/java/org/thoughtcrime/securesms/audio/AudioCodec.java b/app/src/main/java/org/thoughtcrime/securesms/audio/AudioCodec.java index fc9e36d702..257218f147 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/audio/AudioCodec.java +++ b/app/src/main/java/org/thoughtcrime/securesms/audio/AudioCodec.java @@ -8,7 +8,7 @@ import android.media.MediaCodecInfo; import android.media.MediaFormat; import android.media.MediaRecorder; import android.os.Build; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/audio/AudioRecorder.java b/app/src/main/java/org/thoughtcrime/securesms/audio/AudioRecorder.java index c425f39d8b..a2c7080518 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/audio/AudioRecorder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/audio/AudioRecorder.java @@ -8,7 +8,7 @@ import android.os.ParcelFileDescriptor; import androidx.annotation.NonNull; import org.session.libsession.utilities.MediaTypes; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import android.util.Pair; import org.thoughtcrime.securesms.providers.BlobProvider; diff --git a/app/src/main/java/org/thoughtcrime/securesms/audio/AudioSlidePlayer.java b/app/src/main/java/org/thoughtcrime/securesms/audio/AudioSlidePlayer.java index 1ab9db4254..1af511583c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/audio/AudioSlidePlayer.java +++ b/app/src/main/java/org/thoughtcrime/securesms/audio/AudioSlidePlayer.java @@ -34,7 +34,7 @@ import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory; import org.jetbrains.annotations.NotNull; import org.thoughtcrime.securesms.attachments.AttachmentServer; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.AudioSlide; import org.session.libsession.utilities.ServiceUtil; diff --git a/app/src/main/java/org/thoughtcrime/securesms/avatar/AvatarSelection.java b/app/src/main/java/org/thoughtcrime/securesms/avatar/AvatarSelection.java index 4a4f65883e..ea016ff3c4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/avatar/AvatarSelection.java +++ b/app/src/main/java/org/thoughtcrime/securesms/avatar/AvatarSelection.java @@ -16,9 +16,9 @@ import androidx.core.content.ContextCompat; import com.theartofdev.edmodo.cropper.CropImage; import com.theartofdev.edmodo.cropper.CropImageView; -import org.thoughtcrime.securesms.database.NoExternalStorageException; -import org.thoughtcrime.securesms.logging.Log; -import org.thoughtcrime.securesms.util.ExternalStorageUtil; +import org.session.libsignal.utilities.externalstorage.NoExternalStorageException; +import org.session.libsignal.utilities.logging.Log; +import org.session.libsignal.utilities.externalstorage.ExternalStorageUtil; import org.thoughtcrime.securesms.util.FileProviderUtil; import org.thoughtcrime.securesms.util.IntentUtils; diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/BackupDialog.java b/app/src/main/java/org/thoughtcrime/securesms/backup/BackupDialog.java index da526daae0..41cd8afdf7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/BackupDialog.java +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/BackupDialog.java @@ -12,7 +12,7 @@ import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import org.thoughtcrime.securesms.components.SwitchPreferenceCompat; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.util.BackupDirSelector; import org.thoughtcrime.securesms.util.BackupUtil; diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/BackupPassphrase.java b/app/src/main/java/org/thoughtcrime/securesms/backup/BackupPassphrase.java index 7168ed6907..e834454ad1 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/BackupPassphrase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/BackupPassphrase.java @@ -6,7 +6,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import org.thoughtcrime.securesms.crypto.KeyStoreHelper; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.TextSecurePreferences; /** diff --git a/app/src/main/java/org/thoughtcrime/securesms/backup/BackupPreferences.kt b/app/src/main/java/org/thoughtcrime/securesms/backup/BackupPreferences.kt index 2d8272debd..4ca3ed3f6f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/BackupPreferences.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/BackupPreferences.kt @@ -6,7 +6,7 @@ import android.os.Build import android.preference.PreferenceManager import android.preference.PreferenceManager.getDefaultSharedPreferencesName import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.backup.FullBackupImporter.PREF_PREFIX_TYPE_BOOLEAN import org.thoughtcrime.securesms.backup.FullBackupImporter.PREF_PREFIX_TYPE_INT import java.util.* 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 c7a818864d..3148fd1420 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupExporter.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupExporter.kt @@ -21,7 +21,7 @@ import org.thoughtcrime.securesms.crypto.ClassicDecryptingPartInputStream import org.thoughtcrime.securesms.crypto.IdentityKeyUtil import org.thoughtcrime.securesms.crypto.ModernDecryptingPartInputStream import org.thoughtcrime.securesms.database.* -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.loki.database.LokiAPIDatabase import org.thoughtcrime.securesms.loki.database.LokiBackupFilesDatabase import org.thoughtcrime.securesms.util.BackupUtil 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 51b395f36b..de583a6b3c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupImporter.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/backup/FullBackupImporter.kt @@ -11,7 +11,7 @@ import org.thoughtcrime.securesms.backup.BackupProtos.* import org.thoughtcrime.securesms.crypto.AttachmentSecret import org.thoughtcrime.securesms.crypto.ModernEncryptingPartOutputStream import org.thoughtcrime.securesms.database.* -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.util.BackupUtil import org.session.libsession.messaging.avatars.AvatarHelper diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/ComposeText.java b/app/src/main/java/org/thoughtcrime/securesms/components/ComposeText.java index bf5135cea1..68804683a1 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/ComposeText.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/ComposeText.java @@ -24,7 +24,7 @@ import androidx.core.view.inputmethod.InputConnectionCompat; import androidx.core.view.inputmethod.InputContentInfoCompat; import org.thoughtcrime.securesms.components.emoji.EmojiEditText; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.TextSecurePreferences; public class ComposeText extends EmojiEditText { diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/CustomDefaultPreference.java b/app/src/main/java/org/thoughtcrime/securesms/components/CustomDefaultPreference.java index bc9c1dd746..44e3ba60b8 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/CustomDefaultPreference.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/CustomDefaultPreference.java @@ -12,7 +12,7 @@ import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; import android.util.AttributeSet; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import android.view.View; import android.widget.AdapterView; import android.widget.Button; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/InputPanel.java b/app/src/main/java/org/thoughtcrime/securesms/components/InputPanel.java index b625c61349..950d6495d3 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/InputPanel.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/InputPanel.java @@ -31,7 +31,7 @@ import org.thoughtcrime.securesms.components.emoji.EmojiToggle; import org.thoughtcrime.securesms.components.emoji.MediaKeyboard; import org.thoughtcrime.securesms.conversation.ConversationStickerSuggestionAdapter; import org.thoughtcrime.securesms.database.model.StickerRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.utilities.MentionUtilities; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.mms.GlideRequests; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java b/app/src/main/java/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java index 5f231a2ce6..907aaf4a3a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/KeyboardAwareLinearLayout.java @@ -24,7 +24,7 @@ import android.os.Build.VERSION_CODES; import android.preference.PreferenceManager; import androidx.appcompat.widget.LinearLayoutCompat; import android.util.AttributeSet; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import android.view.Surface; import android.view.View; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/ThumbnailView.java b/app/src/main/java/org/thoughtcrime/securesms/components/ThumbnailView.java index 9dc35bfcc2..2340df43c3 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/ThumbnailView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/ThumbnailView.java @@ -7,7 +7,7 @@ import androidx.annotation.NonNull; import androidx.annotation.UiThread; import android.util.AttributeSet; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/ZoomingImageView.java b/app/src/main/java/org/thoughtcrime/securesms/components/ZoomingImageView.java index 9703ca3d16..507a99e05a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/ZoomingImageView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/ZoomingImageView.java @@ -9,7 +9,7 @@ import androidx.annotation.Nullable; import android.util.AttributeSet; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import android.util.Pair; import android.view.View; import android.widget.FrameLayout; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/camera/CameraUtils.java b/app/src/main/java/org/thoughtcrime/securesms/components/camera/CameraUtils.java index 8feaa8fb13..b929871d2b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/camera/CameraUtils.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/camera/CameraUtils.java @@ -8,7 +8,7 @@ import android.hardware.Camera.Size; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.util.DisplayMetrics; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import android.view.Surface; import java.util.Collections; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/camera/CameraView.java b/app/src/main/java/org/thoughtcrime/securesms/components/camera/CameraView.java index 28184dd447..7ec7683b1a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/camera/CameraView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/camera/CameraView.java @@ -32,7 +32,7 @@ import android.os.Build.VERSION; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.util.AttributeSet; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import android.view.OrientationEventListener; import android.view.ViewGroup; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiProvider.java b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiProvider.java index 975b6cf5c8..3e417e107a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiProvider.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/EmojiProvider.java @@ -22,7 +22,7 @@ import org.thoughtcrime.securesms.components.emoji.parsing.EmojiDrawInfo; import org.thoughtcrime.securesms.components.emoji.parsing.EmojiPageBitmap; import org.thoughtcrime.securesms.components.emoji.parsing.EmojiParser; import org.thoughtcrime.securesms.components.emoji.parsing.EmojiTree; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.FutureTaskListener; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/MediaKeyboard.java b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/MediaKeyboard.java index b9e8f45fae..42a1e09f87 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/MediaKeyboard.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/MediaKeyboard.java @@ -16,7 +16,7 @@ import android.widget.FrameLayout; import org.thoughtcrime.securesms.components.InputAwareLayout.InputView; import org.thoughtcrime.securesms.components.RepeatableImageKey; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.GlideApp; import java.util.Arrays; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/RecentEmojiPageModel.java b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/RecentEmojiPageModel.java index 8926c0fdee..447d062ccb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/RecentEmojiPageModel.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/RecentEmojiPageModel.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.databind.type.CollectionType; import com.fasterxml.jackson.databind.type.TypeFactory; import network.loki.messenger.R; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.JsonUtil; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/parsing/EmojiPageBitmap.java b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/parsing/EmojiPageBitmap.java index 112336d10a..9855734d2a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/emoji/parsing/EmojiPageBitmap.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/emoji/parsing/EmojiPageBitmap.java @@ -7,7 +7,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.AsyncTask; import androidx.annotation.NonNull; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.components.emoji.EmojiPageModel; import org.thoughtcrime.securesms.util.Stopwatch; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/location/SignalPlace.java b/app/src/main/java/org/thoughtcrime/securesms/components/location/SignalPlace.java index df6f382663..d6c1b49b4c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/location/SignalPlace.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/location/SignalPlace.java @@ -8,7 +8,7 @@ import android.text.TextUtils; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.JsonUtil; diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/subsampling/AttachmentRegionDecoder.java b/app/src/main/java/org/thoughtcrime/securesms/components/subsampling/AttachmentRegionDecoder.java index f8aa5db6cf..60669714b7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/subsampling/AttachmentRegionDecoder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/subsampling/AttachmentRegionDecoder.java @@ -12,7 +12,7 @@ import android.net.Uri; import com.davemorrissey.labs.subscaleview.decoder.ImageRegionDecoder; import com.davemorrissey.labs.subscaleview.decoder.SkiaImageRegionDecoder; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.PartAuthority; import java.io.InputStream; 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 b3587e1b9f..3e1f7fdc49 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -136,7 +136,7 @@ import org.thoughtcrime.securesms.giph.ui.GiphyActivity; import org.thoughtcrime.securesms.linkpreview.LinkPreviewRepository; import org.thoughtcrime.securesms.linkpreview.LinkPreviewUtil; import org.thoughtcrime.securesms.linkpreview.LinkPreviewViewModel; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.activities.EditClosedGroupActivity; import org.thoughtcrime.securesms.loki.activities.HomeActivity; import org.thoughtcrime.securesms.loki.api.PublicChatInfoUpdateWorker; diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationAdapter.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationAdapter.java index ceabfc7526..561ef5e4da 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationAdapter.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationAdapter.java @@ -38,7 +38,7 @@ import org.thoughtcrime.securesms.database.MmsSmsColumns; import org.thoughtcrime.securesms.database.MmsSmsDatabase; import org.thoughtcrime.securesms.database.model.MessageRecord; import org.thoughtcrime.securesms.database.model.MmsMessageRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.GlideRequests; import org.thoughtcrime.securesms.mms.SlideDeck; import org.session.libsession.messaging.threads.recipients.Recipient; 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 34891e82e5..438933bcc5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationFragment.java @@ -73,7 +73,7 @@ import org.thoughtcrime.securesms.database.loaders.ConversationLoader; import org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord; import org.thoughtcrime.securesms.database.model.MessageRecord; import org.thoughtcrime.securesms.database.model.MmsMessageRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.longmessage.LongMessageActivity; import org.thoughtcrime.securesms.mediasend.Media; import org.thoughtcrime.securesms.mms.GlideApp; 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 b8759a7177..005545c955 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationItem.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationItem.java @@ -83,7 +83,7 @@ import org.thoughtcrime.securesms.jobs.MmsDownloadJob; import org.thoughtcrime.securesms.jobs.MmsSendJob; import org.thoughtcrime.securesms.jobs.SmsSendJob; import org.thoughtcrime.securesms.linkpreview.LinkPreviewUtil; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.utilities.MentionUtilities; import org.thoughtcrime.securesms.loki.views.MessageAudioView; import org.thoughtcrime.securesms.loki.views.ProfilePictureView; diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationPopupActivity.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationPopupActivity.java index 1dd4a345b9..7807d2820d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationPopupActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationPopupActivity.java @@ -12,7 +12,7 @@ import android.view.MenuInflater; import android.view.MenuItem; import android.view.WindowManager; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.concurrent.ListenableFuture; import java.util.concurrent.ExecutionException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/crypto/ClassicDecryptingPartInputStream.java b/app/src/main/java/org/thoughtcrime/securesms/crypto/ClassicDecryptingPartInputStream.java index 5ea58a8963..0a24003db5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/crypto/ClassicDecryptingPartInputStream.java +++ b/app/src/main/java/org/thoughtcrime/securesms/crypto/ClassicDecryptingPartInputStream.java @@ -18,7 +18,7 @@ package org.thoughtcrime.securesms.crypto; import androidx.annotation.NonNull; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.util.LimitedInputStream; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterCipher.java b/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterCipher.java index 6c3280a4a6..837722ddd7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterCipher.java +++ b/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterCipher.java @@ -22,7 +22,7 @@ import androidx.annotation.NonNull; import org.session.libsignal.libsignal.InvalidMessageException; import org.session.libsignal.libsignal.ecc.Curve; import org.session.libsignal.libsignal.ecc.ECPrivateKey; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.Base64; import org.session.libsignal.utilities.Hex; diff --git a/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterSecretUtil.java b/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterSecretUtil.java index d1022d956c..5bb289c0e7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterSecretUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterSecretUtil.java @@ -28,7 +28,7 @@ import org.session.libsignal.libsignal.ecc.Curve; import org.session.libsignal.libsignal.ecc.ECKeyPair; import org.session.libsignal.libsignal.ecc.ECPrivateKey; import org.session.libsignal.libsignal.ecc.ECPublicKey; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.Base64; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/crypto/PublicKey.java b/app/src/main/java/org/thoughtcrime/securesms/crypto/PublicKey.java index 8bf86d997e..84c012290c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/crypto/PublicKey.java +++ b/app/src/main/java/org/thoughtcrime/securesms/crypto/PublicKey.java @@ -17,7 +17,7 @@ */ package org.thoughtcrime.securesms.crypto; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.Hex; import org.session.libsession.utilities.Util; import org.session.libsignal.libsignal.InvalidKeyException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/crypto/UnidentifiedAccessUtil.java b/app/src/main/java/org/thoughtcrime/securesms/crypto/UnidentifiedAccessUtil.java index fe714ed433..ad545f3c94 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/crypto/UnidentifiedAccessUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/crypto/UnidentifiedAccessUtil.java @@ -9,7 +9,7 @@ import androidx.annotation.WorkerThread; import org.session.libsignal.metadata.SignalProtos; import org.session.libsignal.metadata.certificate.CertificateValidator; import org.session.libsignal.metadata.certificate.InvalidCertificateException; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.threads.recipients.Recipient; import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/crypto/storage/TextSecureSessionStore.java b/app/src/main/java/org/thoughtcrime/securesms/crypto/storage/TextSecureSessionStore.java index 666a7addb3..9334d36e64 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/crypto/storage/TextSecureSessionStore.java +++ b/app/src/main/java/org/thoughtcrime/securesms/crypto/storage/TextSecureSessionStore.java @@ -6,7 +6,7 @@ import androidx.annotation.NonNull; import org.session.libsession.messaging.threads.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.SessionDatabase; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.SignalProtocolAddress; import org.session.libsignal.libsignal.protocol.CiphertextMessage; import org.session.libsignal.libsignal.state.SessionRecord; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/ApnDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/ApnDatabase.java index bf71db3d1e..94c2e4c0d0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/ApnDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/ApnDatabase.java @@ -22,7 +22,7 @@ import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.text.TextUtils; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.LegacyMmsConnection.Apn; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/AttachmentDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/AttachmentDatabase.java index c7284f9256..36a2fc2068 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/AttachmentDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/AttachmentDatabase.java @@ -39,7 +39,7 @@ import org.json.JSONArray; import org.json.JSONException; import org.session.libsession.utilities.MediaTypes; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.crypto.AttachmentSecret; import org.thoughtcrime.securesms.crypto.ClassicDecryptingPartInputStream; @@ -62,7 +62,7 @@ import org.thoughtcrime.securesms.mms.PartAuthority; import org.thoughtcrime.securesms.util.BitmapDecodingException; import org.thoughtcrime.securesms.util.BitmapUtil; -import org.thoughtcrime.securesms.util.ExternalStorageUtil; +import org.session.libsignal.utilities.externalstorage.ExternalStorageUtil; import org.thoughtcrime.securesms.util.MediaUtil; import org.thoughtcrime.securesms.util.MediaUtil.ThumbnailData; import org.thoughtcrime.securesms.video.EncryptedMediaDataSource; 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 595cdf51a1..7c7a292d0c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/EarlyReceiptCache.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/EarlyReceiptCache.java @@ -1,6 +1,6 @@ package org.thoughtcrime.securesms.database; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.threads.Address; import org.thoughtcrime.securesms.util.LRUCache; 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 eb636ac86c..72d4ef6df0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/MessagingDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/MessagingDatabase.java @@ -11,7 +11,7 @@ import org.thoughtcrime.securesms.database.documents.Document; import org.thoughtcrime.securesms.database.documents.IdentityKeyMismatch; import org.thoughtcrime.securesms.database.documents.IdentityKeyMismatchList; import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.IdentityKey; import org.session.libsession.messaging.threads.Address; 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 f08900a704..7b84e9975d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/MmsDatabase.java @@ -69,7 +69,7 @@ import org.session.libsignal.utilities.JsonUtil; import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.util.guava.Optional; import java.io.Closeable; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/OneTimePreKeyDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/OneTimePreKeyDatabase.java index 5f8d1ef555..bb93cf12d5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/OneTimePreKeyDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/OneTimePreKeyDatabase.java @@ -5,7 +5,7 @@ import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import androidx.annotation.Nullable; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import net.sqlcipher.database.SQLiteDatabase; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/PushDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/PushDatabase.java index fcfb6da011..dac1aea8db 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/PushDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/PushDatabase.java @@ -4,7 +4,7 @@ import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import androidx.annotation.NonNull; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import net.sqlcipher.database.SQLiteDatabase; 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 800e307d18..92bb776dd3 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/RecipientDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/RecipientDatabase.java @@ -20,7 +20,7 @@ import org.session.libsignal.utilities.Base64; import org.session.libsession.utilities.Util; import org.session.libsignal.libsignal.util.guava.Optional; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.io.Closeable; import java.io.IOException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/SessionDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/SessionDatabase.java index f3479b8fe9..6fc4eea93a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/SessionDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/SessionDatabase.java @@ -10,7 +10,7 @@ import androidx.annotation.Nullable; import net.sqlcipher.database.SQLiteDatabase; import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.threads.Address; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/SignedPreKeyDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/SignedPreKeyDatabase.java index 0be7b2115f..81931a0f94 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/SignedPreKeyDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/SignedPreKeyDatabase.java @@ -10,7 +10,7 @@ import androidx.annotation.Nullable; import net.sqlcipher.database.SQLiteDatabase; import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.Base64; import org.session.libsignal.libsignal.InvalidKeyException; import org.session.libsignal.libsignal.ecc.Curve; 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 29e1fff369..61a7af375e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/SmsDatabase.java @@ -30,7 +30,7 @@ import com.annimon.stream.Stream; import net.sqlcipher.database.SQLiteDatabase; import net.sqlcipher.database.SQLiteStatement; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.database.documents.IdentityKeyMismatch; import org.thoughtcrime.securesms.database.documents.IdentityKeyMismatchList; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/SmsMigrator.java b/app/src/main/java/org/thoughtcrime/securesms/database/SmsMigrator.java index b02972235d..e006523e74 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/SmsMigrator.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/SmsMigrator.java @@ -25,7 +25,7 @@ import androidx.annotation.Nullable; import net.sqlcipher.database.SQLiteDatabase; import net.sqlcipher.database.SQLiteStatement; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.threads.Address; import org.session.libsession.messaging.threads.recipients.Recipient; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/StickerDatabase.java b/app/src/main/java/org/thoughtcrime/securesms/database/StickerDatabase.java index eb7d8dd813..13634eecdf 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/StickerDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/StickerDatabase.java @@ -18,7 +18,7 @@ import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper; import org.thoughtcrime.securesms.database.model.IncomingSticker; import org.thoughtcrime.securesms.database.model.StickerPackRecord; import org.thoughtcrime.securesms.database.model.StickerRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader.DecryptableUri; import org.thoughtcrime.securesms.stickers.BlessedPacks; import org.thoughtcrime.securesms.stickers.StickerPackInstallEvent; 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 8675126e00..3b0f1d58a0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/ThreadDatabase.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/ThreadDatabase.java @@ -36,7 +36,7 @@ import org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord; import org.thoughtcrime.securesms.database.model.MessageRecord; import org.thoughtcrime.securesms.database.model.MmsMessageRecord; import org.thoughtcrime.securesms.database.model.ThreadRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.Slide; import org.thoughtcrime.securesms.mms.SlideDeck; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/documents/IdentityKeyMismatch.java b/app/src/main/java/org/thoughtcrime/securesms/database/documents/IdentityKeyMismatch.java index 06de7fa400..4ad32907b2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/documents/IdentityKeyMismatch.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/documents/IdentityKeyMismatch.java @@ -1,6 +1,6 @@ package org.thoughtcrime.securesms.database.documents; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java b/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java index 77add38b57..42bf560d80 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java @@ -26,7 +26,7 @@ import org.thoughtcrime.securesms.database.SignedPreKeyDatabase; import org.thoughtcrime.securesms.database.SmsDatabase; import org.thoughtcrime.securesms.database.StickerDatabase; import org.thoughtcrime.securesms.database.ThreadDatabase; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.database.LokiAPIDatabase; import org.thoughtcrime.securesms.loki.database.LokiBackupFilesDatabase; import org.thoughtcrime.securesms.loki.database.LokiMessageDatabase; diff --git a/app/src/main/java/org/thoughtcrime/securesms/dependencies/SignalCommunicationModule.java b/app/src/main/java/org/thoughtcrime/securesms/dependencies/SignalCommunicationModule.java index 820e4ca68e..2f1ebed5a2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/dependencies/SignalCommunicationModule.java +++ b/app/src/main/java/org/thoughtcrime/securesms/dependencies/SignalCommunicationModule.java @@ -30,7 +30,7 @@ import org.thoughtcrime.securesms.jobs.StickerDownloadJob; import org.thoughtcrime.securesms.jobs.StickerPackDownloadJob; import org.thoughtcrime.securesms.jobs.TypingSendJob; import org.thoughtcrime.securesms.linkpreview.LinkPreviewRepository; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.api.SessionProtocolImpl; import org.thoughtcrime.securesms.loki.protocol.SessionResetImplementation; import org.thoughtcrime.securesms.preferences.AppProtectionPreferenceFragment; diff --git a/app/src/main/java/org/thoughtcrime/securesms/giph/net/GiphyLoader.java b/app/src/main/java/org/thoughtcrime/securesms/giph/net/GiphyLoader.java index 407e868e71..7de0aa4ad9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/giph/net/GiphyLoader.java +++ b/app/src/main/java/org/thoughtcrime/securesms/giph/net/GiphyLoader.java @@ -6,7 +6,7 @@ import android.net.Uri; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.text.TextUtils; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.giph.model.GiphyImage; diff --git a/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyActivity.java b/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyActivity.java index 4e904fa0d8..adbc8a86b8 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/giph/ui/GiphyActivity.java @@ -20,7 +20,7 @@ import com.google.android.material.tabs.TabLayout; import org.session.libsession.utilities.MediaTypes; import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.providers.BlobProvider; import org.session.libsession.utilities.ViewUtil; 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 f4dc32a7eb..3dcd959967 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 @@ -10,7 +10,7 @@ import androidx.recyclerview.widget.RecyclerView; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/org/thoughtcrime/securesms/glide/ChunkedImageUrlFetcher.java b/app/src/main/java/org/thoughtcrime/securesms/glide/ChunkedImageUrlFetcher.java index e365a371d2..8d6002dbdc 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/glide/ChunkedImageUrlFetcher.java +++ b/app/src/main/java/org/thoughtcrime/securesms/glide/ChunkedImageUrlFetcher.java @@ -8,7 +8,7 @@ import com.bumptech.glide.load.DataSource; import com.bumptech.glide.load.data.DataFetcher; import org.thoughtcrime.securesms.giph.model.ChunkedImageUrl; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.net.ChunkedDataFetcher; import org.thoughtcrime.securesms.net.RequestController; diff --git a/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedBitmapCacheDecoder.java b/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedBitmapCacheDecoder.java index 29f7da6975..abefc3a10f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedBitmapCacheDecoder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedBitmapCacheDecoder.java @@ -4,7 +4,7 @@ package org.thoughtcrime.securesms.glide.cache; import android.graphics.Bitmap; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import com.bumptech.glide.load.Options; import com.bumptech.glide.load.ResourceDecoder; diff --git a/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedBitmapResourceEncoder.java b/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedBitmapResourceEncoder.java index 7541e73d9c..91833cc485 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedBitmapResourceEncoder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedBitmapResourceEncoder.java @@ -3,7 +3,7 @@ package org.thoughtcrime.securesms.glide.cache; import android.graphics.Bitmap; import androidx.annotation.NonNull; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import com.bumptech.glide.load.EncodeStrategy; import com.bumptech.glide.load.Options; diff --git a/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedCacheEncoder.java b/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedCacheEncoder.java index 361f7bba94..3fc1040a20 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedCacheEncoder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedCacheEncoder.java @@ -7,7 +7,7 @@ import com.bumptech.glide.load.Encoder; import com.bumptech.glide.load.Options; import com.bumptech.glide.load.engine.bitmap_recycle.ArrayPool; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.io.File; import java.io.IOException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedGifCacheDecoder.java b/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedGifCacheDecoder.java index b3bd17ec04..4bed667cf0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedGifCacheDecoder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedGifCacheDecoder.java @@ -3,7 +3,7 @@ package org.thoughtcrime.securesms.glide.cache; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import com.bumptech.glide.load.Options; import com.bumptech.glide.load.ResourceDecoder; diff --git a/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedGifDrawableResourceEncoder.java b/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedGifDrawableResourceEncoder.java index 0326ed15bd..b4efbd822f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedGifDrawableResourceEncoder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/glide/cache/EncryptedGifDrawableResourceEncoder.java @@ -2,7 +2,7 @@ package org.thoughtcrime.securesms.glide.cache; import androidx.annotation.NonNull; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import com.bumptech.glide.load.EncodeStrategy; import com.bumptech.glide.load.Options; diff --git a/app/src/main/java/org/thoughtcrime/securesms/groups/GroupMessageProcessor.java b/app/src/main/java/org/thoughtcrime/securesms/groups/GroupMessageProcessor.java index dfa258bd81..ab5dede3ea 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/groups/GroupMessageProcessor.java +++ b/app/src/main/java/org/thoughtcrime/securesms/groups/GroupMessageProcessor.java @@ -15,7 +15,7 @@ import org.thoughtcrime.securesms.database.MmsDatabase; import org.thoughtcrime.securesms.database.SmsDatabase; import org.thoughtcrime.securesms.jobs.AvatarDownloadJob; import org.thoughtcrime.securesms.jobs.PushGroupUpdateJob; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.protocol.ClosedGroupsProtocol; import org.thoughtcrime.securesms.mms.MmsException; import org.thoughtcrime.securesms.mms.OutgoingGroupMediaMessage; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/AlarmManagerScheduler.java b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/AlarmManagerScheduler.java index 023be74017..605ff7f2e4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/AlarmManagerScheduler.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/AlarmManagerScheduler.java @@ -12,7 +12,7 @@ import com.annimon.stream.Stream; import org.thoughtcrime.securesms.ApplicationContext; import network.loki.messenger.BuildConfig; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.List; import java.util.UUID; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/InAppScheduler.java b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/InAppScheduler.java index 1b055584ea..0cd295824c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/InAppScheduler.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/InAppScheduler.java @@ -6,7 +6,7 @@ import androidx.annotation.NonNull; import com.annimon.stream.Stream; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.List; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/Job.java b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/Job.java index 098a9901ae..23a7b22e9f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/Job.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/Job.java @@ -6,7 +6,7 @@ import androidx.annotation.Nullable; import androidx.annotation.WorkerThread; import org.session.libsession.messaging.jobs.Data; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.LinkedList; import java.util.List; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobController.java b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobController.java index acf5c8aa21..d0f99ce3f3 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobController.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobController.java @@ -13,7 +13,7 @@ import org.thoughtcrime.securesms.jobmanager.persistence.DependencySpec; import org.thoughtcrime.securesms.jobmanager.persistence.FullSpec; import org.thoughtcrime.securesms.jobmanager.persistence.JobSpec; import org.thoughtcrime.securesms.jobmanager.persistence.JobStorage; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.Debouncer; import java.util.ArrayList; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobManager.java b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobManager.java index 133f06b662..73fb63dcd2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobManager.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobManager.java @@ -9,7 +9,7 @@ import org.session.libsession.messaging.jobs.Data; import org.thoughtcrime.securesms.jobmanager.impl.DefaultExecutorFactory; import org.thoughtcrime.securesms.jobmanager.impl.JsonDataSerializer; import org.thoughtcrime.securesms.jobmanager.persistence.JobStorage; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.Debouncer; import java.util.ArrayList; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobRunner.java b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobRunner.java index a2cf5d2079..768ff39c70 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobRunner.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobRunner.java @@ -6,7 +6,7 @@ import androidx.annotation.NonNull; import com.annimon.stream.Stream; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.util.WakeLockUtil; import java.util.List; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobSchedulerScheduler.java b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobSchedulerScheduler.java index d3e3f4877e..a42e64e861 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobSchedulerScheduler.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobSchedulerScheduler.java @@ -12,7 +12,7 @@ import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; import org.thoughtcrime.securesms.ApplicationContext; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.List; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/impl/JsonDataSerializer.java b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/impl/JsonDataSerializer.java index eb05ed1514..e3b5b77e64 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/impl/JsonDataSerializer.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/impl/JsonDataSerializer.java @@ -3,7 +3,7 @@ package org.thoughtcrime.securesms.jobmanager.impl; import androidx.annotation.NonNull; import org.session.libsession.messaging.jobs.Data; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.JsonUtil; import java.io.IOException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/migration/DataMigrator.java b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/migration/DataMigrator.java index bbe31c9395..36f43bb5b7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobmanager/migration/DataMigrator.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobmanager/migration/DataMigrator.java @@ -3,7 +3,7 @@ package org.thoughtcrime.securesms.jobmanager.migration; import androidx.annotation.NonNull; import org.session.libsession.messaging.jobs.Data; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.java index e96f825ed0..794926a15a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.java @@ -24,7 +24,7 @@ import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.events.PartProgressEvent; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.MmsException; import org.thoughtcrime.securesms.util.AttachmentUtil; import org.session.libsignal.utilities.Base64; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentUploadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentUploadJob.java index c14db2d9b1..18f3c46a2a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentUploadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentUploadJob.java @@ -15,7 +15,7 @@ import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.events.PartProgressEvent; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.MediaConstraints; import org.thoughtcrime.securesms.mms.MediaStream; import org.thoughtcrime.securesms.mms.MmsException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/AvatarDownloadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/AvatarDownloadJob.java index 1cff5dcf36..b31029c354 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/AvatarDownloadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/AvatarDownloadJob.java @@ -10,7 +10,7 @@ import org.session.libsession.messaging.threads.GroupRecord; import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.AttachmentStreamUriLoader.AttachmentModel; import org.thoughtcrime.securesms.util.BitmapDecodingException; import org.thoughtcrime.securesms.util.BitmapUtil; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/BaseJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/BaseJob.java index 7e8852cd55..3bd16d0d1f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/BaseJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/BaseJob.java @@ -4,7 +4,7 @@ import androidx.annotation.NonNull; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.JobLogger; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; /** * @deprecated diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/LocalBackupJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/LocalBackupJob.java index 3f73abcbe4..d861fb267a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/LocalBackupJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/LocalBackupJob.java @@ -3,9 +3,9 @@ package org.thoughtcrime.securesms.jobs; import androidx.annotation.NonNull; import org.session.libsession.messaging.jobs.Data; -import org.thoughtcrime.securesms.database.NoExternalStorageException; +import org.session.libsignal.utilities.externalstorage.NoExternalStorageException; import org.thoughtcrime.securesms.jobmanager.Job; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.database.BackupFileRecord; import org.thoughtcrime.securesms.notifications.NotificationChannels; import org.thoughtcrime.securesms.service.GenericForegroundService; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java index b3dafc111d..788ce66fa6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsDownloadJob.java @@ -17,7 +17,7 @@ import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.MessagingDatabase.InsertResult; import org.thoughtcrime.securesms.database.MmsDatabase; import org.thoughtcrime.securesms.jobmanager.Job; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.ApnUnavailableException; import org.thoughtcrime.securesms.mms.CompatMmsConnection; import org.thoughtcrime.securesms.mms.IncomingMediaMessage; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsReceiveJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsReceiveJob.java index e4e6a43fcb..ee91e8799d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsReceiveJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsReceiveJob.java @@ -2,7 +2,7 @@ package org.thoughtcrime.securesms.jobs; import org.session.libsession.messaging.jobs.Data; import org.thoughtcrime.securesms.jobmanager.Job; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import androidx.annotation.NonNull; import android.util.Pair; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsSendJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsSendJob.java index 507b886080..53b42d872c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsSendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/MmsSendJob.java @@ -29,7 +29,7 @@ import org.thoughtcrime.securesms.database.NoSuchMessageException; import org.thoughtcrime.securesms.database.ThreadDatabase; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.CompatMmsConnection; import org.thoughtcrime.securesms.mms.MediaConstraints; import org.thoughtcrime.securesms.mms.MmsException; 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 fd228f7ed9..0d23b6af7f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushDecryptJob.java @@ -72,7 +72,7 @@ import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.JobManager; import org.thoughtcrime.securesms.linkpreview.Link; import org.thoughtcrime.securesms.linkpreview.LinkPreviewUtil; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.activities.HomeActivity; import org.thoughtcrime.securesms.loki.api.SessionProtocolImpl; import org.thoughtcrime.securesms.loki.database.LokiAPIDatabase; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupSendJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupSendJob.java index 81324ce07e..1c7df45f52 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupSendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupSendJob.java @@ -26,7 +26,7 @@ import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.JobManager; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.protocol.ClosedGroupsProtocol; import org.thoughtcrime.securesms.mms.MmsException; import org.thoughtcrime.securesms.mms.OutgoingGroupMediaMessage; @@ -48,7 +48,6 @@ import org.session.libsignal.service.api.push.SignalServiceAddress; import org.session.libsignal.service.internal.push.SignalServiceProtos.GroupContext; import java.io.IOException; -import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; import java.util.List; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupUpdateJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupUpdateJob.java index fdc8ee2d5f..a0594a0010 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupUpdateJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushGroupUpdateJob.java @@ -15,7 +15,7 @@ import org.thoughtcrime.securesms.database.GroupDatabase; import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsignal.service.api.SignalServiceMessageSender; import org.session.libsignal.service.api.crypto.UntrustedIdentityException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushMediaSendJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushMediaSendJob.java index 5b11b9857c..19254a7d74 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushMediaSendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushMediaSendJob.java @@ -22,7 +22,7 @@ import org.thoughtcrime.securesms.database.NoSuchMessageException; import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.JobManager; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.database.LokiMessageDatabase; import org.thoughtcrime.securesms.mms.MmsException; import org.thoughtcrime.securesms.mms.OutgoingMediaMessage; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushNotificationReceiveJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushNotificationReceiveJob.java index d318cfba35..2ab93d174c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushNotificationReceiveJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushNotificationReceiveJob.java @@ -7,7 +7,7 @@ import org.session.libsession.messaging.jobs.Data; import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.service.api.SignalServiceMessageReceiver; import org.session.libsignal.service.api.push.exceptions.PushNetworkException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushReceivedJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushReceivedJob.java index b4ffd9c03c..5bcc71cf71 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushReceivedJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushReceivedJob.java @@ -6,9 +6,8 @@ import androidx.annotation.NonNull; import org.session.libsession.messaging.threads.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.MessagingDatabase.SyncMessageId; -import org.thoughtcrime.securesms.database.RecipientDatabase; import org.thoughtcrime.securesms.jobmanager.Job; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.threads.recipients.Recipient; import org.session.libsignal.service.api.messages.SignalServiceEnvelope; 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 b460155ad4..d54bdf8d5a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java @@ -24,7 +24,7 @@ import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.events.PartProgressEvent; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader; import org.thoughtcrime.securesms.mms.OutgoingMediaMessage; import org.thoughtcrime.securesms.mms.PartAuthority; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushTextSendJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushTextSendJob.java index 669ca63a66..00789a08ef 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushTextSendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushTextSendJob.java @@ -3,7 +3,7 @@ package org.thoughtcrime.securesms.jobs; import androidx.annotation.NonNull; import org.session.libsession.messaging.jobs.Data; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.threads.Address; import org.session.libsession.messaging.threads.recipients.Recipient; @@ -23,7 +23,6 @@ import org.thoughtcrime.securesms.loki.database.LokiMessageDatabase; import org.thoughtcrime.securesms.service.ExpiringMessageManager; import org.thoughtcrime.securesms.transport.InsecureFallbackApprovalException; import org.thoughtcrime.securesms.transport.RetryLaterException; -import org.session.libsignal.libsignal.state.PreKeyBundle; import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsignal.service.api.SignalServiceMessageSender; import org.session.libsignal.service.api.crypto.UnidentifiedAccessPair; 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 037f23e49d..90f87a51cb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileAvatarJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileAvatarJob.java @@ -13,7 +13,7 @@ import org.session.libsession.utilities.Util; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.RecipientDatabase; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/SendDeliveryReceiptJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/SendDeliveryReceiptJob.java index 11ae064702..78fc1270ed 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/SendDeliveryReceiptJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/SendDeliveryReceiptJob.java @@ -9,7 +9,7 @@ import org.session.libsession.messaging.threads.Address; import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.threads.recipients.Recipient; import org.session.libsignal.service.api.SignalServiceMessageSender; import org.session.libsignal.service.api.crypto.UntrustedIdentityException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/SendJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/SendJob.java index 31363c0234..2a8f46be3c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/SendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/SendJob.java @@ -8,7 +8,7 @@ import org.thoughtcrime.securesms.database.AttachmentDatabase; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.JobLogger; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.MediaConstraints; import org.thoughtcrime.securesms.mms.MediaStream; import org.thoughtcrime.securesms.mms.MmsException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/SendReadReceiptJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/SendReadReceiptJob.java index 91ceb70d20..b435f54baa 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/SendReadReceiptJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/SendReadReceiptJob.java @@ -9,7 +9,7 @@ import org.session.libsession.messaging.threads.Address; import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.threads.recipients.Recipient; import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsignal.service.api.SignalServiceMessageSender; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/SmsReceiveJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/SmsReceiveJob.java index 07fcc0d4ee..053bc904ac 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/SmsReceiveJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/SmsReceiveJob.java @@ -8,7 +8,7 @@ import org.session.libsession.messaging.jobs.Data; import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.SqlCipherMigrationConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.MessagingDatabase.InsertResult; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/SmsSentJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/SmsSentJob.java index e84ec352d7..6d3473053b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/SmsSentJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/SmsSentJob.java @@ -6,7 +6,7 @@ import android.telephony.SmsManager; import org.session.libsession.messaging.jobs.Data; import org.thoughtcrime.securesms.jobmanager.Job; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.database.DatabaseFactory; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerDownloadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerDownloadJob.java index a5e3b408c6..52a927f8aa 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerDownloadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerDownloadJob.java @@ -9,7 +9,7 @@ import org.thoughtcrime.securesms.database.model.IncomingSticker; import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.Hex; import org.session.libsignal.service.api.SignalServiceMessageReceiver; import org.session.libsignal.service.api.push.exceptions.PushNetworkException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerPackDownloadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerPackDownloadJob.java index f7de43232d..b1c2f6aa36 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerPackDownloadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/StickerPackDownloadJob.java @@ -11,7 +11,7 @@ import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.JobManager; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.Hex; import org.session.libsignal.libsignal.InvalidMessageException; import org.session.libsignal.service.api.SignalServiceMessageReceiver; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/TrimThreadJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/TrimThreadJob.java index c9d7808233..3b7444d58a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/TrimThreadJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/TrimThreadJob.java @@ -21,7 +21,7 @@ import androidx.annotation.NonNull; import org.session.libsession.messaging.jobs.Data; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.jobmanager.Job; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/TypingSendJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/TypingSendJob.java index 70854e9eb2..b7a8e13d57 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/TypingSendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/TypingSendJob.java @@ -9,7 +9,7 @@ import org.thoughtcrime.securesms.crypto.UnidentifiedAccessUtil; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.dependencies.InjectableType; import org.thoughtcrime.securesms.jobmanager.Job; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsignal.service.api.SignalServiceMessageSender; import org.session.libsignal.service.api.crypto.UnidentifiedAccessPair; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/UpdateApkJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/UpdateApkJob.java index e38928ccc4..4354b83961 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/UpdateApkJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/UpdateApkJob.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.session.libsession.messaging.jobs.Data; import org.thoughtcrime.securesms.jobmanager.Job; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.service.UpdateApkReadyListener; import org.session.libsession.utilities.FileUtils; import org.session.libsignal.utilities.Hex; diff --git a/app/src/main/java/org/thoughtcrime/securesms/linkpreview/LinkPreviewRepository.java b/app/src/main/java/org/thoughtcrime/securesms/linkpreview/LinkPreviewRepository.java index 3e4355da82..06560b4740 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/linkpreview/LinkPreviewRepository.java +++ b/app/src/main/java/org/thoughtcrime/securesms/linkpreview/LinkPreviewRepository.java @@ -15,7 +15,7 @@ import org.session.libsession.utilities.MediaTypes; import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.database.AttachmentDatabase; import org.thoughtcrime.securesms.dependencies.InjectableType; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.net.CallRequestController; import org.thoughtcrime.securesms.net.CompositeRequestController; diff --git a/app/src/main/java/org/thoughtcrime/securesms/logging/AndroidLogger.java b/app/src/main/java/org/thoughtcrime/securesms/logging/AndroidLogger.java index 570fda623a..f54d43cc34 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/logging/AndroidLogger.java +++ b/app/src/main/java/org/thoughtcrime/securesms/logging/AndroidLogger.java @@ -1,5 +1,7 @@ package org.thoughtcrime.securesms.logging; +import org.session.libsignal.utilities.logging.Log; + public class AndroidLogger extends Log.Logger { @Override diff --git a/app/src/main/java/org/thoughtcrime/securesms/logging/CustomSignalProtocolLogger.java b/app/src/main/java/org/thoughtcrime/securesms/logging/CustomSignalProtocolLogger.java deleted file mode 100644 index bc185fc625..0000000000 --- a/app/src/main/java/org/thoughtcrime/securesms/logging/CustomSignalProtocolLogger.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.thoughtcrime.securesms.logging; - -import org.session.libsignal.libsignal.logging.SignalProtocolLogger; - -public class CustomSignalProtocolLogger implements SignalProtocolLogger { - @Override - public void log(int priority, String tag, String message) { - switch (priority) { - case VERBOSE: - Log.v(tag, message); - break; - case DEBUG: - Log.d(tag, message); - break; - case INFO: - Log.i(tag, message); - break; - case WARN: - Log.w(tag, message); - break; - case ERROR: - Log.e(tag, message); - break; - case ASSERT: - Log.wtf(tag, message); - break; - } - } -} diff --git a/app/src/main/java/org/thoughtcrime/securesms/logging/GrowingBuffer.java b/app/src/main/java/org/thoughtcrime/securesms/logging/GrowingBuffer.java deleted file mode 100644 index 24e29d075e..0000000000 --- a/app/src/main/java/org/thoughtcrime/securesms/logging/GrowingBuffer.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.thoughtcrime.securesms.logging; - -public class GrowingBuffer { - - private byte[] buffer; - - public byte[] get(int minLength) { - if (buffer == null || buffer.length < minLength) { - buffer = new byte[minLength]; - } - return buffer; - } -} diff --git a/app/src/main/java/org/thoughtcrime/securesms/logging/LogFile.java b/app/src/main/java/org/thoughtcrime/securesms/logging/LogFile.java index 53c4305666..64702cc988 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/logging/LogFile.java +++ b/app/src/main/java/org/thoughtcrime/securesms/logging/LogFile.java @@ -27,6 +27,18 @@ import javax.crypto.spec.SecretKeySpec; class LogFile { + public static class GrowingBuffer { + + private byte[] buffer; + + public byte[] get(int minLength) { + if (buffer == null || buffer.length < minLength) { + buffer = new byte[minLength]; + } + return buffer; + } + } + public static class Writer { private final byte[] ivBuffer = new byte[16]; diff --git a/app/src/main/java/org/thoughtcrime/securesms/logging/PersistentLogger.java b/app/src/main/java/org/thoughtcrime/securesms/logging/PersistentLogger.java index 51eb70f4c0..f08797a7d0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/logging/PersistentLogger.java +++ b/app/src/main/java/org/thoughtcrime/securesms/logging/PersistentLogger.java @@ -4,10 +4,11 @@ import android.content.Context; import androidx.annotation.AnyThread; import androidx.annotation.WorkerThread; -import org.thoughtcrime.securesms.database.NoExternalStorageException; +import org.session.libsignal.utilities.externalstorage.NoExternalStorageException; import org.session.libsignal.utilities.concurrent.ListenableFuture; import org.session.libsignal.utilities.concurrent.SettableFuture; +import org.session.libsignal.utilities.logging.Log; import java.io.ByteArrayOutputStream; import java.io.File; diff --git a/app/src/main/java/org/thoughtcrime/securesms/logging/UncaughtExceptionLogger.java b/app/src/main/java/org/thoughtcrime/securesms/logging/UncaughtExceptionLogger.java index 0196132108..553bc47f8f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/logging/UncaughtExceptionLogger.java +++ b/app/src/main/java/org/thoughtcrime/securesms/logging/UncaughtExceptionLogger.java @@ -1,5 +1,7 @@ package org.thoughtcrime.securesms.logging; +import org.session.libsignal.utilities.logging.Log; + import androidx.annotation.NonNull; public class UncaughtExceptionLogger implements Thread.UncaughtExceptionHandler { diff --git a/app/src/main/java/org/thoughtcrime/securesms/logsubmit/SubmitLogFragment.java b/app/src/main/java/org/thoughtcrime/securesms/logsubmit/SubmitLogFragment.java index 2609af8bb7..0e1d9de4a1 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/logsubmit/SubmitLogFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/logsubmit/SubmitLogFragment.java @@ -53,7 +53,7 @@ import org.json.JSONObject; import org.thoughtcrime.securesms.ApplicationContext; import network.loki.messenger.R; import org.thoughtcrime.securesms.contactshare.SimpleTextWatcher; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.logsubmit.util.Scrubber; import org.session.libsession.utilities.Util; import org.session.libsession.utilities.task.ProgressDialogAsyncTask; diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/BackupRestoreActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/BackupRestoreActivity.kt index 0def74d2ea..a37558a212 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/BackupRestoreActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/BackupRestoreActivity.kt @@ -35,7 +35,7 @@ import org.thoughtcrime.securesms.backup.FullBackupImporter import org.thoughtcrime.securesms.backup.FullBackupImporter.DatabaseDowngradeException import org.thoughtcrime.securesms.crypto.AttachmentSecretProvider import org.thoughtcrime.securesms.database.DatabaseFactory -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.loki.utilities.setUpActionBarSessionLogo import org.thoughtcrime.securesms.loki.utilities.show import org.thoughtcrime.securesms.notifications.NotificationChannels 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 eb03b219ea..d78e1966ba 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 @@ -20,7 +20,7 @@ import kotlinx.coroutines.withContext import network.loki.messenger.R import org.thoughtcrime.securesms.BaseActionBarActivity import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.loki.fragments.ScanQRCodeWrapperFragment import org.thoughtcrime.securesms.loki.fragments.ScanQRCodeWrapperFragmentDelegate import org.thoughtcrime.securesms.loki.utilities.OpenGroupUtilities diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/api/BackgroundPollWorker.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/api/BackgroundPollWorker.kt index 35c06402e5..7fc1f5bee9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/api/BackgroundPollWorker.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/api/BackgroundPollWorker.kt @@ -9,7 +9,7 @@ import nl.komponents.kovenant.all import nl.komponents.kovenant.functional.map import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.jobs.PushContentReceiveJob -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsession.utilities.TextSecurePreferences import org.session.libsignal.service.api.messages.SignalServiceEnvelope import org.session.libsignal.service.loki.api.SnodeAPI diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/api/ClosedGroupPoller.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/api/ClosedGroupPoller.kt index aa17f4a784..2076bee417 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/api/ClosedGroupPoller.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/api/ClosedGroupPoller.kt @@ -6,7 +6,7 @@ import nl.komponents.kovenant.Promise import nl.komponents.kovenant.functional.bind import nl.komponents.kovenant.functional.map import org.thoughtcrime.securesms.jobs.PushContentReceiveJob -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.loki.database.SharedSenderKeysDatabase import org.session.libsignal.utilities.successBackground import org.session.libsignal.service.api.messages.SignalServiceEnvelope diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/api/LokiPushNotificationManager.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/api/LokiPushNotificationManager.kt index 4db87d056a..9822f0525a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/api/LokiPushNotificationManager.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/api/LokiPushNotificationManager.kt @@ -5,7 +5,7 @@ import nl.komponents.kovenant.functional.map import okhttp3.* import org.thoughtcrime.securesms.database.DatabaseFactory import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.JsonUtil import org.session.libsignal.service.loki.api.PushNotificationAPI import org.session.libsignal.service.loki.api.onionrequests.OnionRequestAPI diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/api/PrepareAttachmentAudioExtrasJob.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/api/PrepareAttachmentAudioExtrasJob.kt index 0a24d5f0de..054c4ee11c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/api/PrepareAttachmentAudioExtrasJob.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/api/PrepareAttachmentAudioExtrasJob.kt @@ -2,7 +2,7 @@ package org.thoughtcrime.securesms.loki.api import android.media.MediaDataSource import android.os.Build -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import androidx.annotation.RequiresApi import org.greenrobot.eventbus.EventBus import org.session.libsession.messaging.jobs.Data diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/api/PublicChatInfoUpdateWorker.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/api/PublicChatInfoUpdateWorker.kt index d7d09bc92f..40955d86c5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/api/PublicChatInfoUpdateWorker.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/api/PublicChatInfoUpdateWorker.kt @@ -2,7 +2,7 @@ package org.thoughtcrime.securesms.loki.api import android.content.Context import androidx.work.* -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.loki.utilities.OpenGroupUtilities import org.session.libsignal.service.loki.api.opengroups.PublicChat diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/api/PublicChatPoller.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/api/PublicChatPoller.kt index 6bd6f80ffd..3303515794 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/api/PublicChatPoller.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/api/PublicChatPoller.kt @@ -2,8 +2,7 @@ package org.thoughtcrime.securesms.loki.api import android.content.Context import android.os.Handler -import org.thoughtcrime.securesms.logging.Log -import androidx.annotation.WorkerThread +import org.session.libsignal.utilities.logging.Log import nl.komponents.kovenant.Promise import nl.komponents.kovenant.functional.bind import nl.komponents.kovenant.functional.map diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/api/PushNotificationService.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/api/PushNotificationService.kt index 5c0dbc5f30..27f67c9a69 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/api/PushNotificationService.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/api/PushNotificationService.kt @@ -7,7 +7,7 @@ import com.google.firebase.messaging.RemoteMessage import org.thoughtcrime.securesms.jobs.PushContentReceiveJob import org.thoughtcrime.securesms.notifications.NotificationChannels import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.api.messages.SignalServiceEnvelope import org.session.libsignal.utilities.Base64 import org.session.libsignal.service.loki.api.MessageWrapper @@ -48,7 +48,7 @@ class PushNotificationService : FirebaseMessagingService() { } override fun onDeletedMessages() { - org.thoughtcrime.securesms.logging.Log.d("Loki", "Called onDeletedMessages.") + Log.d("Loki", "Called onDeletedMessages.") super.onDeletedMessages() val token = TextSecurePreferences.getFCMToken(this)!! val userPublicKey = TextSecurePreferences.getLocalNumber(this) ?: return diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/api/ResetThreadSessionJob.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/api/ResetThreadSessionJob.kt index 86df11e2d2..1bc0b6c891 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/api/ResetThreadSessionJob.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/api/ResetThreadSessionJob.kt @@ -5,7 +5,7 @@ import org.session.libsession.messaging.threads.Address import org.thoughtcrime.securesms.jobmanager.Job import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint import org.thoughtcrime.securesms.jobs.BaseJob -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsession.messaging.threads.recipients.Recipient import org.thoughtcrime.securesms.sms.MessageSender import org.thoughtcrime.securesms.sms.OutgoingEndSessionMessage diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiAPIDatabase.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiAPIDatabase.kt index 3f850737f2..5e7183ac6c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiAPIDatabase.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/database/LokiAPIDatabase.kt @@ -5,7 +5,7 @@ import android.content.Context import org.session.libsignal.libsignal.ecc.DjbECPrivateKey import org.session.libsignal.libsignal.ecc.DjbECPublicKey import org.session.libsignal.libsignal.ecc.ECKeyPair -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.database.Database import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper import org.thoughtcrime.securesms.loki.utilities.* 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 99240626f2..05e5f666db 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 @@ -3,7 +3,7 @@ package org.thoughtcrime.securesms.loki.database import android.content.ContentValues import android.content.Context import android.database.sqlite.SQLiteDatabase -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsession.messaging.threads.Address import org.thoughtcrime.securesms.database.Database import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/fragments/ContactSelectionListFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/fragments/ContactSelectionListFragment.kt index bb6566345d..3c7e2bdc76 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/fragments/ContactSelectionListFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/fragments/ContactSelectionListFragment.kt @@ -12,7 +12,7 @@ import android.view.ViewGroup import kotlinx.android.synthetic.main.contact_selection_list_fragment.* import network.loki.messenger.R import org.thoughtcrime.securesms.contacts.ContactsCursorLoader -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.mms.GlideApp import org.session.libsession.messaging.threads.recipients.Recipient diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt index a492248b6a..7f24078034 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJob.kt @@ -7,7 +7,7 @@ import org.thoughtcrime.securesms.crypto.UnidentifiedAccessUtil import org.thoughtcrime.securesms.jobmanager.Job import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint import org.thoughtcrime.securesms.jobs.BaseJob -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.loki.utilities.recipient import org.session.libsignal.utilities.Hex import org.session.libsignal.service.api.push.SignalServiceAddress diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJobV2.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJobV2.kt index e5c8168614..e1e3928c44 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJobV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupUpdateMessageSendJobV2.kt @@ -19,7 +19,7 @@ import org.thoughtcrime.securesms.crypto.UnidentifiedAccessUtil import org.thoughtcrime.securesms.jobmanager.Job import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint import org.thoughtcrime.securesms.jobs.BaseJob -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.loki.utilities.recipient import org.session.libsignal.utilities.Hex diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt index a854eb6f9a..3dd347472c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt @@ -16,7 +16,7 @@ import org.session.libsignal.service.loki.protocol.closedgroups.SharedSenderKeys import org.session.libsignal.service.loki.utilities.toHexString import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.database.DatabaseFactory -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.loki.api.LokiPushNotificationManager import org.thoughtcrime.securesms.loki.api.LokiPushNotificationManager.ClosedGroupOperation import org.thoughtcrime.securesms.loki.utilities.recipient diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/NullMessageSendJob.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/NullMessageSendJob.kt index 27f78d783a..834c01ea23 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/NullMessageSendJob.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/NullMessageSendJob.kt @@ -8,7 +8,7 @@ import org.session.libsession.messaging.threads.Address import org.thoughtcrime.securesms.jobmanager.Job import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint import org.thoughtcrime.securesms.jobs.BaseJob -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsession.messaging.threads.recipients.Recipient import org.session.libsignal.service.api.push.SignalServiceAddress import org.session.libsignal.service.internal.push.SignalServiceProtos diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/SessionManagementProtocol.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/SessionManagementProtocol.kt index 2cc64e5eae..c305852eb1 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/SessionManagementProtocol.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/SessionManagementProtocol.kt @@ -1,7 +1,7 @@ package org.thoughtcrime.securesms.loki.protocol import android.content.Context -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.crypto.SecurityEvent import org.thoughtcrime.securesms.crypto.storage.TextSecureSessionStore diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/GroupDescription.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/GroupDescription.kt index f2959b85a2..bf052e744e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/GroupDescription.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/GroupDescription.kt @@ -10,7 +10,7 @@ import org.session.libsignal.service.internal.push.SignalServiceProtos import java.util.* import network.loki.messenger.R -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import java.io.IOException class GroupDescription(context: Context, groupContext: SignalServiceProtos.GroupContext?) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/IP2Country.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/IP2Country.kt index 6c78762f44..7ebc9e2cb7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/IP2Country.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/IP2Country.kt @@ -5,7 +5,7 @@ import android.content.Context import android.content.Intent import android.content.IntentFilter import androidx.localbroadcastmanager.content.LocalBroadcastManager -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import com.opencsv.CSVReader import org.session.libsignal.service.loki.api.onionrequests.OnionRequestAPI import org.session.libsignal.utilities.ThreadUtils diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/views/MessageAudioView.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/views/MessageAudioView.kt index ba9de4811d..350dddaa3d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/views/MessageAudioView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/views/MessageAudioView.kt @@ -15,7 +15,6 @@ import android.widget.ProgressBar import android.widget.TextView import androidx.annotation.ColorInt import androidx.core.content.ContextCompat -import androidx.core.graphics.ColorUtils import kotlinx.coroutines.* import network.loki.messenger.R import org.greenrobot.eventbus.EventBus @@ -28,7 +27,7 @@ import org.thoughtcrime.securesms.components.AnimatingToggle import org.thoughtcrime.securesms.database.AttachmentDatabase import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.events.PartProgressEvent -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.loki.api.PrepareAttachmentAudioExtrasJob import org.thoughtcrime.securesms.loki.utilities.getColorWithID import org.thoughtcrime.securesms.mms.AudioSlide diff --git a/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageRepository.java b/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageRepository.java index a910724c45..cee13fb9df 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageRepository.java +++ b/app/src/main/java/org/thoughtcrime/securesms/longmessage/LongMessageRepository.java @@ -11,7 +11,7 @@ import org.thoughtcrime.securesms.database.MmsDatabase; import org.thoughtcrime.securesms.database.SmsDatabase; import org.thoughtcrime.securesms.database.model.MessageRecord; import org.thoughtcrime.securesms.database.model.MmsMessageRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.PartAuthority; import org.thoughtcrime.securesms.mms.TextSlide; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mediasend/Camera1Controller.java b/app/src/main/java/org/thoughtcrime/securesms/mediasend/Camera1Controller.java index 69d7b0e0ab..5517f86bed 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mediasend/Camera1Controller.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mediasend/Camera1Controller.java @@ -5,7 +5,7 @@ import android.hardware.Camera; import androidx.annotation.NonNull; import android.view.Surface; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.Collections; import java.util.Comparator; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mediasend/Camera1Fragment.java b/app/src/main/java/org/thoughtcrime/securesms/mediasend/Camera1Fragment.java index ff9b0583f4..d0daa6a1ec 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mediasend/Camera1Fragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mediasend/Camera1Fragment.java @@ -35,7 +35,7 @@ import com.bumptech.glide.request.target.SimpleTarget; import com.bumptech.glide.request.transition.Transition; import network.loki.messenger.R; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.GlideApp; import org.session.libsession.utilities.ServiceUtil; import org.thoughtcrime.securesms.util.Stopwatch; 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 c4911cd839..65bcd5a94e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendActivity.java @@ -23,7 +23,7 @@ import androidx.lifecycle.ViewModelProvider; import org.session.libsession.utilities.MediaTypes; import org.session.libsignal.libsignal.util.guava.Optional; import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.permissions.Permissions; import org.thoughtcrime.securesms.providers.BlobProvider; import org.thoughtcrime.securesms.scribbles.ImageEditorFragment; 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 89b61cfc0b..1685459cc9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendFragment.java @@ -38,7 +38,7 @@ import org.thoughtcrime.securesms.components.emoji.EmojiToggle; import org.thoughtcrime.securesms.components.emoji.MediaKeyboard; import org.thoughtcrime.securesms.contactshare.SimpleTextWatcher; import org.thoughtcrime.securesms.imageeditor.model.EditorModel; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mediapreview.MediaRailAdapter; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.providers.BlobProvider; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendVideoFragment.java b/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendVideoFragment.java index 6f98363c57..268741be1d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendVideoFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendVideoFragment.java @@ -10,7 +10,7 @@ import android.view.View; import android.view.ViewGroup; import network.loki.messenger.R; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.VideoSlide; import org.thoughtcrime.securesms.video.VideoPlayer; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendViewModel.java b/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendViewModel.java index e627096af2..a0d8b40c79 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendViewModel.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mediasend/MediaSendViewModel.java @@ -12,7 +12,7 @@ import android.text.TextUtils; import com.annimon.stream.Stream; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.MediaConstraints; import org.thoughtcrime.securesms.providers.BlobProvider; import org.thoughtcrime.securesms.util.MediaUtil; 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 5c78ecda4b..0c85c74432 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/AttachmentManager.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/AttachmentManager.java @@ -47,15 +47,15 @@ import org.thoughtcrime.securesms.components.RemovableEditableMediaView; import org.thoughtcrime.securesms.components.ThumbnailView; import org.thoughtcrime.securesms.components.location.SignalMapView; import org.thoughtcrime.securesms.components.location.SignalPlace; -import org.thoughtcrime.securesms.database.NoExternalStorageException; +import org.session.libsignal.utilities.externalstorage.NoExternalStorageException; import org.thoughtcrime.securesms.giph.ui.GiphyActivity; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mediasend.MediaSendActivity; import org.thoughtcrime.securesms.permissions.Permissions; import org.thoughtcrime.securesms.providers.BlobProvider; import org.thoughtcrime.securesms.providers.DeprecatedPersistentBlobProvider; import org.thoughtcrime.securesms.util.BitmapUtil; -import org.thoughtcrime.securesms.util.ExternalStorageUtil; +import org.session.libsignal.utilities.externalstorage.ExternalStorageUtil; import org.thoughtcrime.securesms.util.FileProviderUtil; import org.thoughtcrime.securesms.util.MediaUtil; import org.session.libsignal.libsignal.util.guava.Optional; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/AttachmentStreamLocalUriFetcher.java b/app/src/main/java/org/thoughtcrime/securesms/mms/AttachmentStreamLocalUriFetcher.java index d5399b3b84..2a018a442c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/AttachmentStreamLocalUriFetcher.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/AttachmentStreamLocalUriFetcher.java @@ -6,7 +6,7 @@ import com.bumptech.glide.Priority; import com.bumptech.glide.load.DataSource; import com.bumptech.glide.load.data.DataFetcher; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.InvalidMessageException; import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsignal.service.api.crypto.AttachmentCipherInputStream; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/CompatMmsConnection.java b/app/src/main/java/org/thoughtcrime/securesms/mms/CompatMmsConnection.java index 8302cae814..7ea011f1d9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/CompatMmsConnection.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/CompatMmsConnection.java @@ -5,7 +5,7 @@ import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import com.google.android.mms.pdu_alt.PduHeaders; import com.google.android.mms.pdu_alt.RetrieveConf; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/DecryptableStreamLocalUriFetcher.java b/app/src/main/java/org/thoughtcrime/securesms/mms/DecryptableStreamLocalUriFetcher.java index 2b11974a67..e9f16b9bbb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/DecryptableStreamLocalUriFetcher.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/DecryptableStreamLocalUriFetcher.java @@ -4,7 +4,7 @@ import android.content.ContentResolver; import android.content.Context; import android.graphics.Bitmap; import android.net.Uri; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import com.bumptech.glide.load.data.StreamLocalUriFetcher; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/DocumentSlide.java b/app/src/main/java/org/thoughtcrime/securesms/mms/DocumentSlide.java index 50b3834d0b..414c5f8be0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/DocumentSlide.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/DocumentSlide.java @@ -7,7 +7,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; -import org.thoughtcrime.securesms.util.ExternalStorageUtil; +import org.session.libsignal.utilities.externalstorage.ExternalStorageUtil; public class DocumentSlide extends Slide { diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingLegacyMmsConnection.java b/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingLegacyMmsConnection.java index 89e91902c9..a9274d0820 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingLegacyMmsConnection.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingLegacyMmsConnection.java @@ -20,7 +20,7 @@ import android.content.Context; import android.net.Uri; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import com.google.android.mms.InvalidHeaderValueException; import com.google.android.mms.pdu_alt.NotifyRespInd; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java b/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java index b139b9a71c..2159c38ecc 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/IncomingLollipopMmsConnection.java @@ -24,7 +24,7 @@ import android.os.Build.VERSION_CODES; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.telephony.SmsManager; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import com.google.android.mms.InvalidHeaderValueException; import com.google.android.mms.pdu_alt.NotifyRespInd; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/LegacyMmsConnection.java b/app/src/main/java/org/thoughtcrime/securesms/mms/LegacyMmsConnection.java index 59efc7b342..359c4ef8ba 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/LegacyMmsConnection.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/LegacyMmsConnection.java @@ -26,7 +26,7 @@ import androidx.core.app.ActivityCompat; import android.telephony.TelephonyManager; import android.text.TextUtils; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.apache.http.Header; import org.apache.http.auth.AuthScope; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/LollipopMmsConnection.java b/app/src/main/java/org/thoughtcrime/securesms/mms/LollipopMmsConnection.java index 90f2f88871..bf9456782b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/LollipopMmsConnection.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/LollipopMmsConnection.java @@ -22,7 +22,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.Util; import java.util.concurrent.TimeoutException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/MediaConstraints.java b/app/src/main/java/org/thoughtcrime/securesms/mms/MediaConstraints.java index d9e866c8f3..7fb5d1163a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/MediaConstraints.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/MediaConstraints.java @@ -6,7 +6,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import org.session.libsession.utilities.MediaTypes; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import android.util.Pair; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/MmsRadio.java b/app/src/main/java/org/thoughtcrime/securesms/mms/MmsRadio.java index ed1398d67f..4e7eb3ad16 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/MmsRadio.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/MmsRadio.java @@ -7,7 +7,7 @@ import android.content.IntentFilter; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.PowerManager; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.Util; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingLegacyMmsConnection.java b/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingLegacyMmsConnection.java index 705616243c..08572eade5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingLegacyMmsConnection.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingLegacyMmsConnection.java @@ -22,7 +22,7 @@ import android.net.NetworkInfo; import android.net.Uri; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import com.google.android.mms.pdu_alt.PduParser; import com.google.android.mms.pdu_alt.SendConf; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingLollipopMmsConnection.java b/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingLollipopMmsConnection.java index c85a767b50..fa851c2a09 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingLollipopMmsConnection.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/OutgoingLollipopMmsConnection.java @@ -25,7 +25,7 @@ import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.telephony.SmsManager; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import com.android.mms.service_alt.MmsConfig; import com.google.android.mms.pdu_alt.PduParser; diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/PartParser.java b/app/src/main/java/org/thoughtcrime/securesms/mms/PartParser.java index 11bac88427..2c49cc55f6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/PartParser.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/PartParser.java @@ -5,7 +5,7 @@ import com.google.android.mms.pdu_alt.CharacterSets; import com.google.android.mms.pdu_alt.PduBody; import com.google.android.mms.pdu_alt.PduPart; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.Util; 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 879a5ccbc0..230eff2c34 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/QuoteId.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/QuoteId.java @@ -7,7 +7,7 @@ import org.json.JSONException; import org.json.JSONObject; import org.session.libsession.messaging.threads.Address; import org.thoughtcrime.securesms.database.model.MessageRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; /** * Represents the information required to find the {@link MessageRecord} pointed to by a quote. diff --git a/app/src/main/java/org/thoughtcrime/securesms/net/ChunkedDataFetcher.java b/app/src/main/java/org/thoughtcrime/securesms/net/ChunkedDataFetcher.java index 699987b720..654e997aaf 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/net/ChunkedDataFetcher.java +++ b/app/src/main/java/org/thoughtcrime/securesms/net/ChunkedDataFetcher.java @@ -6,7 +6,7 @@ import android.text.TextUtils; import com.annimon.stream.Stream; import com.bumptech.glide.util.ContentLengthInputStream; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.Util; import org.session.libsession.utilities.concurrent.SignalExecutors; import org.session.libsignal.libsignal.util.Pair; diff --git a/app/src/main/java/org/thoughtcrime/securesms/net/ContentProxySafetyInterceptor.java b/app/src/main/java/org/thoughtcrime/securesms/net/ContentProxySafetyInterceptor.java index 1e89618aee..721006dcbd 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/net/ContentProxySafetyInterceptor.java +++ b/app/src/main/java/org/thoughtcrime/securesms/net/ContentProxySafetyInterceptor.java @@ -4,7 +4,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import org.thoughtcrime.securesms.linkpreview.LinkPreviewUtil; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.io.IOException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/net/ContentProxySelector.java b/app/src/main/java/org/thoughtcrime/securesms/net/ContentProxySelector.java index 29418f34e3..01298ad698 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/net/ContentProxySelector.java +++ b/app/src/main/java/org/thoughtcrime/securesms/net/ContentProxySelector.java @@ -1,7 +1,7 @@ package org.thoughtcrime.securesms.net; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import network.loki.messenger.BuildConfig; diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/AndroidAutoHeardReceiver.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/AndroidAutoHeardReceiver.java index 9a7384bf45..4548a6c776 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/AndroidAutoHeardReceiver.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/AndroidAutoHeardReceiver.java @@ -27,7 +27,7 @@ import androidx.core.app.NotificationManagerCompat; import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.MessagingDatabase.MarkedMessageInfo; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.LinkedList; import java.util.List; 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 8fe847cc33..d89acb0273 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/AndroidAutoReplyReceiver.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/AndroidAutoReplyReceiver.java @@ -33,7 +33,7 @@ import org.thoughtcrime.securesms.mms.OutgoingMediaMessage; import org.session.libsession.messaging.threads.recipients.Recipient; import org.thoughtcrime.securesms.sms.MessageSender; import org.thoughtcrime.securesms.sms.OutgoingTextMessage; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.Collections; import java.util.LinkedList; 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 fe9fda3174..dd20a2bf5c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/DefaultMessageNotifier.java @@ -50,7 +50,7 @@ import org.thoughtcrime.securesms.database.ThreadDatabase; import org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord; import org.thoughtcrime.securesms.database.model.MessageRecord; import org.thoughtcrime.securesms.database.model.MmsMessageRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.protocol.SessionMetaProtocol; import org.thoughtcrime.securesms.loki.utilities.MentionUtilities; import org.thoughtcrime.securesms.mms.SlideDeck; 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 3ae78f707c..ccfbb6dfdd 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/MarkReadReceiver.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/MarkReadReceiver.java @@ -18,7 +18,7 @@ import org.thoughtcrime.securesms.database.MessagingDatabase.ExpirationInfo; import org.thoughtcrime.securesms.database.MessagingDatabase.MarkedMessageInfo; import org.thoughtcrime.securesms.database.MessagingDatabase.SyncMessageId; import org.thoughtcrime.securesms.jobs.SendReadReceiptJob; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.protocol.SessionMetaProtocol; import org.thoughtcrime.securesms.service.ExpiringMessageManager; import org.session.libsignal.service.loki.protocol.shelved.multidevice.MultiDeviceProtocol; 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 e5df266599..ab73ee285d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/NotificationChannels.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/NotificationChannels.java @@ -29,7 +29,7 @@ import org.session.libsession.messaging.threads.recipients.Recipient; import org.session.libsession.messaging.threads.recipients.Recipient.*; import org.session.libsession.utilities.ServiceUtil; import org.session.libsession.utilities.TextSecurePreferences; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.ArrayList; import java.util.Arrays; diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/NotificationState.java b/app/src/main/java/org/thoughtcrime/securesms/notifications/NotificationState.java index d8420404fd..0ec5814640 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/NotificationState.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/NotificationState.java @@ -9,7 +9,7 @@ import androidx.annotation.Nullable; import org.thoughtcrime.securesms.conversation.ConversationActivity; import org.thoughtcrime.securesms.conversation.ConversationPopupActivity; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.threads.recipients.Recipient; import org.session.libsession.messaging.threads.recipients.Recipient.*; 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 ccd48965d7..62bfcc8b5e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java @@ -28,7 +28,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy; 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.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.utilities.AvatarPlaceholderGenerator; import org.thoughtcrime.securesms.loki.utilities.NotificationUtilities; import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader; diff --git a/app/src/main/java/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java b/app/src/main/java/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java index 7e458409ea..250341e791 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/preferences/ChatsPreferenceFragment.java @@ -22,7 +22,7 @@ import org.thoughtcrime.securesms.backup.BackupDialog; import org.thoughtcrime.securesms.backup.BackupEvent; import org.thoughtcrime.securesms.components.SwitchPreferenceCompat; import org.thoughtcrime.securesms.jobs.LocalBackupJob; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.permissions.Permissions; import org.thoughtcrime.securesms.preferences.widgets.ProgressPreference; import org.thoughtcrime.securesms.util.BackupDirSelector; diff --git a/app/src/main/java/org/thoughtcrime/securesms/providers/BlobProvider.java b/app/src/main/java/org/thoughtcrime/securesms/providers/BlobProvider.java index f88dd009a8..e8a01008c5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/providers/BlobProvider.java +++ b/app/src/main/java/org/thoughtcrime/securesms/providers/BlobProvider.java @@ -13,7 +13,7 @@ import org.thoughtcrime.securesms.crypto.AttachmentSecret; import org.thoughtcrime.securesms.crypto.AttachmentSecretProvider; import org.thoughtcrime.securesms.crypto.ModernDecryptingPartInputStream; import org.thoughtcrime.securesms.crypto.ModernEncryptingPartOutputStream; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.Util; import org.session.libsession.utilities.concurrent.SignalExecutors; diff --git a/app/src/main/java/org/thoughtcrime/securesms/providers/DeprecatedPersistentBlobProvider.java b/app/src/main/java/org/thoughtcrime/securesms/providers/DeprecatedPersistentBlobProvider.java index 07ea7bba46..3ce75bcf00 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/providers/DeprecatedPersistentBlobProvider.java +++ b/app/src/main/java/org/thoughtcrime/securesms/providers/DeprecatedPersistentBlobProvider.java @@ -12,7 +12,7 @@ import org.thoughtcrime.securesms.crypto.AttachmentSecret; import org.thoughtcrime.securesms.crypto.AttachmentSecretProvider; import org.thoughtcrime.securesms.crypto.ClassicDecryptingPartInputStream; import org.thoughtcrime.securesms.crypto.ModernDecryptingPartInputStream; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.util.FileProviderUtil; import java.io.File; diff --git a/app/src/main/java/org/thoughtcrime/securesms/providers/MmsBodyProvider.java b/app/src/main/java/org/thoughtcrime/securesms/providers/MmsBodyProvider.java index 92f6ade1b6..373648e2b6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/providers/MmsBodyProvider.java +++ b/app/src/main/java/org/thoughtcrime/securesms/providers/MmsBodyProvider.java @@ -26,7 +26,7 @@ import android.net.Uri; import android.os.ParcelFileDescriptor; import androidx.annotation.NonNull; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.io.File; import java.io.FileNotFoundException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/providers/PartProvider.java b/app/src/main/java/org/thoughtcrime/securesms/providers/PartProvider.java index 627b9910f9..a2d574b127 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/providers/PartProvider.java +++ b/app/src/main/java/org/thoughtcrime/securesms/providers/PartProvider.java @@ -28,7 +28,7 @@ import android.os.ParcelFileDescriptor; import android.provider.OpenableColumns; import androidx.annotation.NonNull; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.sending_receiving.attachments.AttachmentId; import org.session.libsession.messaging.sending_receiving.attachments.DatabaseAttachment; diff --git a/app/src/main/java/org/thoughtcrime/securesms/qr/QrCode.java b/app/src/main/java/org/thoughtcrime/securesms/qr/QrCode.java index ed0ccee8d3..c295b5fca4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/qr/QrCode.java +++ b/app/src/main/java/org/thoughtcrime/securesms/qr/QrCode.java @@ -10,7 +10,7 @@ import com.google.zxing.WriterException; import com.google.zxing.common.BitMatrix; import com.google.zxing.qrcode.QRCodeWriter; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.HashMap; diff --git a/app/src/main/java/org/thoughtcrime/securesms/qr/ScanningThread.java b/app/src/main/java/org/thoughtcrime/securesms/qr/ScanningThread.java index 5bbe69f477..57af8ff7ad 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/qr/ScanningThread.java +++ b/app/src/main/java/org/thoughtcrime/securesms/qr/ScanningThread.java @@ -16,7 +16,7 @@ import com.google.zxing.qrcode.QRCodeReader; import org.thoughtcrime.securesms.components.camera.CameraView; import org.thoughtcrime.securesms.components.camera.CameraView.PreviewFrame; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.utilities.Util; import java.util.HashMap; diff --git a/app/src/main/java/org/thoughtcrime/securesms/scribbles/ImageEditorFragment.java b/app/src/main/java/org/thoughtcrime/securesms/scribbles/ImageEditorFragment.java index 4639540ee4..be079a806b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/scribbles/ImageEditorFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/scribbles/ImageEditorFragment.java @@ -18,7 +18,7 @@ import org.thoughtcrime.securesms.imageeditor.Renderer; import org.thoughtcrime.securesms.imageeditor.model.EditorElement; import org.thoughtcrime.securesms.imageeditor.model.EditorModel; import org.thoughtcrime.securesms.imageeditor.renderers.TextRenderer; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mediasend.MediaSendPageFragment; import org.thoughtcrime.securesms.mms.MediaConstraints; import org.thoughtcrime.securesms.mms.PushMediaConstraints; diff --git a/app/src/main/java/org/thoughtcrime/securesms/scribbles/StickerLoader.java b/app/src/main/java/org/thoughtcrime/securesms/scribbles/StickerLoader.java index f3c6c4fdc7..94152dd0db 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/scribbles/StickerLoader.java +++ b/app/src/main/java/org/thoughtcrime/securesms/scribbles/StickerLoader.java @@ -19,7 +19,7 @@ package org.thoughtcrime.securesms.scribbles; import android.content.Context; import androidx.annotation.NonNull; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.util.AsyncLoader; 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 2c887d6bd3..1e93966e79 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/search/SearchRepository.java +++ b/app/src/main/java/org/thoughtcrime/securesms/search/SearchRepository.java @@ -15,7 +15,7 @@ import org.thoughtcrime.securesms.database.MmsSmsColumns; import org.thoughtcrime.securesms.database.SearchDatabase; import org.thoughtcrime.securesms.database.ThreadDatabase; import org.thoughtcrime.securesms.database.model.ThreadRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.threads.recipients.Recipient; import org.thoughtcrime.securesms.search.model.MessageResult; import org.thoughtcrime.securesms.search.model.SearchResult; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/DirectShareService.java b/app/src/main/java/org/thoughtcrime/securesms/service/DirectShareService.java index 61eb9d6cd6..21c1adcff9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/DirectShareService.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/DirectShareService.java @@ -18,7 +18,7 @@ import org.thoughtcrime.securesms.ShareActivity; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.ThreadDatabase; import org.thoughtcrime.securesms.database.model.ThreadRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.GlideApp; import org.session.libsession.messaging.threads.recipients.Recipient; import org.thoughtcrime.securesms.util.BitmapUtil; 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 6020d091c5..56a24fe543 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/ExpiringMessageManager.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/ExpiringMessageManager.java @@ -11,7 +11,7 @@ import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsignal.service.api.messages.SignalServiceGroup; import org.session.libsignal.service.internal.push.SignalServiceProtos; import org.session.libsignal.service.internal.push.SignalServiceProtos.GroupContext; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.MmsDatabase; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/GenericForegroundService.java b/app/src/main/java/org/thoughtcrime/securesms/service/GenericForegroundService.java index 2733d7f783..4c942e341b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/GenericForegroundService.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/GenericForegroundService.java @@ -12,7 +12,7 @@ import androidx.annotation.Nullable; import androidx.core.app.NotificationCompat; import androidx.core.content.ContextCompat; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.activities.HomeActivity; import org.thoughtcrime.securesms.notifications.NotificationChannels; import org.session.libsignal.libsignal.util.guava.Preconditions; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/IncomingMessageObserver.java b/app/src/main/java/org/thoughtcrime/securesms/service/IncomingMessageObserver.java index 4ef12c22f8..f95f024305 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/IncomingMessageObserver.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/IncomingMessageObserver.java @@ -18,7 +18,7 @@ import org.thoughtcrime.securesms.jobmanager.ConstraintObserver; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint; import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraintObserver; import org.thoughtcrime.securesms.jobs.PushContentReceiveJob; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.notifications.NotificationChannels; import org.thoughtcrime.securesms.push.SignalServiceNetworkAccess; import org.session.libsession.utilities.TextSecurePreferences; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/KeyCachingService.java b/app/src/main/java/org/thoughtcrime/securesms/service/KeyCachingService.java index 52cf8f7d0b..40d800a0ef 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/KeyCachingService.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/KeyCachingService.java @@ -36,7 +36,7 @@ import androidx.core.app.NotificationCompat; import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.DatabaseUpgradeActivity; import org.thoughtcrime.securesms.DummyActivity; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.loki.activities.HomeActivity; import org.thoughtcrime.securesms.notifications.NotificationChannels; import org.session.libsession.utilities.ServiceUtil; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/MmsListener.java b/app/src/main/java/org/thoughtcrime/securesms/service/MmsListener.java index da39e282c1..65e0142948 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/MmsListener.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/MmsListener.java @@ -20,7 +20,7 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.provider.Telephony; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.jobs.MmsReceiveJob; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/PersistentAlarmManagerListener.java b/app/src/main/java/org/thoughtcrime/securesms/service/PersistentAlarmManagerListener.java index a771920063..90303be722 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/PersistentAlarmManagerListener.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/PersistentAlarmManagerListener.java @@ -6,7 +6,7 @@ import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; public abstract class PersistentAlarmManagerListener extends BroadcastReceiver { diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/PersistentConnectionBootListener.java b/app/src/main/java/org/thoughtcrime/securesms/service/PersistentConnectionBootListener.java index ae324888cf..47de3311ec 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/PersistentConnectionBootListener.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/PersistentConnectionBootListener.java @@ -4,7 +4,7 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; public class PersistentConnectionBootListener extends BroadcastReceiver { 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 56ab3ea454..9c77d721c7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/QuickResponseService.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/QuickResponseService.java @@ -8,7 +8,7 @@ import android.widget.Toast; import network.loki.messenger.R; import org.session.libsession.messaging.threads.Address; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.messaging.threads.recipients.Recipient; import org.thoughtcrime.securesms.sms.MessageSender; import org.thoughtcrime.securesms.sms.OutgoingTextMessage; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/SmsDeliveryListener.java b/app/src/main/java/org/thoughtcrime/securesms/service/SmsDeliveryListener.java index 00854e0f87..c8e12ac054 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/SmsDeliveryListener.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/SmsDeliveryListener.java @@ -6,7 +6,7 @@ import android.content.Intent; import android.telephony.SmsMessage; import org.thoughtcrime.securesms.jobmanager.JobManager; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.database.SmsDatabase; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/SmsListener.java b/app/src/main/java/org/thoughtcrime/securesms/service/SmsListener.java index 2358fac270..9014086795 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/SmsListener.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/SmsListener.java @@ -22,7 +22,7 @@ import android.content.Intent; import android.os.Bundle; import android.provider.Telephony; import android.telephony.SmsMessage; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.jobs.SmsReceiveJob; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkReadyListener.java b/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkReadyListener.java index 73bb184ef8..19ff039eb0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkReadyListener.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkReadyListener.java @@ -12,7 +12,7 @@ import android.net.Uri; import androidx.annotation.Nullable; import androidx.core.app.NotificationCompat; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import network.loki.messenger.R; import org.thoughtcrime.securesms.notifications.NotificationChannels; diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkRefreshListener.java b/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkRefreshListener.java index fd99cb637a..2f15f84118 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkRefreshListener.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/UpdateApkRefreshListener.java @@ -3,7 +3,7 @@ package org.thoughtcrime.securesms.service; import android.content.Context; import android.content.Intent; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.ApplicationContext; import network.loki.messenger.BuildConfig; diff --git a/app/src/main/java/org/thoughtcrime/securesms/sms/MessageSender.java b/app/src/main/java/org/thoughtcrime/securesms/sms/MessageSender.java index e439c9e0c3..ca82b8fe7e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/sms/MessageSender.java +++ b/app/src/main/java/org/thoughtcrime/securesms/sms/MessageSender.java @@ -28,7 +28,6 @@ import org.thoughtcrime.securesms.database.MessagingDatabase.SyncMessageId; import org.thoughtcrime.securesms.database.MmsDatabase; import org.thoughtcrime.securesms.database.MmsSmsDatabase; import org.thoughtcrime.securesms.database.NoSuchMessageException; -import org.thoughtcrime.securesms.database.RecipientDatabase; import org.thoughtcrime.securesms.database.SmsDatabase; import org.thoughtcrime.securesms.database.ThreadDatabase; import org.thoughtcrime.securesms.database.model.MessageRecord; @@ -39,16 +38,12 @@ import org.thoughtcrime.securesms.jobs.PushGroupSendJob; import org.thoughtcrime.securesms.jobs.PushMediaSendJob; import org.thoughtcrime.securesms.jobs.PushTextSendJob; import org.thoughtcrime.securesms.jobs.SmsSendJob; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.MmsException; import org.thoughtcrime.securesms.mms.OutgoingMediaMessage; import org.session.libsession.messaging.threads.recipients.Recipient; import org.thoughtcrime.securesms.service.ExpiringMessageManager; import org.session.libsession.utilities.TextSecurePreferences; -import org.session.libsignal.libsignal.util.guava.Optional; -import org.session.libsignal.service.api.push.ContactTokenDetails; - -import java.io.IOException; public class MessageSender { 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 1cf1af596f..729f7c3b4d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ReadReceiptManager.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ReadReceiptManager.kt @@ -4,7 +4,7 @@ import android.content.Context import org.session.libsession.messaging.threads.Address import org.session.libsession.utilities.SSKEnvironment import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.database.MessagingDatabase.SyncMessageId 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 8361ef1b72..100ede3702 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/TypingStatusRepository.java +++ b/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/TypingStatusRepository.java @@ -15,7 +15,7 @@ import org.session.libsession.messaging.threads.recipients.Recipient; import org.session.libsession.utilities.SSKEnvironment; import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.ArrayList; import java.util.Collections; diff --git a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerKeyboardPageFragment.java b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerKeyboardPageFragment.java index 5193b4ba7c..edc4d3664a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerKeyboardPageFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerKeyboardPageFragment.java @@ -21,7 +21,7 @@ import android.view.ViewGroup; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.model.StickerRecord; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.mms.GlideRequests; import org.thoughtcrime.securesms.stickers.StickerKeyboardPageAdapter.StickerKeyboardPageViewHolder; diff --git a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewActivity.java b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewActivity.java index b7ab9dcb37..28112b5a1c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewActivity.java @@ -23,7 +23,7 @@ import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity; import org.thoughtcrime.securesms.ShareActivity; import org.thoughtcrime.securesms.jobs.StickerPackDownloadJob; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.stickers.StickerManifest.Sticker; diff --git a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewRepository.java b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewRepository.java index 67e4a47203..0aa53038c2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewRepository.java +++ b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerPackPreviewRepository.java @@ -13,7 +13,7 @@ import org.thoughtcrime.securesms.database.StickerDatabase; import org.thoughtcrime.securesms.database.model.StickerPackRecord; import org.thoughtcrime.securesms.database.model.StickerRecord; import org.thoughtcrime.securesms.dependencies.InjectableType; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.Hex; import org.session.libsession.utilities.concurrent.SignalExecutors; import org.session.libsignal.libsignal.InvalidMessageException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerRemoteUriFetcher.java b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerRemoteUriFetcher.java index 424ebbbedb..8a9769ff45 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerRemoteUriFetcher.java +++ b/app/src/main/java/org/thoughtcrime/securesms/stickers/StickerRemoteUriFetcher.java @@ -6,7 +6,7 @@ import com.bumptech.glide.Priority; import com.bumptech.glide.load.DataSource; import com.bumptech.glide.load.data.DataFetcher; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.utilities.Hex; import org.session.libsignal.libsignal.InvalidMessageException; import org.session.libsignal.service.api.SignalServiceMessageReceiver; diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/AttachmentUtil.java b/app/src/main/java/org/thoughtcrime/securesms/util/AttachmentUtil.java index 9f22ecb04e..99728e8120 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/AttachmentUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/AttachmentUtil.java @@ -16,7 +16,7 @@ import org.session.libsession.utilities.ServiceUtil; import org.session.libsession.utilities.TextSecurePreferences; import org.thoughtcrime.securesms.database.DatabaseFactory; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.Collections; import java.util.Set; diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/BackupUtil.kt b/app/src/main/java/org/thoughtcrime/securesms/util/BackupUtil.kt index ef61c59988..8b8d899b72 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/BackupUtil.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/util/BackupUtil.kt @@ -7,7 +7,7 @@ import android.net.Uri import android.os.Build import android.os.Environment import android.provider.DocumentsContract -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import android.widget.Toast import androidx.annotation.WorkerThread import androidx.documentfile.provider.DocumentFile diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/BackupUtilOld.java b/app/src/main/java/org/thoughtcrime/securesms/util/BackupUtilOld.java index 4f4cb92374..668be6e120 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/BackupUtilOld.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/BackupUtilOld.java @@ -7,7 +7,7 @@ import androidx.annotation.Nullable; import org.thoughtcrime.securesms.loki.database.BackupFileRecord; -import org.thoughtcrime.securesms.database.NoExternalStorageException; +import org.session.libsignal.utilities.externalstorage.NoExternalStorageException; import java.io.File; diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/BitmapUtil.java b/app/src/main/java/org/thoughtcrime/securesms/util/BitmapUtil.java index 5fe323357f..94c63ceaa0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/BitmapUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/BitmapUtil.java @@ -19,7 +19,7 @@ import android.util.Pair; import com.bumptech.glide.load.engine.DiskCacheStrategy; import org.session.libsession.utilities.MediaTypes; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.GlideApp; import org.thoughtcrime.securesms.mms.MediaConstraints; diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/DateUtils.java b/app/src/main/java/org/thoughtcrime/securesms/util/DateUtils.java index 901aba7dc2..7f8c44c498 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/DateUtils.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/DateUtils.java @@ -24,7 +24,7 @@ import androidx.annotation.Nullable; import android.os.Build; import android.text.format.DateFormat; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.text.ParseException; import java.text.SimpleDateFormat; diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/ExternalStorageUtil.java b/app/src/main/java/org/thoughtcrime/securesms/util/ExternalStorageUtil.java deleted file mode 100644 index 6c701b4501..0000000000 --- a/app/src/main/java/org/thoughtcrime/securesms/util/ExternalStorageUtil.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.thoughtcrime.securesms.util; - -import android.content.Context; -import android.os.Environment; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import org.thoughtcrime.securesms.database.NoExternalStorageException; - -import java.io.File; - -public class ExternalStorageUtil { - - public static final String DIRECTORY_BACKUPS = "Backups"; - - /** @see Context#getExternalFilesDir(String) */ - @NonNull - public static File getDir(Context context, @Nullable String type) throws NoExternalStorageException { - final File dir = context.getExternalFilesDir(type); - if (dir == null) { - throw new NoExternalStorageException("External storage dir is currently unavailable: " + type); - } - return dir; - } - - @NonNull - public static File getBackupDir(Context context) throws NoExternalStorageException { - return getDir(context, DIRECTORY_BACKUPS); - } - - @NonNull - public static File getVideoDir(Context context) throws NoExternalStorageException { - return getDir(context, Environment.DIRECTORY_MOVIES); - } - - @NonNull - public static File getAudioDir(Context context) throws NoExternalStorageException { - return getDir(context, Environment.DIRECTORY_MUSIC); - } - - @NonNull - public static File getImageDir(Context context) throws NoExternalStorageException { - return getDir(context, Environment.DIRECTORY_PICTURES); - } - - @NonNull - public static File getDownloadDir(Context context) throws NoExternalStorageException { - return getDir(context, Environment.DIRECTORY_DOWNLOADS); - } - - @Nullable - public static File getCacheDir(Context context) { - return context.getExternalCacheDir(); - } - - @Nullable - public static String getCleanFileName(@Nullable String fileName) { - if (fileName == null) return null; - - fileName = fileName.replace('\u202D', '\uFFFD'); - fileName = fileName.replace('\u202E', '\uFFFD'); - - return fileName; - } -} diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/MediaUtil.java b/app/src/main/java/org/thoughtcrime/securesms/util/MediaUtil.java index d2a621bda9..06024444a4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/MediaUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/MediaUtil.java @@ -17,7 +17,7 @@ import com.bumptech.glide.load.resource.gif.GifDrawable; import org.session.libsession.messaging.sending_receiving.attachments.Attachment; import org.session.libsession.utilities.MediaTypes; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.AudioSlide; import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader.DecryptableUri; import org.thoughtcrime.securesms.mms.DocumentSlide; diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/RealtimeSleepTimer.java b/app/src/main/java/org/thoughtcrime/securesms/util/RealtimeSleepTimer.java index f990969953..f311a78196 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/RealtimeSleepTimer.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/RealtimeSleepTimer.java @@ -8,12 +8,10 @@ import android.content.Intent; import android.content.IntentFilter; import android.os.Build; import android.os.SystemClock; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.service.api.util.SleepTimer; -import java.util.concurrent.TimeUnit; - /** * A sleep timer that is based on elapsed realtime, so * that it works properly, even in low-power sleep modes. diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/ResUtil.java b/app/src/main/java/org/thoughtcrime/securesms/util/ResUtil.java index f4215de9f0..7ea1762068 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/ResUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/ResUtil.java @@ -31,7 +31,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.core.content.ContextCompat; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; public class ResUtil { private static final String TAG = ResUtil.class.getSimpleName(); diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/SaveAttachmentTask.kt b/app/src/main/java/org/thoughtcrime/securesms/util/SaveAttachmentTask.kt index 71309211f6..ee1cf128e6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/SaveAttachmentTask.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/util/SaveAttachmentTask.kt @@ -11,7 +11,7 @@ import android.webkit.MimeTypeMap import android.widget.Toast import androidx.appcompat.app.AlertDialog import network.loki.messenger.R -import org.thoughtcrime.securesms.logging.Log +import org.session.libsignal.utilities.logging.Log import org.thoughtcrime.securesms.mms.PartAuthority import org.session.libsession.utilities.task.ProgressDialogAsyncTask import java.io.File diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/SingleLiveEvent.java b/app/src/main/java/org/thoughtcrime/securesms/util/SingleLiveEvent.java index 6526853533..711a8b9ffb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/SingleLiveEvent.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/SingleLiveEvent.java @@ -23,7 +23,7 @@ import androidx.annotation.MainThread; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/SmsCharacterCalculator.java b/app/src/main/java/org/thoughtcrime/securesms/util/SmsCharacterCalculator.java index 96251e768e..9107e99555 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/SmsCharacterCalculator.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/SmsCharacterCalculator.java @@ -17,7 +17,7 @@ package org.thoughtcrime.securesms.util; import android.telephony.SmsMessage; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; public class SmsCharacterCalculator extends CharacterCalculator { diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/Stopwatch.java b/app/src/main/java/org/thoughtcrime/securesms/util/Stopwatch.java index b18d474a86..fad0d63892 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/Stopwatch.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/Stopwatch.java @@ -2,7 +2,7 @@ package org.thoughtcrime.securesms.util; import androidx.annotation.NonNull; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.LinkedList; import java.util.List; diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/TelephonyUtil.java b/app/src/main/java/org/thoughtcrime/securesms/util/TelephonyUtil.java index e293f8f8af..71a78276d6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/TelephonyUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/TelephonyUtil.java @@ -6,7 +6,7 @@ import android.net.ConnectivityManager; import androidx.annotation.NonNull; import android.telephony.TelephonyManager; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.Locale; diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/WakeLockUtil.java b/app/src/main/java/org/thoughtcrime/securesms/util/WakeLockUtil.java index 17b2c5ad89..b876a084a4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/WakeLockUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/WakeLockUtil.java @@ -6,7 +6,7 @@ import android.os.PowerManager.WakeLock; import androidx.annotation.NonNull; import org.session.libsession.utilities.ServiceUtil; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; public class WakeLockUtil { diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/dualsim/SubscriptionManagerCompat.java b/app/src/main/java/org/thoughtcrime/securesms/util/dualsim/SubscriptionManagerCompat.java index 70cf840132..03ba49f934 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/dualsim/SubscriptionManagerCompat.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/dualsim/SubscriptionManagerCompat.java @@ -11,7 +11,7 @@ import android.telephony.TelephonyManager; import network.loki.messenger.R; import org.session.libsession.utilities.ServiceUtil; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.util.guava.Function; import org.session.libsignal.libsignal.util.guava.Optional; diff --git a/app/src/main/java/org/thoughtcrime/securesms/video/VideoPlayer.java b/app/src/main/java/org/thoughtcrime/securesms/video/VideoPlayer.java index 5579b50858..bac240616c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/video/VideoPlayer.java +++ b/app/src/main/java/org/thoughtcrime/securesms/video/VideoPlayer.java @@ -49,7 +49,7 @@ import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter; import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory; import org.thoughtcrime.securesms.attachments.AttachmentServer; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.thoughtcrime.securesms.mms.PartAuthority; import org.thoughtcrime.securesms.mms.VideoSlide; import org.session.libsession.utilities.ViewUtil; diff --git a/app/src/test/java/org/thoughtcrime/securesms/BaseUnitTest.java b/app/src/test/java/org/thoughtcrime/securesms/BaseUnitTest.java index 64b3165490..c49b4ed98d 100644 --- a/app/src/test/java/org/thoughtcrime/securesms/BaseUnitTest.java +++ b/app/src/test/java/org/thoughtcrime/securesms/BaseUnitTest.java @@ -6,7 +6,7 @@ import android.os.Handler; import android.os.Looper; import android.preference.PreferenceManager; import android.text.TextUtils; -import org.thoughtcrime.securesms.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.junit.Before; import org.junit.runner.RunWith; diff --git a/app/src/test/java/org/thoughtcrime/securesms/logging/LogTest.java b/app/src/test/java/org/thoughtcrime/securesms/logging/LogTest.java index d8b6426f77..ea1dd3a588 100644 --- a/app/src/test/java/org/thoughtcrime/securesms/logging/LogTest.java +++ b/app/src/test/java/org/thoughtcrime/securesms/logging/LogTest.java @@ -1,6 +1,7 @@ package org.thoughtcrime.securesms.logging; import org.junit.Test; +import org.session.libsignal.utilities.logging.Log; import static org.junit.Assert.assertEquals; diff --git a/libsession/src/main/java/org/session/libsession/messaging/fileserver/FileServerAPI.kt b/libsession/src/main/java/org/session/libsession/messaging/fileserver/FileServerAPI.kt index 2180532712..6f04c5db5b 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/fileserver/FileServerAPI.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/fileserver/FileServerAPI.kt @@ -4,7 +4,7 @@ import nl.komponents.kovenant.Promise import nl.komponents.kovenant.functional.map import okhttp3.Request import org.session.libsession.messaging.utilities.DotNetAPI -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Base64 import org.session.libsignal.utilities.JsonUtil import org.session.libsignal.service.loki.api.onionrequests.OnionRequestAPI diff --git a/libsession/src/main/java/org/session/libsession/messaging/jobs/AttachmentUploadJob.kt b/libsession/src/main/java/org/session/libsession/messaging/jobs/AttachmentUploadJob.kt index bdb8929d38..e9c8c7d01d 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/jobs/AttachmentUploadJob.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/jobs/AttachmentUploadJob.kt @@ -8,7 +8,7 @@ import org.session.libsession.messaging.fileserver.FileServerAPI import org.session.libsession.messaging.messages.Message import org.session.libsession.messaging.sending_receiving.MessageSender import org.session.libsession.messaging.utilities.DotNetAPI -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.PushAttachmentData import org.session.libsignal.service.internal.push.http.AttachmentCipherOutputStreamFactory import org.session.libsignal.service.internal.util.Util diff --git a/libsession/src/main/java/org/session/libsession/messaging/jobs/JobQueue.kt b/libsession/src/main/java/org/session/libsession/messaging/jobs/JobQueue.kt index b9ee72ae7d..4d75d31b27 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/jobs/JobQueue.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/jobs/JobQueue.kt @@ -6,7 +6,7 @@ import java.util.Timer import org.session.libsession.messaging.MessagingConfiguration -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import kotlin.concurrent.schedule import kotlin.math.roundToLong diff --git a/libsession/src/main/java/org/session/libsession/messaging/jobs/MessageReceiveJob.kt b/libsession/src/main/java/org/session/libsession/messaging/jobs/MessageReceiveJob.kt index d028fe899b..e835c128b1 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/jobs/MessageReceiveJob.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/jobs/MessageReceiveJob.kt @@ -4,7 +4,7 @@ import nl.komponents.kovenant.Promise import nl.komponents.kovenant.deferred import org.session.libsession.messaging.sending_receiving.MessageReceiver import org.session.libsession.messaging.sending_receiving.handle -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log class MessageReceiveJob(val data: ByteArray, val isBackgroundPoll: Boolean, val openGroupMessageServerID: Long? = null, val openGroupID: String? = null) : Job { diff --git a/libsession/src/main/java/org/session/libsession/messaging/jobs/MessageSendJob.kt b/libsession/src/main/java/org/session/libsession/messaging/jobs/MessageSendJob.kt index 20ab13826c..e00e0a43a5 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/jobs/MessageSendJob.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/jobs/MessageSendJob.kt @@ -8,7 +8,7 @@ import org.session.libsession.messaging.messages.Destination import org.session.libsession.messaging.messages.Message import org.session.libsession.messaging.messages.visible.VisibleMessage import org.session.libsession.messaging.sending_receiving.MessageSender -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log class MessageSendJob(val message: Message, val destination: Destination) : Job { diff --git a/libsession/src/main/java/org/session/libsession/messaging/jobs/NotifyPNServerJob.kt b/libsession/src/main/java/org/session/libsession/messaging/jobs/NotifyPNServerJob.kt index 19ef50b2d6..3c2665b636 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/jobs/NotifyPNServerJob.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/jobs/NotifyPNServerJob.kt @@ -12,7 +12,7 @@ import org.session.libsession.messaging.sending_receiving.notifications.PushNoti import org.session.libsession.snode.SnodeMessage import org.session.libsession.snode.OnionRequestAPI -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.JsonUtil import org.session.libsignal.service.loki.utilities.retryIfNeeded 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 3ed8b71e59..8264800055 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 @@ -4,7 +4,7 @@ import com.google.protobuf.ByteString import org.session.libsignal.libsignal.ecc.DjbECPrivateKey import org.session.libsignal.libsignal.ecc.DjbECPublicKey import org.session.libsignal.libsignal.ecc.ECKeyPair -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos class ClosedGroupControlMessage() : ControlMessage() { diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ClosedGroupUpdate.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ClosedGroupUpdate.kt index 75486b6557..c2fe8094f4 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ClosedGroupUpdate.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ClosedGroupUpdate.kt @@ -1,7 +1,7 @@ package org.session.libsession.messaging.messages.control import com.google.protobuf.ByteString -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos import org.session.libsignal.service.loki.protocol.closedgroups.ClosedGroupSenderKey diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ExpirationTimerUpdate.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ExpirationTimerUpdate.kt index 9f2a38c86c..09b4f4e3d6 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ExpirationTimerUpdate.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ExpirationTimerUpdate.kt @@ -1,6 +1,6 @@ package org.session.libsession.messaging.messages.control -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos class ExpirationTimerUpdate() : ControlMessage() { diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ReadReceipt.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ReadReceipt.kt index 960b5aeaf9..0ee1f0acf9 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ReadReceipt.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ReadReceipt.kt @@ -1,6 +1,6 @@ package org.session.libsession.messaging.messages.control -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos class ReadReceipt() : ControlMessage() { diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/control/TypingIndicator.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/control/TypingIndicator.kt index 755d0fc1c8..10192b1d3e 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/control/TypingIndicator.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/control/TypingIndicator.kt @@ -1,6 +1,6 @@ package org.session.libsession.messaging.messages.control -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos class TypingIndicator() : ControlMessage() { diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/control/unused/NullMessage.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/control/unused/NullMessage.kt index 59e8f2444a..2a090cc069 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/control/unused/NullMessage.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/control/unused/NullMessage.kt @@ -2,7 +2,7 @@ package org.session.libsession.messaging.messages.control.unused import com.google.protobuf.ByteString import org.session.libsession.messaging.messages.control.ControlMessage -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos import java.security.SecureRandom diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/control/unused/SessionRequest.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/control/unused/SessionRequest.kt index 7298f9f68d..e3d20dfb14 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/control/unused/SessionRequest.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/control/unused/SessionRequest.kt @@ -5,7 +5,7 @@ import org.session.libsession.messaging.MessagingConfiguration import org.session.libsession.messaging.messages.control.ControlMessage import org.session.libsignal.libsignal.IdentityKey import org.session.libsignal.libsignal.ecc.DjbECPublicKey -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.libsignal.state.PreKeyBundle import org.session.libsignal.service.internal.push.SignalServiceProtos import java.security.SecureRandom diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/visible/LinkPreview.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/visible/LinkPreview.kt index 19f9b69a10..c62d0685bb 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/visible/LinkPreview.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/visible/LinkPreview.kt @@ -1,7 +1,7 @@ package org.session.libsession.messaging.messages.visible import org.session.libsession.messaging.MessagingConfiguration -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos class LinkPreview() { diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/visible/Profile.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/visible/Profile.kt index e670e2d322..b0a5eb3585 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/visible/Profile.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/visible/Profile.kt @@ -1,8 +1,7 @@ package org.session.libsession.messaging.messages.visible import com.google.protobuf.ByteString -import org.session.libsession.database.MessageDataProvider -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos class Profile() { diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/visible/Quote.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/visible/Quote.kt index e26527a9f2..71f76a09e4 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/visible/Quote.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/visible/Quote.kt @@ -1,9 +1,8 @@ package org.session.libsession.messaging.messages.visible import com.goterl.lazycode.lazysodium.BuildConfig -import org.session.libsession.database.MessageDataProvider import org.session.libsession.messaging.MessagingConfiguration -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos class Quote() { 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 1217bc8de3..d45a438049 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 @@ -5,7 +5,7 @@ import com.goterl.lazycode.lazysodium.BuildConfig import org.session.libsession.messaging.MessagingConfiguration import org.session.libsession.messaging.messages.Message -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos class VisibleMessage : Message() { diff --git a/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupAPI.kt b/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupAPI.kt index 908c0b30b3..61f1ad1df1 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupAPI.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupAPI.kt @@ -10,7 +10,7 @@ import org.session.libsession.messaging.MessagingConfiguration import org.session.libsession.messaging.utilities.DotNetAPI import org.session.libsession.messaging.fileserver.FileServerAPI -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.* import org.session.libsignal.service.loki.utilities.DownloadUtilities import org.session.libsignal.service.loki.utilities.retryIfNeeded diff --git a/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupMessage.kt b/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupMessage.kt index f7c0817ed8..01b4b73a70 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupMessage.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/opengroups/OpenGroupMessage.kt @@ -2,7 +2,7 @@ package org.session.libsession.messaging.opengroups import org.session.libsession.messaging.MessagingConfiguration import org.session.libsession.messaging.messages.visible.VisibleMessage -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Hex import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded import org.whispersystems.curve25519.Curve25519 diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt index e92082897f..49e40b3ffa 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt @@ -22,7 +22,7 @@ import org.session.libsession.utilities.GroupUtil import org.session.libsignal.utilities.Hex import org.session.libsession.utilities.SSKEnvironment import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.libsignal.util.guava.Optional import org.session.libsignal.service.api.messages.SignalServiceGroup import org.session.libsignal.service.internal.push.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 bdca4ef59f..3eff41157e 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 @@ -19,7 +19,7 @@ import org.session.libsession.snode.RawResponsePromise import org.session.libsession.snode.SnodeAPI import org.session.libsession.snode.SnodeMessage import org.session.libsession.utilities.SSKEnvironment -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.api.messages.SignalServiceAttachment import org.session.libsignal.service.internal.push.SignalServiceProtos import org.session.libsignal.utilities.Base64 diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/notifications/PushNotificationAPI.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/notifications/PushNotificationAPI.kt index bd154a24cc..61f4139efe 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/notifications/PushNotificationAPI.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/notifications/PushNotificationAPI.kt @@ -4,7 +4,7 @@ import nl.komponents.kovenant.functional.map import okhttp3.* import org.session.libsession.messaging.MessagingConfiguration import org.session.libsession.utilities.TextSecurePreferences -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.JsonUtil import org.session.libsignal.service.loki.api.onionrequests.OnionRequestAPI import org.session.libsignal.service.loki.utilities.retryIfNeeded diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/ClosedGroupPoller.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/ClosedGroupPoller.kt index a130f229f5..69af74ecd8 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/ClosedGroupPoller.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/ClosedGroupPoller.kt @@ -12,7 +12,7 @@ import org.session.libsession.messaging.utilities.MessageWrapper import org.session.libsession.snode.SnodeAPI import org.session.libsignal.utilities.successBackground -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Base64 import org.session.libsignal.service.loki.utilities.getRandomElementOrNull 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 d65079273f..748d2fdca5 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 @@ -13,7 +13,7 @@ import org.session.libsession.messaging.opengroups.OpenGroupAPI import org.session.libsession.messaging.opengroups.OpenGroupMessage import org.session.libsignal.utilities.successBackground -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos.* import java.util.* diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/Poller.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/Poller.kt index 3d4281410e..007dbbfd60 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/Poller.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/Poller.kt @@ -11,7 +11,7 @@ import org.session.libsession.snode.Snode import org.session.libsession.snode.SnodeAPI import org.session.libsession.snode.SnodeConfiguration -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Base64 import java.security.SecureRandom 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 1e639cdb84..1c9b48d775 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 @@ -36,7 +36,7 @@ import org.session.libsession.messaging.threads.recipients.RecipientProvider.Rec import org.session.libsession.utilities.TextSecurePreferences; import org.session.libsession.utilities.Util; import org.session.libsession.utilities.color.MaterialColor; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.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.avatars.ContactColors; diff --git a/libsession/src/main/java/org/session/libsession/messaging/utilities/DotNetAPI.kt b/libsession/src/main/java/org/session/libsession/messaging/utilities/DotNetAPI.kt index 10408398f1..5a828784e2 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/utilities/DotNetAPI.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/utilities/DotNetAPI.kt @@ -11,7 +11,7 @@ import org.session.libsession.snode.OnionRequestAPI import org.session.libsession.snode.SnodeAPI import org.session.libsession.messaging.fileserver.FileServerAPI -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.libsignal.loki.DiffieHellman import org.session.libsignal.service.api.crypto.ProfileCipherOutputStream import org.session.libsignal.service.api.messages.SignalServiceAttachment diff --git a/libsession/src/main/java/org/session/libsession/messaging/utilities/MessageWrapper.kt b/libsession/src/main/java/org/session/libsession/messaging/utilities/MessageWrapper.kt index 452cc5a848..9305852258 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/utilities/MessageWrapper.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/utilities/MessageWrapper.kt @@ -1,7 +1,7 @@ package org.session.libsession.messaging.utilities import com.google.protobuf.ByteString -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos.Envelope import org.session.libsignal.service.internal.websocket.WebSocketProtos.WebSocketMessage import org.session.libsignal.service.internal.websocket.WebSocketProtos.WebSocketRequestMessage diff --git a/libsession/src/main/java/org/session/libsession/messaging/utilities/UnidentifiedAccessUtil.kt b/libsession/src/main/java/org/session/libsession/messaging/utilities/UnidentifiedAccessUtil.kt index 39558e2ce2..671189778f 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/utilities/UnidentifiedAccessUtil.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/utilities/UnidentifiedAccessUtil.kt @@ -5,7 +5,7 @@ import com.goterl.lazycode.lazysodium.SodiumAndroid import org.session.libsession.messaging.MessagingConfiguration -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.metadata.SignalProtos import org.session.libsignal.metadata.certificate.InvalidCertificateException import org.session.libsignal.service.api.crypto.UnidentifiedAccess diff --git a/libsession/src/main/java/org/session/libsession/snode/OnionRequestAPI.kt b/libsession/src/main/java/org/session/libsession/snode/OnionRequestAPI.kt index 138efcfc75..8ab1c33dc5 100644 --- a/libsession/src/main/java/org/session/libsession/snode/OnionRequestAPI.kt +++ b/libsession/src/main/java/org/session/libsession/snode/OnionRequestAPI.kt @@ -7,7 +7,7 @@ import nl.komponents.kovenant.functional.bind import nl.komponents.kovenant.functional.map import okhttp3.Request import org.session.libsession.utilities.AESGCM -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Base64 import org.session.libsignal.utilities.* import org.session.libsignal.service.loki.api.* diff --git a/libsession/src/main/java/org/session/libsession/snode/SnodeAPI.kt b/libsession/src/main/java/org/session/libsession/snode/SnodeAPI.kt index b9592f28f6..c16e3a57a6 100644 --- a/libsession/src/main/java/org/session/libsession/snode/SnodeAPI.kt +++ b/libsession/src/main/java/org/session/libsession/snode/SnodeAPI.kt @@ -8,7 +8,7 @@ import nl.komponents.kovenant.functional.map import org.session.libsession.snode.utilities.getRandomElement -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.loki.api.utilities.HTTP import org.session.libsignal.service.loki.utilities.prettifiedDescription import org.session.libsignal.service.loki.utilities.retryIfNeeded 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 2c42fb2a24..0576265a24 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt @@ -9,7 +9,7 @@ import androidx.annotation.ArrayRes import androidx.core.app.NotificationCompat import org.session.libsession.R import org.session.libsession.utilities.preferences.NotificationPrivacyPreference -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import java.io.IOException import java.util.* diff --git a/libsession/src/main/java/org/session/libsession/utilities/ThemeUtil.java b/libsession/src/main/java/org/session/libsession/utilities/ThemeUtil.java index 144f10b452..6aaad6a050 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/ThemeUtil.java +++ b/libsession/src/main/java/org/session/libsession/utilities/ThemeUtil.java @@ -13,7 +13,7 @@ import androidx.annotation.NonNull; import androidx.annotation.StyleRes; import androidx.appcompat.view.ContextThemeWrapper; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsession.R; diff --git a/libsession/src/main/java/org/session/libsession/utilities/Util.kt b/libsession/src/main/java/org/session/libsession/utilities/Util.kt index 61f008e287..3672ae2553 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/Util.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/Util.kt @@ -16,7 +16,7 @@ import android.text.SpannableString import android.text.TextUtils import android.text.style.StyleSpan import org.session.libsession.messaging.threads.Address -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Base64 import java.io.* import java.nio.charset.StandardCharsets diff --git a/libsession/src/main/java/org/session/libsession/utilities/dynamiclanguage/DynamicLanguageActivityHelper.java b/libsession/src/main/java/org/session/libsession/utilities/dynamiclanguage/DynamicLanguageActivityHelper.java index 8f1b20fed1..3e79329050 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/dynamiclanguage/DynamicLanguageActivityHelper.java +++ b/libsession/src/main/java/org/session/libsession/utilities/dynamiclanguage/DynamicLanguageActivityHelper.java @@ -5,7 +5,7 @@ import android.app.Activity; import androidx.annotation.MainThread; import androidx.core.os.ConfigurationCompat; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import java.util.Locale; diff --git a/libsignal/build.gradle b/libsignal/build.gradle index e87d4b6a15..46788a95ad 100644 --- a/libsignal/build.gradle +++ b/libsignal/build.gradle @@ -44,6 +44,7 @@ android { } dependencies { + implementation "androidx.annotation:annotation:1.1.0" implementation "com.google.protobuf:protobuf-java:$protobufVersion" implementation "com.googlecode.libphonenumber:libphonenumber:8.10.7" diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/SessionBuilder.java b/libsignal/src/main/java/org/session/libsignal/libsignal/SessionBuilder.java index 21cf144a01..75c4286e89 100644 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/SessionBuilder.java +++ b/libsignal/src/main/java/org/session/libsignal/libsignal/SessionBuilder.java @@ -9,7 +9,7 @@ package org.session.libsignal.libsignal; import org.session.libsignal.libsignal.ecc.Curve; import org.session.libsignal.libsignal.ecc.ECKeyPair; import org.session.libsignal.libsignal.ecc.ECPublicKey; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.protocol.PreKeySignalMessage; import org.session.libsignal.libsignal.protocol.SignalMessage; import org.session.libsignal.libsignal.ratchet.AliceSignalProtocolParameters; diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/logging/Log.java b/libsignal/src/main/java/org/session/libsignal/libsignal/logging/Log.java deleted file mode 100644 index 79b70b2306..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/logging/Log.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ -package org.session.libsignal.libsignal.logging; - -import org.session.libsignal.libsignal.logging.SignalProtocolLogger; -import org.session.libsignal.libsignal.logging.SignalProtocolLoggerProvider; - -import java.io.PrintWriter; -import java.io.StringWriter; -import java.net.UnknownHostException; - -public class Log { - - private Log() {} - - public static void v(String tag, String msg) { - log(SignalProtocolLogger.VERBOSE, tag, msg); - } - - public static void v(String tag, String msg, Throwable tr) { - log(SignalProtocolLogger.VERBOSE, tag, msg + '\n' + getStackTraceString(tr)); - } - - public static void d(String tag, String msg) { - log(SignalProtocolLogger.DEBUG, tag, msg); - } - - public static void d(String tag, String msg, Throwable tr) { - log(SignalProtocolLogger.DEBUG, tag, msg + '\n' + getStackTraceString(tr)); - } - - public static void i(String tag, String msg) { - log(SignalProtocolLogger.INFO, tag, msg); - } - - public static void i(String tag, String msg, Throwable tr) { - log(SignalProtocolLogger.INFO, tag, msg + '\n' + getStackTraceString(tr)); - } - - public static void w(String tag, String msg) { - log(SignalProtocolLogger.WARN, tag, msg); - } - - public static void w(String tag, String msg, Throwable tr) { - log(SignalProtocolLogger.WARN, tag, msg + '\n' + getStackTraceString(tr)); - } - - public static void w(String tag, Throwable tr) { - log(SignalProtocolLogger.WARN, tag, getStackTraceString(tr)); - } - - public static void e(String tag, String msg) { - log(SignalProtocolLogger.ERROR, tag, msg); - } - - public static void e(String tag, String msg, Throwable tr) { - log(SignalProtocolLogger.ERROR, tag, msg + '\n' + getStackTraceString(tr)); - } - - private static String getStackTraceString(Throwable tr) { - if (tr == null) { - return ""; - } - - // This is to reduce the amount of log spew that apps do in the non-error - // condition of the network being unavailable. - Throwable t = tr; - while (t != null) { - if (t instanceof UnknownHostException) { - return ""; - } - t = t.getCause(); - } - - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - tr.printStackTrace(pw); - pw.flush(); - return sw.toString(); - } - - private static void log(int priority, String tag, String msg) { - SignalProtocolLogger logger = SignalProtocolLoggerProvider.getProvider(); - - if (logger != null) { - logger.log(priority, tag, msg); - } - } - - -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/logging/SignalProtocolLogger.java b/libsignal/src/main/java/org/session/libsignal/libsignal/logging/SignalProtocolLogger.java deleted file mode 100644 index 4f71b42a31..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/logging/SignalProtocolLogger.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ -package org.session.libsignal.libsignal.logging; - -public interface SignalProtocolLogger { - - public static final int VERBOSE = 2; - public static final int DEBUG = 3; - public static final int INFO = 4; - public static final int WARN = 5; - public static final int ERROR = 6; - public static final int ASSERT = 7; - - public void log(int priority, String tag, String message); -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/logging/SignalProtocolLoggerProvider.java b/libsignal/src/main/java/org/session/libsignal/libsignal/logging/SignalProtocolLoggerProvider.java deleted file mode 100644 index 5ca9d9b560..0000000000 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/logging/SignalProtocolLoggerProvider.java +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ -package org.session.libsignal.libsignal.logging; - -public class SignalProtocolLoggerProvider { - - private static SignalProtocolLogger provider; - - public static SignalProtocolLogger getProvider() { - return provider; - } - - public static void setProvider(SignalProtocolLogger provider) { - SignalProtocolLoggerProvider.provider = provider; - } -} diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/loki/ClosedGroupCiphertextMessage.kt b/libsignal/src/main/java/org/session/libsignal/libsignal/loki/ClosedGroupCiphertextMessage.kt index 84d8b6c145..00f3446b22 100644 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/loki/ClosedGroupCiphertextMessage.kt +++ b/libsignal/src/main/java/org/session/libsignal/libsignal/loki/ClosedGroupCiphertextMessage.kt @@ -1,7 +1,7 @@ package org.session.libsignal.libsignal.loki import com.google.protobuf.ByteString -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.libsignal.protocol.CiphertextMessage import org.session.libsignal.libsignal.protocol.SignalProtos diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/state/SessionState.java b/libsignal/src/main/java/org/session/libsignal/libsignal/state/SessionState.java index e3f2efafed..a7a9c39388 100644 --- a/libsignal/src/main/java/org/session/libsignal/libsignal/state/SessionState.java +++ b/libsignal/src/main/java/org/session/libsignal/libsignal/state/SessionState.java @@ -17,7 +17,7 @@ import org.session.libsignal.libsignal.ecc.ECKeyPair; import org.session.libsignal.libsignal.ecc.ECPrivateKey; import org.session.libsignal.libsignal.ecc.ECPublicKey; import org.session.libsignal.libsignal.kdf.HKDF; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.ratchet.ChainKey; import org.session.libsignal.libsignal.ratchet.MessageKeys; import org.session.libsignal.libsignal.ratchet.RootKey; diff --git a/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceAccountManager.java b/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceAccountManager.java index 331b81d215..cd64b0b9a6 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceAccountManager.java +++ b/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceAccountManager.java @@ -15,7 +15,7 @@ import org.session.libsignal.libsignal.IdentityKey; import org.session.libsignal.libsignal.IdentityKeyPair; import org.session.libsignal.libsignal.InvalidKeyException; import org.session.libsignal.libsignal.ecc.ECPublicKey; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.state.PreKeyRecord; import org.session.libsignal.libsignal.state.SignedPreKeyRecord; import org.session.libsignal.libsignal.util.Pair; diff --git a/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceMessageSender.java b/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceMessageSender.java index 48ca7244f7..f0a9d2d0ec 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceMessageSender.java +++ b/libsignal/src/main/java/org/session/libsignal/service/api/SignalServiceMessageSender.java @@ -10,7 +10,7 @@ import com.google.protobuf.InvalidProtocolBufferException; import org.jetbrains.annotations.Nullable; import org.session.libsignal.libsignal.ecc.ECKeyPair; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.loki.SessionResetProtocol; import org.session.libsignal.libsignal.state.SignalProtocolStore; import org.session.libsignal.libsignal.util.guava.Optional; diff --git a/libsignal/src/main/java/org/session/libsignal/service/api/messages/SignalServiceEnvelope.java b/libsignal/src/main/java/org/session/libsignal/service/api/messages/SignalServiceEnvelope.java index 70727c86d5..10e799959b 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/api/messages/SignalServiceEnvelope.java +++ b/libsignal/src/main/java/org/session/libsignal/service/api/messages/SignalServiceEnvelope.java @@ -9,7 +9,7 @@ package org.session.libsignal.service.api.messages; import com.google.protobuf.ByteString; import org.session.libsignal.libsignal.InvalidVersionException; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.service.api.push.SignalServiceAddress; import org.session.libsignal.service.internal.push.SignalServiceProtos.Envelope; import org.session.libsignal.utilities.Base64; diff --git a/libsignal/src/main/java/org/session/libsignal/service/api/messages/multidevice/DeviceContactsInputStream.java b/libsignal/src/main/java/org/session/libsignal/service/api/messages/multidevice/DeviceContactsInputStream.java index bec528536a..dbec6495ec 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/api/messages/multidevice/DeviceContactsInputStream.java +++ b/libsignal/src/main/java/org/session/libsignal/service/api/messages/multidevice/DeviceContactsInputStream.java @@ -9,7 +9,7 @@ package org.session.libsignal.service.api.messages.multidevice; import org.session.libsignal.libsignal.IdentityKey; import org.session.libsignal.libsignal.InvalidKeyException; import org.session.libsignal.libsignal.InvalidMessageException; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsignal.service.api.messages.SignalServiceAttachmentStream; import org.session.libsignal.service.internal.push.SignalServiceProtos; diff --git a/libsignal/src/main/java/org/session/libsignal/service/api/util/PhoneNumberFormatter.java b/libsignal/src/main/java/org/session/libsignal/service/api/util/PhoneNumberFormatter.java index 7ef072b63e..123ae3b6da 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/api/util/PhoneNumberFormatter.java +++ b/libsignal/src/main/java/org/session/libsignal/service/api/util/PhoneNumberFormatter.java @@ -11,8 +11,7 @@ import com.google.i18n.phonenumbers.PhoneNumberUtil; import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat; import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber; -import org.session.libsignal.libsignal.logging.Log; -import org.session.libsignal.service.api.util.InvalidNumberException; +import org.session.libsignal.utilities.logging.Log; import java.util.Locale; import java.util.regex.Pattern; diff --git a/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushServiceSocket.java b/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushServiceSocket.java index e688173b0a..fa98b51b20 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushServiceSocket.java +++ b/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushServiceSocket.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import org.session.libsignal.libsignal.IdentityKey; import org.session.libsignal.libsignal.ecc.ECPublicKey; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.state.PreKeyBundle; import org.session.libsignal.libsignal.state.PreKeyRecord; import org.session.libsignal.libsignal.state.SignedPreKeyRecord; diff --git a/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushTransportDetails.java b/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushTransportDetails.java index 4114147d2b..03058a69be 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushTransportDetails.java +++ b/libsignal/src/main/java/org/session/libsignal/service/internal/push/PushTransportDetails.java @@ -7,7 +7,7 @@ package org.session.libsignal.service.internal.push; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; public class PushTransportDetails { diff --git a/libsignal/src/main/java/org/session/libsignal/service/internal/websocket/WebSocketConnection.java b/libsignal/src/main/java/org/session/libsignal/service/internal/websocket/WebSocketConnection.java index 329b65c6a4..d6c7fea9e0 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/internal/websocket/WebSocketConnection.java +++ b/libsignal/src/main/java/org/session/libsignal/service/internal/websocket/WebSocketConnection.java @@ -2,7 +2,7 @@ package org.session.libsignal.service.internal.websocket; import com.google.protobuf.InvalidProtocolBufferException; -import org.session.libsignal.libsignal.logging.Log; +import org.session.libsignal.utilities.logging.Log; import org.session.libsignal.libsignal.util.Pair; import org.session.libsignal.libsignal.util.guava.Optional; import org.session.libsignal.service.api.push.TrustStore; diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/DotNetAPI.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/DotNetAPI.kt index 0d5591335a..fa1326686a 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/DotNetAPI.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/DotNetAPI.kt @@ -8,7 +8,7 @@ import okhttp3.MediaType import okhttp3.MultipartBody import okhttp3.Request import okhttp3.RequestBody -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.libsignal.loki.DiffieHellman import org.session.libsignal.service.api.crypto.ProfileCipherOutputStream import org.session.libsignal.service.api.push.exceptions.NonSuccessfulResponseCodeException diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/LokiMessage.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/LokiMessage.kt index 11611218e5..b3c82aa7fb 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/LokiMessage.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/LokiMessage.kt @@ -2,7 +2,7 @@ package org.session.libsignal.service.loki.api import nl.komponents.kovenant.Promise import nl.komponents.kovenant.deferred -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Base64 import org.session.libsignal.service.loki.api.crypto.ProofOfWork import org.session.libsignal.service.loki.protocol.meta.TTLUtilities diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/MessageWrapper.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/MessageWrapper.kt index c8c498a869..2cb8dd0440 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/MessageWrapper.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/MessageWrapper.kt @@ -1,7 +1,7 @@ package org.session.libsignal.service.loki.api import com.google.protobuf.ByteString -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos.Envelope import org.session.libsignal.utilities.Base64 import org.session.libsignal.service.internal.websocket.WebSocketProtos.WebSocketMessage diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/Poller.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/Poller.kt index 1bc159af89..38faea7340 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/Poller.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/Poller.kt @@ -2,7 +2,7 @@ package org.session.libsignal.service.loki.api import nl.komponents.kovenant.* import nl.komponents.kovenant.functional.bind -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos import org.session.libsignal.service.loki.database.LokiAPIDatabaseProtocol import java.security.SecureRandom diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/PushNotificationAPI.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/PushNotificationAPI.kt index 36424450de..28c370f503 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/PushNotificationAPI.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/PushNotificationAPI.kt @@ -2,7 +2,7 @@ package org.session.libsignal.service.loki.api import nl.komponents.kovenant.functional.map import okhttp3.* -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.JsonUtil import org.session.libsignal.service.loki.api.onionrequests.OnionRequestAPI import org.session.libsignal.service.loki.utilities.retryIfNeeded diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/SnodeAPI.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/SnodeAPI.kt index 6932653733..48972afab9 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/SnodeAPI.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/SnodeAPI.kt @@ -6,7 +6,7 @@ import nl.komponents.kovenant.deferred import nl.komponents.kovenant.functional.bind import nl.komponents.kovenant.functional.map import nl.komponents.kovenant.task -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.internal.push.SignalServiceProtos.Envelope import org.session.libsignal.utilities.Base64 import org.session.libsignal.service.loki.api.onionrequests.OnionRequestAPI diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/SwarmAPI.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/SwarmAPI.kt index 209836a93b..f42f772c1e 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/SwarmAPI.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/SwarmAPI.kt @@ -5,7 +5,7 @@ import nl.komponents.kovenant.deferred import nl.komponents.kovenant.functional.bind import nl.komponents.kovenant.functional.map import nl.komponents.kovenant.task -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.loki.api.utilities.HTTP import org.session.libsignal.service.loki.database.LokiAPIDatabaseProtocol import org.session.libsignal.utilities.ThreadUtils diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/crypto/ProofOfWork.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/crypto/ProofOfWork.kt index 69cd9cafae..f1bfc59cc6 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/crypto/ProofOfWork.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/crypto/ProofOfWork.kt @@ -1,6 +1,6 @@ package org.session.libsignal.service.loki.api.crypto -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Base64 import org.session.libsignal.service.loki.api.SnodeAPI import java.math.BigInteger diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/fileserver/FileServerAPI.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/fileserver/FileServerAPI.kt index 575595fca4..82e04e5a84 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/fileserver/FileServerAPI.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/fileserver/FileServerAPI.kt @@ -3,7 +3,7 @@ package org.session.libsignal.service.loki.api.fileserver import nl.komponents.kovenant.Promise import nl.komponents.kovenant.functional.map import okhttp3.Request -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Base64 import org.session.libsignal.utilities.JsonUtil import org.session.libsignal.service.loki.api.LokiDotNetAPI diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/onionrequests/OnionRequestAPI.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/onionrequests/OnionRequestAPI.kt index 08a43506dc..efeab36fa4 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/onionrequests/OnionRequestAPI.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/onionrequests/OnionRequestAPI.kt @@ -6,7 +6,7 @@ import nl.komponents.kovenant.deferred import nl.komponents.kovenant.functional.bind import nl.komponents.kovenant.functional.map import okhttp3.Request -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Base64 import org.session.libsignal.utilities.JsonUtil import org.session.libsignal.service.loki.api.* diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatAPI.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatAPI.kt index a592cdcbd2..3a4c58db0b 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatAPI.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatAPI.kt @@ -5,7 +5,7 @@ import nl.komponents.kovenant.Promise import nl.komponents.kovenant.deferred import nl.komponents.kovenant.functional.map import nl.komponents.kovenant.then -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Base64 import org.session.libsignal.utilities.Hex import org.session.libsignal.utilities.JsonUtil diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatMessage.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatMessage.kt index b10cbaabd3..4fdc75a69a 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatMessage.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/opengroups/PublicChatMessage.kt @@ -1,7 +1,7 @@ package org.session.libsignal.service.loki.api.opengroups import org.whispersystems.curve25519.Curve25519 -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Hex import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/api/utilities/HTTP.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/api/utilities/HTTP.kt index 9388df8a1e..29d1cddb6e 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/api/utilities/HTTP.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/api/utilities/HTTP.kt @@ -1,7 +1,7 @@ package org.session.libsignal.service.loki.api.utilities import okhttp3.* -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.JsonUtil import java.security.SecureRandom import java.security.cert.X509Certificate diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupSenderKey.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupSenderKey.kt index acdca75bb7..bfbebf8c5b 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupSenderKey.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/ClosedGroupSenderKey.kt @@ -1,7 +1,7 @@ package org.session.libsignal.service.loki.protocol.closedgroups import com.google.protobuf.ByteString -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Hex import org.session.libsignal.service.internal.push.SignalServiceProtos import org.session.libsignal.utilities.JsonUtil diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/SharedSenderKeysImplementation.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/SharedSenderKeysImplementation.kt index 4a5fe2335e..80a9379928 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/SharedSenderKeysImplementation.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/closedgroups/SharedSenderKeysImplementation.kt @@ -3,7 +3,7 @@ package org.session.libsignal.service.loki.protocol.closedgroups import org.session.libsignal.libsignal.ecc.DjbECPrivateKey import org.session.libsignal.libsignal.ecc.DjbECPublicKey import org.session.libsignal.libsignal.ecc.ECKeyPair -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.libsignal.util.ByteUtil import org.session.libsignal.utilities.Hex import org.session.libsignal.service.internal.util.Util diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/sessionmanagement/SessionManagementProtocol.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/sessionmanagement/SessionManagementProtocol.kt index 6a91d964d2..fa8b02c828 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/sessionmanagement/SessionManagementProtocol.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/sessionmanagement/SessionManagementProtocol.kt @@ -1,16 +1,12 @@ package org.session.libsignal.service.loki.protocol.sessionmanagement -import org.session.libsignal.libsignal.SignalProtocolAddress -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.libsignal.loki.SessionResetProtocol import org.session.libsignal.libsignal.loki.SessionResetStatus import org.session.libsignal.libsignal.state.SignalProtocolStore import org.session.libsignal.libsignal.util.guava.Optional import org.session.libsignal.service.api.SignalServiceMessageSender -import org.session.libsignal.service.api.messages.SignalServiceDataMessage import org.session.libsignal.service.api.push.SignalServiceAddress -import org.session.libsignal.service.loki.api.SnodeAPI -import org.session.libsignal.service.loki.database.LokiThreadDatabaseProtocol import org.session.libsignal.service.loki.protocol.closedgroups.SharedSenderKeysDatabaseProtocol public class SessionManagementProtocol(private val sessionResetImpl: SessionResetProtocol, private val sskDatabase: SharedSenderKeysDatabaseProtocol, diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/shelved/multidevice/DeviceLink.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/shelved/multidevice/DeviceLink.kt index 6b3af90e6e..f14deef4a6 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/shelved/multidevice/DeviceLink.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/protocol/shelved/multidevice/DeviceLink.kt @@ -1,7 +1,7 @@ package org.session.libsignal.service.loki.protocol.shelved.multidevice import org.whispersystems.curve25519.Curve25519 -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.utilities.Base64 import org.session.libsignal.utilities.Hex import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded diff --git a/libsignal/src/main/java/org/session/libsignal/service/loki/utilities/DownloadUtilities.kt b/libsignal/src/main/java/org/session/libsignal/service/loki/utilities/DownloadUtilities.kt index a85e079e12..1986d2c2db 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/loki/utilities/DownloadUtilities.kt +++ b/libsignal/src/main/java/org/session/libsignal/service/loki/utilities/DownloadUtilities.kt @@ -2,7 +2,7 @@ package org.session.libsignal.service.loki.utilities import okhttp3.HttpUrl import okhttp3.Request -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import org.session.libsignal.service.api.messages.SignalServiceAttachment import org.session.libsignal.service.api.push.exceptions.NonSuccessfulResponseCodeException import org.session.libsignal.service.api.push.exceptions.PushNetworkException diff --git a/libsignal/src/main/java/org/session/libsignal/utilities/JsonUtil.java b/libsignal/src/main/java/org/session/libsignal/utilities/JsonUtil.java index 5d4cc00a6f..b20a870d10 100644 --- a/libsignal/src/main/java/org/session/libsignal/utilities/JsonUtil.java +++ b/libsignal/src/main/java/org/session/libsignal/utilities/JsonUtil.java @@ -16,8 +16,7 @@ import org.json.JSONException; import org.json.JSONObject; import org.session.libsignal.libsignal.IdentityKey; import org.session.libsignal.libsignal.InvalidKeyException; -import org.session.libsignal.libsignal.logging.Log; -import org.session.libsignal.utilities.Base64; +import org.session.libsignal.utilities.logging.Log; import java.io.IOException; import java.io.InputStream; diff --git a/libsignal/src/main/java/org/session/libsignal/utilities/PromiseUtilities.kt b/libsignal/src/main/java/org/session/libsignal/utilities/PromiseUtilities.kt index 522de79490..8fe7ce7355 100644 --- a/libsignal/src/main/java/org/session/libsignal/utilities/PromiseUtilities.kt +++ b/libsignal/src/main/java/org/session/libsignal/utilities/PromiseUtilities.kt @@ -6,7 +6,7 @@ import nl.komponents.kovenant.Kovenant import nl.komponents.kovenant.Promise import nl.komponents.kovenant.deferred import nl.komponents.kovenant.jvm.asDispatcher -import org.session.libsignal.libsignal.logging.Log +import org.session.libsignal.utilities.logging.Log import java.util.concurrent.Executors import java.util.concurrent.TimeoutException diff --git a/libsignal/src/main/java/org/session/libsignal/utilities/externalstorage/ExternalStorageUtil.kt b/libsignal/src/main/java/org/session/libsignal/utilities/externalstorage/ExternalStorageUtil.kt new file mode 100644 index 0000000000..fc6c858fd9 --- /dev/null +++ b/libsignal/src/main/java/org/session/libsignal/utilities/externalstorage/ExternalStorageUtil.kt @@ -0,0 +1,55 @@ +package org.session.libsignal.utilities.externalstorage + +import android.content.Context +import android.os.Environment +import java.io.File + +object ExternalStorageUtil { + const val DIRECTORY_BACKUPS = "Backups" + + /** @see Context.getExternalFilesDir + */ + @Throws(NoExternalStorageException::class) + fun getDir(context: Context, type: String?): File { + return context.getExternalFilesDir(type) + ?: throw NoExternalStorageException("External storage dir is currently unavailable: $type") + } + + @Throws(NoExternalStorageException::class) + fun getBackupDir(context: Context): File { + return getDir(context, DIRECTORY_BACKUPS) + } + + @Throws(NoExternalStorageException::class) + fun getVideoDir(context: Context): File { + return getDir(context, Environment.DIRECTORY_MOVIES) + } + + @Throws(NoExternalStorageException::class) + fun getAudioDir(context: Context): File { + return getDir(context, Environment.DIRECTORY_MUSIC) + } + + @JvmStatic + @Throws(NoExternalStorageException::class) + fun getImageDir(context: Context): File { + return getDir(context, Environment.DIRECTORY_PICTURES) + } + + @Throws(NoExternalStorageException::class) + fun getDownloadDir(context: Context): File { + return getDir(context, Environment.DIRECTORY_DOWNLOADS) + } + + fun getCacheDir(context: Context): File? { + return context.externalCacheDir + } + + @JvmStatic + fun getCleanFileName(fileName: String?): String? { + var fileName = fileName ?: return null + fileName = fileName.replace('\u202D', '\uFFFD') + fileName = fileName.replace('\u202E', '\uFFFD') + return fileName + } +} \ No newline at end of file diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/NoExternalStorageException.java b/libsignal/src/main/java/org/session/libsignal/utilities/externalstorage/NoExternalStorageException.java similarity index 95% rename from app/src/main/java/org/thoughtcrime/securesms/database/NoExternalStorageException.java rename to libsignal/src/main/java/org/session/libsignal/utilities/externalstorage/NoExternalStorageException.java index 75b266b3b7..7f0de9510a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/NoExternalStorageException.java +++ b/libsignal/src/main/java/org/session/libsignal/utilities/externalstorage/NoExternalStorageException.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.thoughtcrime.securesms.database; +package org.session.libsignal.utilities.externalstorage; public class NoExternalStorageException extends Exception { diff --git a/app/src/main/java/org/thoughtcrime/securesms/logging/Log.java b/libsignal/src/main/java/org/session/libsignal/utilities/logging/Log.java similarity index 98% rename from app/src/main/java/org/thoughtcrime/securesms/logging/Log.java rename to libsignal/src/main/java/org/session/libsignal/utilities/logging/Log.java index ea4e106861..0f6b74ffb2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/logging/Log.java +++ b/libsignal/src/main/java/org/session/libsignal/utilities/logging/Log.java @@ -1,4 +1,4 @@ -package org.thoughtcrime.securesms.logging; +package org.session.libsignal.utilities.logging; import androidx.annotation.MainThread;