Merge "Clean up Wi-Fi Assistant card." into lmp-dev
diff --git a/res/xml/language_settings.xml b/res/xml/language_settings.xml
index 9d12857..b60dc5e 100644
--- a/res/xml/language_settings.xml
+++ b/res/xml/language_settings.xml
@@ -65,34 +65,6 @@
             android:persistent="false">
         <!-- Additional preference screens are inserted here programmatically
              with low order values to set the key map of each attached keyboard. -->
-
-        <CheckBoxPreference
-                android:key="auto_replace"
-                android:title="@string/auto_replace"
-                android:summaryOn="@string/auto_replace_summary"
-                android:summaryOff="@string/auto_replace_summary"
-                android:order="1000"
-                android:persistent="false"
-                />
-
-        <CheckBoxPreference
-                android:key="auto_caps"
-                android:title="@string/auto_caps"
-                android:summaryOn="@string/auto_caps_summary"
-                android:summaryOff="@string/auto_caps_summary"
-                android:order="1001"
-                android:persistent="false"
-                />
-
-        <CheckBoxPreference
-                android:key="auto_punctuate"
-                android:title="@string/auto_punctuate"
-                android:summaryOn="@string/auto_punctuate_summary"
-                android:summaryOff="@string/auto_punctuate_summary"
-                android:order="1002"
-                android:persistent="false"
-                />
-
     </PreferenceCategory>
 
     <PreferenceCategory
diff --git a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java
index b80e42a..4466aea 100644
--- a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java
+++ b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java
@@ -92,7 +92,6 @@
             mDeviceNameEdited = savedInstanceState.getBoolean(KEY_NAME_EDITED, false);
         }
         mAlertDialog = new AlertDialog.Builder(getActivity())
-                .setIcon(android.R.drawable.ic_dialog_info)
                 .setTitle(R.string.bluetooth_rename_device)
                 .setView(createDialogView(deviceName))
                 .setPositiveButton(R.string.bluetooth_rename_button,
diff --git a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
index 1601cd0..b8ae493 100644
--- a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
+++ b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
@@ -88,14 +88,6 @@
     // false: on ICS or later
     private static final boolean SHOW_INPUT_METHOD_SWITCHER_SETTINGS = false;
 
-    private static final String[] sSystemSettingNames = {
-        System.TEXT_AUTO_REPLACE, System.TEXT_AUTO_CAPS, System.TEXT_AUTO_PUNCTUATE,
-    };
-
-    private static final String[] sHardKeyboardKeys = {
-        "auto_replace", "auto_caps", "auto_punctuate",
-    };
-
     private int mDefaultInputMethodSelectorVisibility = 0;
     private ListPreference mShowInputMethodSelectorPref;
     private PreferenceCategory mKeyboardSettingsCategory;
@@ -274,16 +266,6 @@
             }
         }
 
-        // Hard keyboard
-        if (!mHardKeyboardPreferenceList.isEmpty()) {
-            for (int i = 0; i < sHardKeyboardKeys.length; ++i) {
-                CheckBoxPreference chkPref = (CheckBoxPreference)
-                        mHardKeyboardCategory.findPreference(sHardKeyboardKeys[i]);
-                chkPref.setChecked(
-                        System.getInt(getContentResolver(), sSystemSettingNames[i], 1) > 0);
-            }
-        }
-
         updateInputDevices();
 
         // Refresh internal states in mInputMethodSettingValues to keep the latest
