Fix the NPE in InputMethodSubtype#setSubtypeNameOverride.
Bug: 276791359 Test: Locally verified with IMEs. Change-Id: I64361497feb5e4713cf2c079661200dc961e8650
This commit is contained in:
@@ -286,7 +286,6 @@ final class AdditionalSubtypeUtils {
|
||||
final InputMethodSubtype.InputMethodSubtypeBuilder
|
||||
builder = new InputMethodSubtype.InputMethodSubtypeBuilder()
|
||||
.setSubtypeNameResId(label)
|
||||
.setSubtypeNameOverride(untranslatableName)
|
||||
.setPhysicalKeyboardHint(
|
||||
pkLanguageTag == null ? null : new ULocale(pkLanguageTag),
|
||||
pkLayoutType == null ? "" : pkLayoutType)
|
||||
@@ -302,6 +301,9 @@ final class AdditionalSubtypeUtils {
|
||||
if (subtypeId != InputMethodSubtype.SUBTYPE_ID_NONE) {
|
||||
builder.setSubtypeId(subtypeId);
|
||||
}
|
||||
if (untranslatableName != null) {
|
||||
builder.setSubtypeNameOverride(untranslatableName);
|
||||
}
|
||||
tempSubtypesArray.add(builder.build());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user