Fix an NPE
This code is temporary until we get rid of this member. Bug: 6662963 Bug: 6667091 Change-Id: I1d970d2a97992507e86c5b94978a2543fe42b375
This commit is contained in:
parent
d2f210dbe2
commit
78573f2e8a
1 changed files with 4 additions and 4 deletions
|
@ -872,7 +872,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
if (ProductionFlag.IS_EXPERIMENTAL) {
|
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions);
|
ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions);
|
||||||
}
|
}
|
||||||
if (mInputAttributes.mApplicationSpecifiedCompletionOn) {
|
if (null != mInputAttributes && mInputAttributes.mApplicationSpecifiedCompletionOn) {
|
||||||
mApplicationSpecifiedCompletions = applicationSpecifiedCompletions;
|
mApplicationSpecifiedCompletions = applicationSpecifiedCompletions;
|
||||||
if (applicationSpecifiedCompletions == null) {
|
if (applicationSpecifiedCompletions == null) {
|
||||||
clearSuggestions();
|
clearSuggestions();
|
||||||
|
@ -1628,7 +1628,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
public boolean isSuggestionsRequested() {
|
public boolean isSuggestionsRequested() {
|
||||||
// TODO: move this method to mSettingsValues
|
// TODO: move this method to mSettingsValues
|
||||||
return mInputAttributes.mIsSettingsSuggestionStripOn
|
return (null != mInputAttributes && mInputAttributes.mIsSettingsSuggestionStripOn)
|
||||||
&& (mCurrentSettings.isCorrectionOn() || isShowingSuggestionsStrip());
|
&& (mCurrentSettings.isCorrectionOn() || isShowingSuggestionsStrip());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1648,7 +1648,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
return true;
|
return true;
|
||||||
if (!isShowingSuggestionsStrip())
|
if (!isShowingSuggestionsStrip())
|
||||||
return false;
|
return false;
|
||||||
if (mInputAttributes.mApplicationSpecifiedCompletionOn)
|
if (null != mInputAttributes && mInputAttributes.mApplicationSpecifiedCompletionOn)
|
||||||
return true;
|
return true;
|
||||||
return isSuggestionsRequested();
|
return isSuggestionsRequested();
|
||||||
}
|
}
|
||||||
|
@ -1830,7 +1830,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mInputAttributes.mApplicationSpecifiedCompletionOn
|
if ((null != mInputAttributes && mInputAttributes.mApplicationSpecifiedCompletionOn)
|
||||||
&& mApplicationSpecifiedCompletions != null
|
&& mApplicationSpecifiedCompletions != null
|
||||||
&& index >= 0 && index < mApplicationSpecifiedCompletions.length) {
|
&& index >= 0 && index < mApplicationSpecifiedCompletions.length) {
|
||||||
if (mSuggestionsView != null) {
|
if (mSuggestionsView != null) {
|
||||||
|
|
Loading…
Reference in a new issue