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:
Todd Kennedy 2011-02-24 12:31:37 -08:00
parent 3d2f22c7a6
commit 5920989bde

View File

@ -29,8 +29,8 @@ public class AccountSetupActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SetupData.restore(savedInstanceState);
super.onCreate(savedInstanceState);
if (DEBUG_SETUP_FLOWS) {
Log.d(getClass().getName(), SetupData.debugString());
}