merge in ics-mr1-release history after reset to ics-mr1
diff --git a/src/com/android/settings/tts/TtsEnginePreference.java b/src/com/android/settings/tts/TtsEnginePreference.java
index b98a239..196882f 100644
--- a/src/com/android/settings/tts/TtsEnginePreference.java
+++ b/src/com/android/settings/tts/TtsEnginePreference.java
@@ -155,12 +155,21 @@
             }
         });
 
+        if (mVoiceCheckData != null) {
+            mSettingsIcon.setEnabled(mRadioButton.isChecked());
+        }
+
         return view;
     }
 
     public void setVoiceDataDetails(Intent data) {
         mVoiceCheckData = data;
-        mSettingsIcon.setEnabled(mRadioButton.isChecked());
+        // This might end up running before getView aboive, in which
+        // case mSettingsIcon && mRadioButton will be null. In this case
+        // getView will set the right values.
+        if (mSettingsIcon != null && mRadioButton != null) {
+            mSettingsIcon.setEnabled(mRadioButton.isChecked());
+        }
     }
 
     private void onRadioButtonClicked(CompoundButton buttonView, boolean isChecked) {
diff --git a/src/com/android/settings/tts/TtsEngineSettingsFragment.java b/src/com/android/settings/tts/TtsEngineSettingsFragment.java
index 3f740d7..18d1fdb 100644
--- a/src/com/android/settings/tts/TtsEngineSettingsFragment.java
+++ b/src/com/android/settings/tts/TtsEngineSettingsFragment.java
@@ -141,7 +141,7 @@
             if (loc != null){
                 entries[i] = loc.getDisplayName();
                 entryValues[i] = availableLangs.get(i);
-                if (entryValues[i].equals(currentLocale)) {
+                if (availableLangs.get(i).equalsIgnoreCase(currentLocale)) {
                     selectedLanguageIndex = i;
                 }
             }