Loading services/core/java/com/android/server/TextServicesManagerService.java +7 −11 Original line number Original line Diff line number Diff line Loading @@ -191,7 +191,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { // Set the current spell checker if there is one or more spell checkers // Set the current spell checker if there is one or more spell checkers // available. In this case, "sci" is the first one in the available spell // available. In this case, "sci" is the first one in the available spell // checkers. // checkers. setCurrentSpellCheckerLocked(sci.getId()); setCurrentSpellCheckerLocked(sci); } } } } } } Loading Loading @@ -230,9 +230,10 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { change == PACKAGE_PERMANENT_CHANGE || change == PACKAGE_TEMPORARY_CHANGE change == PACKAGE_PERMANENT_CHANGE || change == PACKAGE_TEMPORARY_CHANGE // Package modified // Package modified || isPackageModified(packageName)) { || isPackageModified(packageName)) { sci = findAvailSpellCheckerLocked(packageName); SpellCheckerInfo availSci = findAvailSpellCheckerLocked(packageName); if (sci != null) { // Set the spell checker settings if different than before setCurrentSpellCheckerLocked(sci.getId()); if (availSci != null && !availSci.getId().equals(sci.getId())) { setCurrentSpellCheckerLocked(availSci); } } } } } } Loading Loading @@ -643,16 +644,11 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { } } } } private void setCurrentSpellCheckerLocked(String sciId) { private void setCurrentSpellCheckerLocked(SpellCheckerInfo sci) { final String sciId = sci.getId(); if (DBG) { if (DBG) { Slog.w(TAG, "setCurrentSpellChecker: " + sciId); Slog.w(TAG, "setCurrentSpellChecker: " + sciId); } } if (TextUtils.isEmpty(sciId) || !mSpellCheckerMap.containsKey(sciId)) return; final SpellCheckerInfo currentSci = getCurrentSpellChecker(null); if (currentSci != null && currentSci.getId().equals(sciId)) { // Do nothing if the current spell checker is same as new spell checker. return; } final long ident = Binder.clearCallingIdentity(); final long ident = Binder.clearCallingIdentity(); try { try { mSettings.putSelectedSpellChecker(sciId); mSettings.putSelectedSpellChecker(sciId); Loading Loading
services/core/java/com/android/server/TextServicesManagerService.java +7 −11 Original line number Original line Diff line number Diff line Loading @@ -191,7 +191,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { // Set the current spell checker if there is one or more spell checkers // Set the current spell checker if there is one or more spell checkers // available. In this case, "sci" is the first one in the available spell // available. In this case, "sci" is the first one in the available spell // checkers. // checkers. setCurrentSpellCheckerLocked(sci.getId()); setCurrentSpellCheckerLocked(sci); } } } } } } Loading Loading @@ -230,9 +230,10 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { change == PACKAGE_PERMANENT_CHANGE || change == PACKAGE_TEMPORARY_CHANGE change == PACKAGE_PERMANENT_CHANGE || change == PACKAGE_TEMPORARY_CHANGE // Package modified // Package modified || isPackageModified(packageName)) { || isPackageModified(packageName)) { sci = findAvailSpellCheckerLocked(packageName); SpellCheckerInfo availSci = findAvailSpellCheckerLocked(packageName); if (sci != null) { // Set the spell checker settings if different than before setCurrentSpellCheckerLocked(sci.getId()); if (availSci != null && !availSci.getId().equals(sci.getId())) { setCurrentSpellCheckerLocked(availSci); } } } } } } Loading Loading @@ -643,16 +644,11 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { } } } } private void setCurrentSpellCheckerLocked(String sciId) { private void setCurrentSpellCheckerLocked(SpellCheckerInfo sci) { final String sciId = sci.getId(); if (DBG) { if (DBG) { Slog.w(TAG, "setCurrentSpellChecker: " + sciId); Slog.w(TAG, "setCurrentSpellChecker: " + sciId); } } if (TextUtils.isEmpty(sciId) || !mSpellCheckerMap.containsKey(sciId)) return; final SpellCheckerInfo currentSci = getCurrentSpellChecker(null); if (currentSci != null && currentSci.getId().equals(sciId)) { // Do nothing if the current spell checker is same as new spell checker. return; } final long ident = Binder.clearCallingIdentity(); final long ident = Binder.clearCallingIdentity(); try { try { mSettings.putSelectedSpellChecker(sciId); mSettings.putSelectedSpellChecker(sciId); Loading