Skip to content

Commit

Permalink
Utilize proper intent creation when launching profile creator from Pa…
Browse files Browse the repository at this point in the history
…ssphraseRequiredActivity.
  • Loading branch information
alex-signal authored and cody-signal committed Aug 18, 2022
1 parent 9c266e7 commit 796e98b
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -238,7 +238,8 @@ private Intent getCreateSignalPinIntent() {
}

private Intent getCreateProfileNameIntent() {
return getRoutedIntent(EditProfileActivity.class, getIntent());
Intent intent = EditProfileActivity.getIntentForUserProfile(this);
return getRoutedIntent(intent, getIntent());
}

private Intent getOldDeviceTransferIntent() {
Expand All @@ -258,6 +259,11 @@ private Intent getChangeNumberLockIntent() {
return ChangeNumberLockActivity.createIntent(this);
}

private Intent getRoutedIntent(Intent destination, @Nullable Intent nextIntent) {
if (nextIntent != null) destination.putExtra("next_intent", nextIntent);
return destination;
}

private Intent getRoutedIntent(Class<?> destination, @Nullable Intent nextIntent) {
final Intent intent = new Intent(this, destination);
if (nextIntent != null) intent.putExtra("next_intent", nextIntent);
Expand Down

0 comments on commit 796e98b

Please sign in to comment.