mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Merge branch 'dev' into translation
This commit is contained in:
commit
a750f4f9f1
@ -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.
|
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".
|
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).
|
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. Default config options should be good enough.
|
||||||
9. Project initialisation and build should proceed.
|
9. Project initialisation and build should proceed.
|
||||||
|
|
||||||
|
@ -190,8 +190,8 @@ dependencies {
|
|||||||
implementation "com.github.ybq:Android-SpinKit:1.4.0"
|
implementation "com.github.ybq:Android-SpinKit:1.4.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
def canonicalVersionCode = 49
|
def canonicalVersionCode = 50
|
||||||
def canonicalVersionName = "1.1.0"
|
def canonicalVersionName = "1.2.0"
|
||||||
|
|
||||||
def postFixSize = 10
|
def postFixSize = 10
|
||||||
def abiPostFix = ['armeabi-v7a' : 1,
|
def abiPostFix = ['armeabi-v7a' : 1,
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<network-security-config>
|
<network-security-config>
|
||||||
<domain-config cleartextTrafficPermitted="true">
|
<domain-config cleartextTrafficPermitted="true">
|
||||||
<domain includeSubdomains="true">144.76.164.202</domain>
|
|
||||||
<domain includeSubdomains="true">storage.seed1.loki.network</domain>
|
|
||||||
<domain includeSubdomains="true">storage.seed2.loki.network</domain>
|
|
||||||
<domain includeSubdomains="true">public.loki.foundation</domain>
|
|
||||||
<domain includeSubdomains="true">file-dev.lokinet.org</domain>
|
|
||||||
<domain includeSubdomains="true">127.0.0.1</domain>
|
<domain includeSubdomains="true">127.0.0.1</domain>
|
||||||
</domain-config>
|
</domain-config>
|
||||||
</network-security-config>
|
</network-security-config>
|
@ -170,20 +170,10 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
|||||||
initializeLogging();
|
initializeLogging();
|
||||||
initializeCrashHandling();
|
initializeCrashHandling();
|
||||||
initializeDependencyInjection();
|
initializeDependencyInjection();
|
||||||
initializeJobManager();
|
|
||||||
initializeMessageRetrieval();
|
|
||||||
initializeExpiringMessageManager();
|
|
||||||
initializeTypingStatusRepository();
|
|
||||||
initializeTypingStatusSender();
|
|
||||||
initializeSignedPreKeyCheck();
|
|
||||||
initializePeriodicTasks();
|
|
||||||
initializeWebRtc();
|
|
||||||
initializePendingMessages();
|
|
||||||
initializeUnidentifiedDeliveryAbilityRefresh();
|
|
||||||
initializeBlobProvider();
|
|
||||||
NotificationChannels.create(this);
|
NotificationChannels.create(this);
|
||||||
ProcessLifecycleOwner.get().getLifecycle().addObserver(this);
|
ProcessLifecycleOwner.get().getLifecycle().addObserver(this);
|
||||||
// Loki
|
// Loki
|
||||||
|
// ========
|
||||||
broadcaster = new Broadcaster(this);
|
broadcaster = new Broadcaster(this);
|
||||||
LokiAPIDatabase apiDB = DatabaseFactory.getLokiAPIDatabase(this);
|
LokiAPIDatabase apiDB = DatabaseFactory.getLokiAPIDatabase(this);
|
||||||
LokiThreadDatabase threadDB = DatabaseFactory.getLokiThreadDatabase(this);
|
LokiThreadDatabase threadDB = DatabaseFactory.getLokiThreadDatabase(this);
|
||||||
@ -194,10 +184,10 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
|||||||
FriendRequestProtocol.Companion.configureIfNeeded(apiDB, userPublicKey);
|
FriendRequestProtocol.Companion.configureIfNeeded(apiDB, userPublicKey);
|
||||||
MentionsManager.Companion.configureIfNeeded(userPublicKey, threadDB, userDB);
|
MentionsManager.Companion.configureIfNeeded(userPublicKey, threadDB, userDB);
|
||||||
SessionMetaProtocol.Companion.configureIfNeeded(apiDB, userPublicKey);
|
SessionMetaProtocol.Companion.configureIfNeeded(apiDB, userPublicKey);
|
||||||
MultiDeviceProtocol.Companion.configureIfNeeded(apiDB);
|
|
||||||
SessionManagementProtocol.Companion.configureIfNeeded(sessionResetImpl, threadDB, this);
|
|
||||||
SyncMessagesProtocol.Companion.configureIfNeeded(apiDB, userPublicKey);
|
SyncMessagesProtocol.Companion.configureIfNeeded(apiDB, userPublicKey);
|
||||||
}
|
}
|
||||||
|
MultiDeviceProtocol.Companion.configureIfNeeded(apiDB);
|
||||||
|
SessionManagementProtocol.Companion.configureIfNeeded(sessionResetImpl, threadDB, this);
|
||||||
setUpP2PAPIIfNeeded();
|
setUpP2PAPIIfNeeded();
|
||||||
LokiPushNotificationAcknowledgement.Companion.configureIfNeeded(BuildConfig.DEBUG);
|
LokiPushNotificationAcknowledgement.Companion.configureIfNeeded(BuildConfig.DEBUG);
|
||||||
if (setUpStorageAPIIfNeeded()) {
|
if (setUpStorageAPIIfNeeded()) {
|
||||||
@ -210,6 +200,18 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
|
|||||||
lokiPublicChatManager = new LokiPublicChatManager(this);
|
lokiPublicChatManager = new LokiPublicChatManager(this);
|
||||||
updateOpenGroupProfilePicturesIfNeeded();
|
updateOpenGroupProfilePicturesIfNeeded();
|
||||||
registerForFCMIfNeeded(false);
|
registerForFCMIfNeeded(false);
|
||||||
|
// ========
|
||||||
|
initializeJobManager();
|
||||||
|
initializeMessageRetrieval();
|
||||||
|
initializeExpiringMessageManager();
|
||||||
|
initializeTypingStatusRepository();
|
||||||
|
initializeTypingStatusSender();
|
||||||
|
initializeSignedPreKeyCheck();
|
||||||
|
initializePeriodicTasks();
|
||||||
|
initializeWebRtc();
|
||||||
|
initializePendingMessages();
|
||||||
|
initializeUnidentifiedDeliveryAbilityRefresh();
|
||||||
|
initializeBlobProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -154,21 +154,21 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
|
|||||||
adapter.typingThreadIDs = threadIDs ?: setOf()
|
adapter.typingThreadIDs = threadIDs ?: setOf()
|
||||||
})
|
})
|
||||||
// Set up remaining components if needed
|
// Set up remaining components if needed
|
||||||
val userPublicKey = TextSecurePreferences.getLocalNumber(this)
|
|
||||||
if (userPublicKey != null) {
|
|
||||||
val application = ApplicationContext.getInstance(this)
|
val application = ApplicationContext.getInstance(this)
|
||||||
val apiDB = DatabaseFactory.getLokiAPIDatabase(this)
|
val apiDB = DatabaseFactory.getLokiAPIDatabase(this)
|
||||||
val threadDB = DatabaseFactory.getLokiThreadDatabase(this)
|
val threadDB = DatabaseFactory.getLokiThreadDatabase(this)
|
||||||
val userDB = DatabaseFactory.getLokiUserDatabase(this)
|
val userDB = DatabaseFactory.getLokiUserDatabase(this)
|
||||||
|
val userPublicKey = TextSecurePreferences.getLocalNumber(this)
|
||||||
val sessionResetImpl = LokiSessionResetImplementation(this)
|
val sessionResetImpl = LokiSessionResetImplementation(this)
|
||||||
|
if (userPublicKey != null) {
|
||||||
FriendRequestProtocol.configureIfNeeded(apiDB, userPublicKey)
|
FriendRequestProtocol.configureIfNeeded(apiDB, userPublicKey)
|
||||||
MentionsManager.configureIfNeeded(userPublicKey, threadDB, userDB)
|
MentionsManager.configureIfNeeded(userPublicKey, threadDB, userDB)
|
||||||
SessionMetaProtocol.configureIfNeeded(apiDB, userPublicKey)
|
SessionMetaProtocol.configureIfNeeded(apiDB, userPublicKey)
|
||||||
MultiDeviceProtocol.configureIfNeeded(apiDB)
|
|
||||||
SessionManagementProtocol.configureIfNeeded(sessionResetImpl, threadDB, application)
|
|
||||||
SyncMessagesProtocol.configureIfNeeded(apiDB, userPublicKey)
|
SyncMessagesProtocol.configureIfNeeded(apiDB, userPublicKey)
|
||||||
application.lokiPublicChatManager.startPollersIfNeeded()
|
application.lokiPublicChatManager.startPollersIfNeeded()
|
||||||
}
|
}
|
||||||
|
SessionManagementProtocol.configureIfNeeded(sessionResetImpl, threadDB, application)
|
||||||
|
MultiDeviceProtocol.configureIfNeeded(apiDB)
|
||||||
// TODO: Temporary hack to unbork existing clients
|
// TODO: Temporary hack to unbork existing clients
|
||||||
val allContacts = DatabaseFactory.getRecipientDatabase(this).allAddresses.map {
|
val allContacts = DatabaseFactory.getRecipientDatabase(this).allAddresses.map {
|
||||||
MultiDeviceProtocol.shared.getMasterDevice(it.serialize()) ?: it.serialize()
|
MultiDeviceProtocol.shared.getMasterDevice(it.serialize()) ?: it.serialize()
|
||||||
|
Loading…
Reference in New Issue
Block a user