@@ -339,15 +321,6 @@
             }
         } else if (preference instanceof CheckBoxPreference) {
             final CheckBoxPreference chkPref = (CheckBoxPreference) preference;
-            if (!mHardKeyboardPreferenceList.isEmpty()) {
-                for (int i = 0; i < sHardKeyboardKeys.length; ++i) {
-                    if (chkPref == mHardKeyboardCategory.findPreference(sHardKeyboardKeys[i])) {
-                        System.putInt(getContentResolver(), sSystemSettingNames[i],
-                                chkPref.isChecked() ? 1 : 0);
-                        return true;
-                    }
-                }
-            }
             if (chkPref == mGameControllerCategory.findPreference("vibrate_input_devices")) {
                 System.putInt(getContentResolver(), Settings.System.VIBRATE_INPUT_DEVICES,
                         chkPref.isChecked() ? 1 : 0);
@@ -564,35 +537,33 @@
 
     private void updateHardKeyboards() {
         mHardKeyboardPreferenceList.clear();
-        if (getResources().getConfiguration().keyboard == Configuration.KEYBOARD_QWERTY) {
-            final int[] devices = InputDevice.getDeviceIds();
-            for (int i = 0; i < devices.length; i++) {
-                InputDevice device = InputDevice.getDevice(devices[i]);
-                if (device != null
-                        && !device.isVirtual()
-                        && device.isFullKeyboard()) {
-                    final InputDeviceIdentifier identifier = device.getIdentifier();
-                    final String keyboardLayoutDescriptor =
-                            mIm.getCurrentKeyboardLayoutForInputDevice(identifier);
-                    final KeyboardLayout keyboardLayout = keyboardLayoutDescriptor != null ?
-                            mIm.getKeyboardLayout(keyboardLayoutDescriptor) : null;
+        final int[] devices = InputDevice.getDeviceIds();
+        for (int i = 0; i < devices.length; i++) {
+            InputDevice device = InputDevice.getDevice(devices[i]);
+            if (device != null
+                    && !device.isVirtual()
+                    && device.isFullKeyboard()) {
+                final InputDeviceIdentifier identifier = device.getIdentifier();
+                final String keyboardLayoutDescriptor =
+                    mIm.getCurrentKeyboardLayoutForInputDevice(identifier);
+                final KeyboardLayout keyboardLayout = keyboardLayoutDescriptor != null ?
+                    mIm.getKeyboardLayout(keyboardLayoutDescriptor) : null;
 
-                    final PreferenceScreen pref = new PreferenceScreen(getActivity(), null);
-                    pref.setTitle(device.getName());
-                    if (keyboardLayout != null) {
-                        pref.setSummary(keyboardLayout.toString());
-                    } else {
-                        pref.setSummary(R.string.keyboard_layout_default_label);
-                    }
-                    pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
-                        @Override
-                        public boolean onPreferenceClick(Preference preference) {
-                            showKeyboardLayoutDialog(identifier);
-                            return true;
-                        }
-                    });
-                    mHardKeyboardPreferenceList.add(pref);
+                final PreferenceScreen pref = new PreferenceScreen(getActivity(), null);
+                pref.setTitle(device.getName());
+                if (keyboardLayout != null) {
+                    pref.setSummary(keyboardLayout.toString());
+                } else {
+                    pref.setSummary(R.string.keyboard_layout_default_label);
                 }
+                pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
+                    @Override
+                    public boolean onPreferenceClick(Preference preference) {
+                        showKeyboardLayoutDialog(identifier);
+                        return true;
+                    }
+                });
+                mHardKeyboardPreferenceList.add(pref);
             }
         }
 
@@ -795,76 +766,74 @@
             // Hard keyboards
             InputManager inputManager = (InputManager) context.getSystemService(
                     Context.INPUT_SERVICE);
-            if (resources.getConfiguration().keyboard == Configuration.KEYBOARD_QWERTY) {
-                boolean hasHardKeyboards = false;
+            boolean hasHardKeyboards = false;
 
-                final int[] devices = InputDevice.getDeviceIds();
-                for (int i = 0; i < devices.length; i++) {
-                    InputDevice device = InputDevice.getDevice(devices[i]);
-                    if (device == null || device.isVirtual() || !device.isFullKeyboard()) {
-                        continue;
-                    }
-
-                    hasHardKeyboards = true;
-
-                    InputDeviceIdentifier identifier = device.getIdentifier();
-                    String keyboardLayoutDescriptor =
-                            inputManager.getCurrentKeyboardLayoutForInputDevice(identifier);
-                    KeyboardLayout keyboardLayout = keyboardLayoutDescriptor != null ?
-                            inputManager.getKeyboardLayout(keyboardLayoutDescriptor) : null;
-
-                    String summary;
-                    if (keyboardLayout != null) {
-                        summary = keyboardLayout.toString();
-                    } else {
-                        summary = context.getString(R.string.keyboard_layout_default_label);
-                    }
-
-                    indexable = new SearchIndexableRaw(context);
-                    indexable.key = device.getName();
-                    indexable.title = device.getName();
-                    indexable.summaryOn = summary;
-                    indexable.summaryOff = summary;
-                    indexable.screenTitle = screenTitle;
-                    indexables.add(indexable);
+            final int[] devices = InputDevice.getDeviceIds();
+            for (int i = 0; i < devices.length; i++) {
+                InputDevice device = InputDevice.getDevice(devices[i]);
+                if (device == null || device.isVirtual() || !device.isFullKeyboard()) {
+                    continue;
                 }
 
-                if (hasHardKeyboards) {
-                    // Hard keyboard category.
-                    indexable = new SearchIndexableRaw(context);
-                    indexable.key = "builtin_keyboard_settings";
-                    indexable.title = context.getString(
-                            R.string.builtin_keyboard_settings_title);
-                    indexable.screenTitle = screenTitle;
-                    indexables.add(indexable);
+                hasHardKeyboards = true;
 
-                    // Auto replace.
-                    indexable = new SearchIndexableRaw(context);
-                    indexable.key = "auto_replace";
-                    indexable.title = context.getString(R.string.auto_replace);
-                    indexable.summaryOn = context.getString(R.string.auto_replace_summary);
-                    indexable.summaryOff = context.getString(R.string.auto_replace_summary);
-                    indexable.screenTitle = screenTitle;
-                    indexables.add(indexable);
+                InputDeviceIdentifier identifier = device.getIdentifier();
+                String keyboardLayoutDescriptor =
+                        inputManager.getCurrentKeyboardLayoutForInputDevice(identifier);
+                KeyboardLayout keyboardLayout = keyboardLayoutDescriptor != null ?
+                        inputManager.getKeyboardLayout(keyboardLayoutDescriptor) : null;
 
-                    // Auto caps.
-                    indexable = new SearchIndexableRaw(context);
-                    indexable.key = "auto_caps";
-                    indexable.title = context.getString(R.string.auto_caps);
-                    indexable.summaryOn = context.getString(R.string.auto_caps_summary);
-                    indexable.summaryOff = context.getString(R.string.auto_caps_summary);
-                    indexable.screenTitle = screenTitle;
-                    indexables.add(indexable);
-
-                    // Auto punctuate.
-                    indexable = new SearchIndexableRaw(context);
-                    indexable.key = "auto_punctuate";
-                    indexable.title = context.getString(R.string.auto_punctuate);
-                    indexable.summaryOn = context.getString(R.string.auto_punctuate_summary);
-                    indexable.summaryOff = context.getString(R.string.auto_punctuate_summary);
-                    indexable.screenTitle = screenTitle;
-                    indexables.add(indexable);
+                String summary;
+                if (keyboardLayout != null) {
+                    summary = keyboardLayout.toString();
+                } else {
+                    summary = context.getString(R.string.keyboard_layout_default_label);
                 }
+
+                indexable = new SearchIndexableRaw(context);
+                indexable.key = device.getName();
+                indexable.title = device.getName();
+                indexable.summaryOn = summary;
+                indexable.summaryOff = summary;
+                indexable.screenTitle = screenTitle;
+                indexables.add(indexable);
+            }
+
+            if (hasHardKeyboards) {
+                // Hard keyboard category.
+                indexable = new SearchIndexableRaw(context);
+                indexable.key = "builtin_keyboard_settings";
+                indexable.title = context.getString(
+                        R.string.builtin_keyboard_settings_title);
+                indexable.screenTitle = screenTitle;
+                indexables.add(indexable);
+
+                // Auto replace.
+                indexable = new SearchIndexableRaw(context);
+                indexable.key = "auto_replace";
+                indexable.title = context.getString(R.string.auto_replace);
+                indexable.summaryOn = context.getString(R.string.auto_replace_summary);
+                indexable.summaryOff = context.getString(R.string.auto_replace_summary);
+                indexable.screenTitle = screenTitle;
+                indexables.add(indexable);
+
+                // Auto caps.
+                indexable = new SearchIndexableRaw(context);
+                indexable.key = "auto_caps";
+                indexable.title = context.getString(R.string.auto_caps);
+                indexable.summaryOn = context.getString(R.string.auto_caps_summary);
+                indexable.summaryOff = context.getString(R.string.auto_caps_summary);
+                indexable.screenTitle = screenTitle;
+                indexables.add(indexable);
+
+                // Auto punctuate.
+                indexable = new SearchIndexableRaw(context);
+                indexable.key = "auto_punctuate";
+                indexable.title = context.getString(R.string.auto_punctuate);
+                indexable.summaryOn = context.getString(R.string.auto_punctuate_summary);
+                indexable.summaryOff = context.getString(R.string.auto_punctuate_summary);
+                indexable.screenTitle = screenTitle;
+                indexables.add(indexable);
             }
 
             // Voice recognizers.