File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
core/java/android/view/textservice
services/java/com/android/server Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ public void setCurrentSpellChecker(SpellCheckerInfo sci) {
217217 public SpellCheckerSubtype getCurrentSpellCheckerSubtype (
218218 boolean allowImplicitlySelectedSubtype ) {
219219 try {
220- // Passing null as a locale for ICS
220+ // Passing null as a locale until we support multiple enabled spell checker subtypes.
221221 return sService .getCurrentSpellCheckerSubtype (null , allowImplicitlySelectedSubtype );
222222 } catch (RemoteException e ) {
223223 Log .e (TAG , "Error in getCurrentSpellCheckerSubtype: " + e );
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ public SpellCheckerInfo getCurrentSpellChecker(String locale) {
198198 }
199199
200200 // TODO: Respect allowImplicitlySelectedSubtype
201- // TODO: Save SpellCheckerSubtype by supported languages.
201+ // TODO: Save SpellCheckerSubtype by supported languages by looking at "locale" .
202202 @ Override
203203 public SpellCheckerSubtype getCurrentSpellCheckerSubtype (
204204 String locale , boolean allowImplicitlySelectedSubtype ) {
@@ -250,10 +250,10 @@ public SpellCheckerSubtype getCurrentSpellCheckerSubtype(
250250 for (int i = 0 ; i < sci .getSubtypeCount (); ++i ) {
251251 final SpellCheckerSubtype scs = sci .getSubtypeAt (i );
252252 if (hashCode == 0 ) {
253- if (candidateLocale .equals (locale )) {
253+ final String scsLocale = scs .getLocale ();
254+ if (candidateLocale .equals (scsLocale )) {
254255 return scs ;
255256 } else if (candidate == null ) {
256- final String scsLocale = scs .getLocale ();
257257 if (candidateLocale .length () >= 2 && scsLocale .length () >= 2
258258 && candidateLocale .startsWith (scsLocale )) {
259259 // Fall back to the applicable language
You can’t perform that action at this time.
0 commit comments