diff --git a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java index b7f5b797de..9e55810f50 100644 --- a/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java +++ b/src/org/thoughtcrime/securesms/ApplicationPreferencesActivity.java @@ -26,6 +26,7 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; +import android.os.AsyncTask; import android.os.Build; import android.os.Build.VERSION; import android.os.Bundle; @@ -394,7 +395,7 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA } @Override public void sendPairingAuthorizedMessage(@NotNull PairingAuthorisation pairingAuthorisation) { - MultiDeviceUtilities.signAndSendPairingAuthorisationMessage(context, pairingAuthorisation); + AsyncTask.execute(() -> MultiDeviceUtilities.signAndSendPairingAuthorisationMessage(context, pairingAuthorisation)); } @Override public void handleDeviceLinkAuthorized(@NotNull PairingAuthorisation pairingAuthorisation) {} @Override public void handleDeviceLinkingDialogDismissed() {} diff --git a/src/org/thoughtcrime/securesms/loki/SeedActivity.kt b/src/org/thoughtcrime/securesms/loki/SeedActivity.kt index 05d40c1879..a185b5fe43 100644 --- a/src/org/thoughtcrime/securesms/loki/SeedActivity.kt +++ b/src/org/thoughtcrime/securesms/loki/SeedActivity.kt @@ -4,6 +4,7 @@ import android.content.ClipData import android.content.ClipboardManager import android.content.Context import android.content.Intent +import android.os.AsyncTask import android.os.Bundle import android.view.View import android.view.inputmethod.InputMethodManager @@ -202,8 +203,10 @@ class SeedActivity : BaseActionBarActivity(), DeviceLinkingDialogDelegate { application.setUpP2PAPI() application.setUpStorageAPIIfNeeded() DeviceLinkingDialog.show(this, DeviceLinkingView.Mode.Slave, this) - retryIfNeeded(8) { - sendPairingAuthorisationMessage(this@SeedActivity, authorisation.primaryDevicePublicKey, authorisation) + AsyncTask.execute { + retryIfNeeded(8) { + sendPairingAuthorisationMessage(this@SeedActivity, authorisation.primaryDevicePublicKey, authorisation) + } } } else { startActivity(Intent(this, DisplayNameActivity::class.java))