Get rid of isSentenceSpellCheckSupported corresponding to I0e931b7248f8c65268b60af599c07

Bug: 6320351

Change-Id: I6dae866d19bc6a22a3e2dc7631f00a0490477239
This commit is contained in:
satok
2012-04-12 16:36:46 +09:00
parent 31446e98dd
commit 32d906962a
3 changed files with 27 additions and 10 deletions

View File

@@ -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);