Keep a local instance of mContactData when copying to SIM card.

Copying to SIM card can take a long time while it reads data about
available space on the SIM. If the user leaves the activity,
mContactData will be set to null and copyToCard will throw an NPE trying
to call methods on it.

Keep a local instance of this variable that the
thread can reference later.

Change-Id: Ie5187372b6fb2b23b00e266a175c91b8051e651e
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index ecd1f9c..e7de7ae 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -3117,6 +3117,7 @@
     private Handler mHandler = null;
 
     private void copyToCard(final int sub) {
+        final Contact contactData = mContactData;
         final int MSG_COPY_DONE = 0;
         final int MSG_COPY_FAILURE = 1;
         final int MSG_CARD_NO_SPACE = 2;
@@ -3202,12 +3203,12 @@
                     int emptyNumTotal = totalEmptyAdn + totalEmptyAnr;
 
                     // Get name string
-                    String strName = mContactData.getDisplayName();
+                    String strName = contactData.getDisplayName();
 
                     ArrayList<String> arrayNumber = new ArrayList<String>();
                     ArrayList<String> arrayEmail = new ArrayList<String>();
 
-                    for (RawContact rawContact : mContactData.getRawContacts()) {
+                    for (RawContact rawContact : contactData.getRawContacts()) {
                         for (DataItem dataItem : rawContact.getDataItems()) {
                             if (dataItem.getMimeType() == null) {
                                 continue;