From 5920989bdec326ff3e9d70d6a530d8b99a98f5c7 Mon Sep 17 00:00:00 2001 From: Todd Kennedy Date: Thu, 24 Feb 2011 12:31:37 -0800 Subject: [PATCH] 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 --- src/com/android/email/activity/setup/AccountSetupActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/email/activity/setup/AccountSetupActivity.java b/src/com/android/email/activity/setup/AccountSetupActivity.java index 65b0073cc..7257289d8 100644 --- a/src/com/android/email/activity/setup/AccountSetupActivity.java +++ b/src/com/android/email/activity/setup/AccountSetupActivity.java @@ -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()); }