Get rid of isSentenceSpellCheckSupported corresponding to I0e931b7248f8c65268b60af599c07
Bug: 6320351 Change-Id: I6dae866d19bc6a22a3e2dc7631f00a0490477239
This commit is contained in:
@@ -45,11 +45,7 @@ public class HelloSpellCheckerActivity extends Activity implements SpellCheckerS
|
||||
}
|
||||
|
||||
private boolean isSentenceSpellCheckSupported() {
|
||||
if (mScs == null || Build.VERSION.SDK_INT < 16) {
|
||||
return false;
|
||||
}
|
||||
// Note that isSentenceSpellCheckSupported works on JB or later.
|
||||
return mScs.isSentenceSpellCheckSupported();
|
||||
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,6 +66,9 @@ public class HelloSpellCheckerActivity extends Activity implements SpellCheckerS
|
||||
"I wold like to here form you")}, 3);
|
||||
mScs.getSentenceSuggestions(new TextInfo[] {new TextInfo("hell othere")}, 3);
|
||||
} else {
|
||||
// Note that getSuggestions() is a deprecated API.
|
||||
// It is recommended for an application running on Jelly Bean or later
|
||||
// to call getSentenceSuggestions() only.
|
||||
mScs.getSuggestions(new TextInfo("tgis"), 3);
|
||||
mScs.getSuggestions(new TextInfo("hllo"), 3);
|
||||
mScs.getSuggestions(new TextInfo("helloworld"), 3);
|
||||
|
||||
Reference in New Issue
Block a user