Update settings for aux imes

Change-Id: I7528241eb0882fa5fae2a80e380375683cce2075
This commit is contained in:
satok
2011-07-04 16:27:53 +09:00
parent 5c9e37c295
commit 4c5fdcc3f7
2 changed files with 22 additions and 18 deletions

View File

@@ -69,20 +69,8 @@ public class InputMethodPreference extends CheckBoxPreference
mImi = imi;
updateSummary();
mIsSystemIme = InputMethodAndSubtypeUtil.isSystemIme(imi);
final int subtypeCount = imi.getSubtypeCount();
boolean onlyAux = true;
if (subtypeCount == 0) {
onlyAux = false;
} else {
for (int i = 0; i < subtypeCount; ++i) {
final InputMethodSubtype subtype = imi.getSubtypeAt(i);
if (!subtype.isAuxiliary()) {
onlyAux = false;
break;
}
}
}
if (imiCount <= 1 || (mIsSystemIme && !onlyAux)) {
final boolean isAuxIme = InputMethodAndSubtypeUtil.isAuxiliaryIme(imi);
if (imiCount <= 1 || (mIsSystemIme && !isAuxIme)) {
setEnabled(false);
}
}