mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 17:27:45 +00:00
Switch onboarding seed step and display name step
This commit is contained in:
parent
88dbeddb04
commit
9b2a90639d
@ -13,7 +13,7 @@ import android.support.v4.app.Fragment;
|
|||||||
import org.thoughtcrime.securesms.crypto.MasterSecretUtil;
|
import org.thoughtcrime.securesms.crypto.MasterSecretUtil;
|
||||||
import org.thoughtcrime.securesms.jobs.PushNotificationReceiveJob;
|
import org.thoughtcrime.securesms.jobs.PushNotificationReceiveJob;
|
||||||
import org.thoughtcrime.securesms.logging.Log;
|
import org.thoughtcrime.securesms.logging.Log;
|
||||||
import org.thoughtcrime.securesms.loki.AccountDetailsActivity;
|
import org.thoughtcrime.securesms.loki.SeedActivity;
|
||||||
import org.thoughtcrime.securesms.push.SignalServiceNetworkAccess;
|
import org.thoughtcrime.securesms.push.SignalServiceNetworkAccess;
|
||||||
import org.thoughtcrime.securesms.registration.WelcomeActivity;
|
import org.thoughtcrime.securesms.registration.WelcomeActivity;
|
||||||
import org.thoughtcrime.securesms.service.KeyCachingService;
|
import org.thoughtcrime.securesms.service.KeyCachingService;
|
||||||
@ -185,7 +185,7 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Intent getPushRegistrationIntent() {
|
private Intent getPushRegistrationIntent() {
|
||||||
return getRoutedIntent(AccountDetailsActivity.class, getCreateProfileIntent());
|
return getRoutedIntent(SeedActivity.class, getCreateProfileIntent());
|
||||||
}
|
}
|
||||||
|
|
||||||
private Intent getCreateProfileIntent() {
|
private Intent getCreateProfileIntent() {
|
||||||
|
@ -4,8 +4,10 @@ import android.content.Intent
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import kotlinx.android.synthetic.main.activity_account_details.*
|
import kotlinx.android.synthetic.main.activity_account_details.*
|
||||||
import network.loki.messenger.R;
|
import network.loki.messenger.R
|
||||||
|
import org.thoughtcrime.securesms.ApplicationContext
|
||||||
import org.thoughtcrime.securesms.BaseActionBarActivity
|
import org.thoughtcrime.securesms.BaseActionBarActivity
|
||||||
|
import org.thoughtcrime.securesms.ConversationListActivity
|
||||||
import org.thoughtcrime.securesms.util.TextSecurePreferences
|
import org.thoughtcrime.securesms.util.TextSecurePreferences
|
||||||
import org.whispersystems.signalservice.api.crypto.ProfileCipher
|
import org.whispersystems.signalservice.api.crypto.ProfileCipher
|
||||||
|
|
||||||
@ -29,7 +31,12 @@ class AccountDetailsActivity : BaseActionBarActivity() {
|
|||||||
}
|
}
|
||||||
val inputMethodManager = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
|
val inputMethodManager = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
|
||||||
inputMethodManager.hideSoftInputFromWindow(nameEditText.windowToken, 0)
|
inputMethodManager.hideSoftInputFromWindow(nameEditText.windowToken, 0)
|
||||||
startActivity(Intent(this, SeedActivity::class.java))
|
TextSecurePreferences.setHasSeenWelcomeScreen(this, true)
|
||||||
|
TextSecurePreferences.setPromptedPushRegistration(this, true)
|
||||||
|
val application = ApplicationContext.getInstance(this)
|
||||||
|
application.setUpP2PAPI()
|
||||||
|
application.startLongPollingIfNeeded()
|
||||||
|
startActivity(Intent(this, ConversationListActivity::class.java))
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,9 +10,7 @@ import android.view.inputmethod.InputMethodManager
|
|||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import kotlinx.android.synthetic.main.activity_seed.*
|
import kotlinx.android.synthetic.main.activity_seed.*
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
import org.thoughtcrime.securesms.ApplicationContext
|
|
||||||
import org.thoughtcrime.securesms.BaseActionBarActivity
|
import org.thoughtcrime.securesms.BaseActionBarActivity
|
||||||
import org.thoughtcrime.securesms.ConversationListActivity
|
|
||||||
import org.thoughtcrime.securesms.crypto.IdentityKeyUtil
|
import org.thoughtcrime.securesms.crypto.IdentityKeyUtil
|
||||||
import org.thoughtcrime.securesms.database.Address
|
import org.thoughtcrime.securesms.database.Address
|
||||||
import org.thoughtcrime.securesms.database.DatabaseFactory
|
import org.thoughtcrime.securesms.database.DatabaseFactory
|
||||||
@ -159,15 +157,11 @@ class SeedActivity : BaseActionBarActivity() {
|
|||||||
DatabaseFactory.getIdentityDatabase(this).saveIdentity(Address.fromSerialized(hexEncodedPublicKey), publicKey,
|
DatabaseFactory.getIdentityDatabase(this).saveIdentity(Address.fromSerialized(hexEncodedPublicKey), publicKey,
|
||||||
IdentityDatabase.VerifiedStatus.VERIFIED, true, System.currentTimeMillis(), true)
|
IdentityDatabase.VerifiedStatus.VERIFIED, true, System.currentTimeMillis(), true)
|
||||||
TextSecurePreferences.setLocalNumber(this, hexEncodedPublicKey)
|
TextSecurePreferences.setLocalNumber(this, hexEncodedPublicKey)
|
||||||
TextSecurePreferences.setPromptedPushRegistration(this, true)
|
|
||||||
val application = ApplicationContext.getInstance(this)
|
|
||||||
application.setUpP2PAPI()
|
|
||||||
application.startLongPollingIfNeeded()
|
|
||||||
when (mode) {
|
when (mode) {
|
||||||
Mode.Register -> Analytics.shared.track("Seed Created")
|
Mode.Register -> Analytics.shared.track("Seed Created")
|
||||||
Mode.Restore -> Analytics.shared.track("Seed Restored")
|
Mode.Restore -> Analytics.shared.track("Seed Restored")
|
||||||
}
|
}
|
||||||
startActivity(Intent(this, ConversationListActivity::class.java))
|
startActivity(Intent(this, AccountDetailsActivity::class.java))
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
// endregion
|
// endregion
|
||||||
|
@ -8,7 +8,6 @@ import android.support.annotation.NonNull;
|
|||||||
import org.thoughtcrime.securesms.BaseActionBarActivity;
|
import org.thoughtcrime.securesms.BaseActionBarActivity;
|
||||||
import org.thoughtcrime.securesms.permissions.Permissions;
|
import org.thoughtcrime.securesms.permissions.Permissions;
|
||||||
import org.thoughtcrime.securesms.util.CommunicationActions;
|
import org.thoughtcrime.securesms.util.CommunicationActions;
|
||||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
|
||||||
|
|
||||||
import network.loki.messenger.R;
|
import network.loki.messenger.R;
|
||||||
|
|
||||||
@ -37,7 +36,7 @@ public class WelcomeActivity extends BaseActionBarActivity {
|
|||||||
.ifNecessary()
|
.ifNecessary()
|
||||||
.withRationaleDialog(getString(R.string.activity_landing_permission_dialog_message), R.drawable.ic_folder_white_48dp)
|
.withRationaleDialog(getString(R.string.activity_landing_permission_dialog_message), R.drawable.ic_folder_white_48dp)
|
||||||
.onAnyResult(() -> {
|
.onAnyResult(() -> {
|
||||||
TextSecurePreferences.setHasSeenWelcomeScreen(WelcomeActivity.this, true);
|
// TextSecurePreferences.setHasSeenWelcomeScreen(WelcomeActivity.this, true);
|
||||||
|
|
||||||
Intent nextIntent = getIntent().getParcelableExtra("next_intent");
|
Intent nextIntent = getIntent().getParcelableExtra("next_intent");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user