Skip to content

Commit e00633e

Browse files
author
Ken Wakasa
committed
Fix NPE
bug: 5290369 Change-Id: Ica450c49fc0bc89b1697eaa1086707f481f6be7e
1 parent f4b783f commit e00633e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,12 @@ private void showConfigureInputMethods() {
218218

219219
private View createInputMethodItem(
220220
final InputMethodInfo imi, final InputMethodSubtype subtype) {
221-
final CharSequence subtypeName = subtype.overridesImplicitlyEnabledSubtype()
222-
? null : getSubtypeName(imi, subtype);
221+
final CharSequence subtypeName;
222+
if (subtype == null || subtype.overridesImplicitlyEnabledSubtype()) {
223+
subtypeName = null;
224+
} else {
225+
subtypeName = getSubtypeName(imi, subtype);
226+
}
223227
final CharSequence imiName = getIMIName(imi);
224228
final Drawable icon = getSubtypeIcon(imi, subtype);
225229
final View view = View.inflate(mContext, R.layout.status_bar_input_methods_item, null);

0 commit comments

Comments
 (0)