diff --git a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java index 250b326056c..293a53e49da 100644 --- a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java +++ b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java @@ -25,6 +25,7 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; +import android.content.res.Configuration; import android.os.Bundle; import android.text.Editable; import android.text.InputFilter; @@ -195,6 +196,13 @@ public final class BluetoothNameDialogFragment extends DialogFragment implements } } + public void onConfigurationChanged(Configuration newConfig, CharSequence s) { + super.onConfigurationChanged(newConfig); + if (mOkButton != null) { + mOkButton.setEnabled(s.length() != 0 && !(s.toString().trim().isEmpty())); + } + } + /* Not used */ public void beforeTextChanged(CharSequence s, int start, int count, int after) { }