Merge "Allow ImeSutype with null languagtag to be passed to IMS"
This commit is contained in:
committed by
Android (Google) Code Review
commit
356940fd89
@@ -536,14 +536,7 @@ public final class InputMethodSubtype implements Parcelable {
|
||||
if (!TextUtils.equals(getMode(), SUBTYPE_MODE_KEYBOARD)) {
|
||||
return false;
|
||||
}
|
||||
if (isAuxiliary()) {
|
||||
return false;
|
||||
}
|
||||
final String langTag = getCanonicalizedLanguageTag();
|
||||
if (langTag.isEmpty() || TextUtils.equals(langTag, UNDEFINED_LANGUAGE_TAG)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return !isAuxiliary();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -176,14 +176,6 @@ public class InputMethodSubtypeTest {
|
||||
// Auxiliary subtype not suitable.
|
||||
assertFalse(getValidBuilder.get().setIsAuxiliary(true).build()
|
||||
.isSuitableForPhysicalKeyboardLayoutMapping());
|
||||
|
||||
// languageTag == null is not suitable.
|
||||
assertFalse(getValidBuilder.get().setLanguageTag(null).build()
|
||||
.isSuitableForPhysicalKeyboardLayoutMapping());
|
||||
|
||||
// languageTag == "und" is not suitable.
|
||||
assertFalse(getValidBuilder.get().setLanguageTag("und").build()
|
||||
.isSuitableForPhysicalKeyboardLayoutMapping());
|
||||
}
|
||||
|
||||
private static InputMethodSubtype cloneViaParcel(final InputMethodSubtype original) {
|
||||
|
||||
Reference in New Issue
Block a user