Reconcile with ics-factoryrom-2-release

Change-Id: I060bd9a6e64c279a97b86ba72ef3589cd5d3cf91
diff --git a/res/values/donottranslate_config.xml b/res/values/donottranslate_config.xml
index 79a2b29..b36dbe1 100644
--- a/res/values/donottranslate_config.xml
+++ b/res/values/donottranslate_config.xml
@@ -124,4 +124,10 @@
     <!-- Regular expression for prohibiting certain phone numbers in dialpad.
          Ignored if empty. -->
     <string name="config_prohibited_phone_number_regexp"></string>
+
+    <!-- If true, enable the "import contacts from SIM" feature if the device
+         has an appropriate SIM or ICC card.
+         Setting this flag to false in a resource overlay allows you to
+         entirely disable SIM import on a per-product basis. -->
+    <bool name="config_allow_sim_import">true</bool>
 </resources>
diff --git a/src/com/android/contacts/interactions/ImportExportDialogFragment.java b/src/com/android/contacts/interactions/ImportExportDialogFragment.java
index 2eedfb3..7fdc47e 100644
--- a/src/com/android/contacts/interactions/ImportExportDialogFragment.java
+++ b/src/com/android/contacts/interactions/ImportExportDialogFragment.java
@@ -87,7 +87,8 @@
             }
         };
 
-        if (TelephonyManager.getDefault().hasIccCard()) {
+        if (TelephonyManager.getDefault().hasIccCard()
+                && res.getBoolean(R.bool.config_allow_sim_import)) {
             adapter.add(R.string.import_from_sim);
         }
         if (res.getBoolean(R.bool.config_allow_import_from_sdcard)) {