Crash when creating account after rotating screen
Steps to reproduce:
- Create a new account and press 'Create Account'
- Before the next screen is shown, rotate the screen to landscape
- Rotate the screen back to portrait
- Press 'Create Account' again
Stacktrace:
java.lang.IllegalStateException
at org.briarproject.briar.android.login.SetupControllerImpl.createAccount(SetupControllerImpl.java:88)
at org.briarproject.briar.android.login.SetupControllerImpl.createAccount(SetupControllerImpl.java:82)
at org.briarproject.briar.android.login.SetupControllerImpl.showDozeOrCreateAccount(SetupControllerImpl.java:67)
at org.briarproject.briar.android.login.PasswordFragment.onClick(PasswordFragment.java:117)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
There are really two bugs here:
- The username and password aren't passed from the old SetupControllerImpl instance to the new one
- The result of the first account creation is returned to the old SetupActivity instance
The second bug is covered by #725, so this ticket is just for the first bug.