Check null pointer agressively.
Bug: 3250622 Change-Id: I25f367ad1bd6a741282603f2f587f7a1256ef460
This commit is contained in:
@@ -184,6 +184,9 @@ public class InputMethodButton extends ImageView {
|
||||
}
|
||||
|
||||
private void refreshStatusIcon() {
|
||||
if (mIcon == null) {
|
||||
return;
|
||||
}
|
||||
if (!needsToShowIMEButton()) {
|
||||
setVisibility(View.INVISIBLE);
|
||||
return;
|
||||
@@ -202,12 +205,10 @@ public class InputMethodButton extends ImageView {
|
||||
icon = getShortcutInputMethodAndSubtypeDrawable();
|
||||
break;
|
||||
}
|
||||
if (mIcon != null) {
|
||||
if (icon == null) {
|
||||
mIcon.setImageResource(R.drawable.ic_sysbar_ime_default);
|
||||
} else {
|
||||
mIcon.setImageDrawable(icon);
|
||||
}
|
||||
if (icon == null) {
|
||||
mIcon.setImageResource(R.drawable.ic_sysbar_ime_default);
|
||||
} else {
|
||||
mIcon.setImageDrawable(icon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user