Fix NPE when restoring setup activity
If the setup activity ever needs to restore itself after being killed, we were restoring the Activity object's state (i.e. rebuilding the UI) before we restored the state of our class. Since the Activity necessarily depends upon our object's state, Bad Things can [and will] happen. The solution is simple -- save our object's state last, but, restore our state first. bug 3476039 Change-Id: I623f1938c2e0f50d660708a7a7ac3eeb4a8f9090
This commit is contained in:
parent
3d2f22c7a6
commit
5920989bde
@ -29,8 +29,8 @@ public class AccountSetupActivity extends Activity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
SetupData.restore(savedInstanceState);
|
SetupData.restore(savedInstanceState);
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
if (DEBUG_SETUP_FLOWS) {
|
if (DEBUG_SETUP_FLOWS) {
|
||||||
Log.d(getClass().getName(), SetupData.debugString());
|
Log.d(getClass().getName(), SetupData.debugString());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user