Fix rotation crash in springboard

Save mResult in the instance bundle. It used to always be delivered
from the loader but it's possible for the springboard to not be the
top activity now so it can get recreated without getting a result
from the loader.

Test: Manually verified rotating the screen in the "choose a contact
to link" activity doesn't crash the app and the link happens as
expected.

Bug: 33196170
Change-Id: I0a5b21aed625059a1f65dc2e26de85af3feb5ebe
diff --git a/src/com/android/contacts/activities/ContactEditorSpringBoardActivity.java b/src/com/android/contacts/activities/ContactEditorSpringBoardActivity.java
index 8ce6ecb..0c60203 100644
--- a/src/com/android/contacts/activities/ContactEditorSpringBoardActivity.java
+++ b/src/com/android/contacts/activities/ContactEditorSpringBoardActivity.java
@@ -41,6 +41,7 @@
 
     private static final String TAG = "EditorSpringBoard";
     private static final String TAG_RAW_CONTACTS_DIALOG = "rawContactsDialog";
+    private static final String KEY_RAW_CONTACTS_METADATA = "rawContactsMetadata";
     private static final int LOADER_RAW_CONTACTS = 1;
 
     public static final String EXTRA_SHOW_READ_ONLY = "showReadOnly";
@@ -270,6 +271,18 @@
         finish();
     }
 
+    @Override
+    protected void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        outState.putParcelable(KEY_RAW_CONTACTS_METADATA, mResult);
+    }
+
+    @Override
+    protected void onRestoreInstanceState(Bundle savedInstanceState) {
+        super.onRestoreInstanceState(savedInstanceState);
+        mResult = savedInstanceState.getParcelable(KEY_RAW_CONTACTS_METADATA);
+    }
+
     private long[][] getRawContactIds() {
         final long[][] result = new long[mResult.rawContacts.size()][1];
         for (int i = 0; i < mResult.rawContacts.size(); i++) {