From 0db96d2dbcdf6a8456d3b4830245ad32b8b1f1f8 Mon Sep 17 00:00:00 2001 From: Niels Andriesse <9340958+nielsandriesse@users.noreply.github.com> Date: Thu, 21 May 2020 08:46:34 +1000 Subject: [PATCH 1/6] Update BUILDING.md --- BUILDING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index a9c3f96dc7..989ebe7bf5 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -56,7 +56,7 @@ Setting up a development environment 4. In the SDK Tools tab of the SDK Manager, make sure that the "Android Support Repository" is installed, and that the latest "Android SDK build-tools" are installed. Click "OK" to return to the Quickstart panel. 5. From the Quickstart panel, choose "Checkout from Version Control" then "git". 6. Paste the URL for the session-android project when prompted (https://github.com/loki-project/session-android.git). -7. Android studio should detect the presence of a project file and ask you whether to open it. Click "yes". +7. Android Studio should detect the presence of a project file and ask you whether to open it. Click "yes". 9. Default config options should be good enough. 9. Project initialisation and build should proceed. From b4f1640d0b1417d945f7abbe02eb654523ebd99b Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Mon, 25 May 2020 18:01:21 +1000 Subject: [PATCH 2/6] Potentially fix crash --- .../thoughtcrime/securesms/ApplicationContext.java | 4 ++-- .../securesms/loki/activities/HomeActivity.kt | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ApplicationContext.java b/src/org/thoughtcrime/securesms/ApplicationContext.java index 688db294a0..3ca54518d4 100644 --- a/src/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/org/thoughtcrime/securesms/ApplicationContext.java @@ -194,10 +194,10 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc FriendRequestProtocol.Companion.configureIfNeeded(apiDB, userPublicKey); MentionsManager.Companion.configureIfNeeded(userPublicKey, threadDB, userDB); SessionMetaProtocol.Companion.configureIfNeeded(apiDB, userPublicKey); - MultiDeviceProtocol.Companion.configureIfNeeded(apiDB); - SessionManagementProtocol.Companion.configureIfNeeded(sessionResetImpl, threadDB, this); SyncMessagesProtocol.Companion.configureIfNeeded(apiDB, userPublicKey); } + MultiDeviceProtocol.Companion.configureIfNeeded(apiDB); + SessionManagementProtocol.Companion.configureIfNeeded(sessionResetImpl, threadDB, this); setUpP2PAPIIfNeeded(); LokiPushNotificationAcknowledgement.Companion.configureIfNeeded(BuildConfig.DEBUG); if (setUpStorageAPIIfNeeded()) { diff --git a/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt index 48d287280d..52c7b054f7 100644 --- a/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt +++ b/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt @@ -154,21 +154,21 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe adapter.typingThreadIDs = threadIDs ?: setOf() }) // Set up remaining components if needed + val application = ApplicationContext.getInstance(this)d + val apiDB = DatabaseFactory.getLokiAPIDatabase(this) + val threadDB = DatabaseFactory.getLokiThreadDatabase(this) + val userDB = DatabaseFactory.getLokiUserDatabase(this) val userPublicKey = TextSecurePreferences.getLocalNumber(this) + val sessionResetImpl = LokiSessionResetImplementation(this) if (userPublicKey != null) { - val application = ApplicationContext.getInstance(this) - val apiDB = DatabaseFactory.getLokiAPIDatabase(this) - val threadDB = DatabaseFactory.getLokiThreadDatabase(this) - val userDB = DatabaseFactory.getLokiUserDatabase(this) - val sessionResetImpl = LokiSessionResetImplementation(this) FriendRequestProtocol.configureIfNeeded(apiDB, userPublicKey) MentionsManager.configureIfNeeded(userPublicKey, threadDB, userDB) SessionMetaProtocol.configureIfNeeded(apiDB, userPublicKey) - MultiDeviceProtocol.configureIfNeeded(apiDB) - SessionManagementProtocol.configureIfNeeded(sessionResetImpl, threadDB, application) SyncMessagesProtocol.configureIfNeeded(apiDB, userPublicKey) application.lokiPublicChatManager.startPollersIfNeeded() } + SessionManagementProtocol.configureIfNeeded(sessionResetImpl, threadDB, application) + MultiDeviceProtocol.configureIfNeeded(apiDB) // TODO: Temporary hack to unbork existing clients val allContacts = DatabaseFactory.getRecipientDatabase(this).allAddresses.map { MultiDeviceProtocol.shared.getMasterDevice(it.serialize()) ?: it.serialize() From 0c0c740bc883ceda99b56778e1812b999055f32d Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Tue, 26 May 2020 08:55:29 +1000 Subject: [PATCH 3/6] Fix build --- src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt index 52c7b054f7..a2c13c5f0a 100644 --- a/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt +++ b/src/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt @@ -154,7 +154,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe adapter.typingThreadIDs = threadIDs ?: setOf() }) // Set up remaining components if needed - val application = ApplicationContext.getInstance(this)d + val application = ApplicationContext.getInstance(this) val apiDB = DatabaseFactory.getLokiAPIDatabase(this) val threadDB = DatabaseFactory.getLokiThreadDatabase(this) val userDB = DatabaseFactory.getLokiUserDatabase(this) From 3d44816e4a2f0397bb93d1f675a599a954b07607 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Tue, 26 May 2020 09:03:41 +1000 Subject: [PATCH 4/6] Potentially fix crash --- .../securesms/ApplicationContext.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ApplicationContext.java b/src/org/thoughtcrime/securesms/ApplicationContext.java index 3ca54518d4..5d018bb56d 100644 --- a/src/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/org/thoughtcrime/securesms/ApplicationContext.java @@ -170,20 +170,10 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc initializeLogging(); initializeCrashHandling(); initializeDependencyInjection(); - initializeJobManager(); - initializeMessageRetrieval(); - initializeExpiringMessageManager(); - initializeTypingStatusRepository(); - initializeTypingStatusSender(); - initializeSignedPreKeyCheck(); - initializePeriodicTasks(); - initializeWebRtc(); - initializePendingMessages(); - initializeUnidentifiedDeliveryAbilityRefresh(); - initializeBlobProvider(); NotificationChannels.create(this); ProcessLifecycleOwner.get().getLifecycle().addObserver(this); // Loki + // ======== broadcaster = new Broadcaster(this); LokiAPIDatabase apiDB = DatabaseFactory.getLokiAPIDatabase(this); LokiThreadDatabase threadDB = DatabaseFactory.getLokiThreadDatabase(this); @@ -210,6 +200,18 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc lokiPublicChatManager = new LokiPublicChatManager(this); updateOpenGroupProfilePicturesIfNeeded(); registerForFCMIfNeeded(false); + // ======== + initializeJobManager(); + initializeMessageRetrieval(); + initializeExpiringMessageManager(); + initializeTypingStatusRepository(); + initializeTypingStatusSender(); + initializeSignedPreKeyCheck(); + initializePeriodicTasks(); + initializeWebRtc(); + initializePendingMessages(); + initializeUnidentifiedDeliveryAbilityRefresh(); + initializeBlobProvider(); } @Override From 23cd5b93965f95af7f62c6d9348cbe060d1ad2bf Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Tue, 26 May 2020 09:12:36 +1000 Subject: [PATCH 5/6] Update version number --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 392ad467f4..8aab757f08 100644 --- a/build.gradle +++ b/build.gradle @@ -190,8 +190,8 @@ dependencies { implementation "com.github.ybq:Android-SpinKit:1.4.0" } -def canonicalVersionCode = 49 -def canonicalVersionName = "1.1.0" +def canonicalVersionCode = 50 +def canonicalVersionName = "1.2.0" def postFixSize = 10 def abiPostFix = ['armeabi-v7a' : 1, From 617c8889000dfa7efc40b959da69f9f744c1f9b3 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Wed, 27 May 2020 13:34:05 +1000 Subject: [PATCH 6/6] Switch seed nodes --- res/xml/network_security_configuration.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/res/xml/network_security_configuration.xml b/res/xml/network_security_configuration.xml index cffc495059..85285232de 100644 --- a/res/xml/network_security_configuration.xml +++ b/res/xml/network_security_configuration.xml @@ -1,11 +1,6 @@ - 144.76.164.202 - storage.seed1.loki.network - storage.seed2.loki.network - public.loki.foundation - file-dev.lokinet.org 127.0.0.1 \ No newline at end of file