Make onStop() call finish() so that ImportVCardActivity does not show ugly behavior
when a user changes the device's orientation (by sliding hardware keyboard, etc.).

Internal issue number: 2136137
diff --git a/src/com/android/contacts/ImportVCardActivity.java b/src/com/android/contacts/ImportVCardActivity.java
index a3d5de5..4b59e16 100644
--- a/src/com/android/contacts/ImportVCardActivity.java
+++ b/src/com/android/contacts/ImportVCardActivity.java
@@ -789,7 +789,21 @@
         super.onStop();
         if (mVCardReadThread != null) {
             // The Activity is no longer visible. Stop the thread.
-            // TODO: The Activity may be destroyed without this method being called.
+            mVCardReadThread.cancel();
+            mVCardReadThread = null;
+        }
+
+        // ImportVCardActivity should not be persistent. In other words, if there's some
+        // event calling onStop(), this Activity should finish its work and give the main
+        // screen back to the caller Activity.
+        finish();
+    }
+
+    @Override
+    public void finalize() {
+        if (mVCardReadThread != null) {
+            // Not sure this procedure is really needed, but just in case...
+            Log.w(LOG_TAG, "VCardReadThread exists while this Activity is now being killed!");
             mVCardReadThread.cancel();
             mVCardReadThread = null;
         }