am 1c1320a8: Bluetooth: Fix to avoid taking space as name upon orientation

* commit '1c1320a84d22419efb3bf45d970f80b33658edc2':
  Bluetooth: Fix to avoid taking space as name upon orientation
This commit is contained in:
Srinu Jella
2015-06-25 05:08:33 +00:00
committed by Android Git Automerger

View File

@@ -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) {
}