Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1235c24a authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Remove unused parameter from TSMS IPC

TextServicesManager always sets null to the "locale" parameter in
ITextServicesManager#getCurrentSpellCheckerSubtype then
TextServicesManagerService always ignores that parameter.  It can be
safely removed.

Bug: 110275412
Test: Manually verified that spell checker still works
Change-Id: I5d85089899b0bd077f69971d77095859086a8d52
parent af0dd06a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -222,8 +222,7 @@ public final class TextServicesManager {
    public SpellCheckerSubtype getCurrentSpellCheckerSubtype(
            boolean allowImplicitlySelectedSubtype) {
        try {
            // Passing null as a locale until we support multiple enabled spell checker subtypes.
            return mService.getCurrentSpellCheckerSubtype(null, allowImplicitlySelectedSubtype);
            return mService.getCurrentSpellCheckerSubtype(allowImplicitlySelectedSubtype);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
+1 −2
Original line number Diff line number Diff line
@@ -30,8 +30,7 @@ import android.view.textservice.SpellCheckerSubtype;
 */
interface ITextServicesManager {
    SpellCheckerInfo getCurrentSpellChecker(String locale);
    SpellCheckerSubtype getCurrentSpellCheckerSubtype(
            String locale, boolean allowImplicitlySelectedSubtype);
    SpellCheckerSubtype getCurrentSpellCheckerSubtype(boolean allowImplicitlySelectedSubtype);
    oneway void getSpellCheckerService(String sciId, in String locale,
            in ITextServicesSessionListener tsListener,
            in ISpellCheckerSessionListener scListener, in Bundle bundle);
+2 −3
Original line number Diff line number Diff line
@@ -510,7 +510,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
    // TODO: Save SpellCheckerSubtype by supported languages by looking at "locale".
    @Override
    public SpellCheckerSubtype getCurrentSpellCheckerSubtype(
            String locale, boolean allowImplicitlySelectedSubtype) {
            boolean allowImplicitlySelectedSubtype) {
        final int subtypeHashCode;
        final SpellCheckerInfo sci;
        final Locale systemLocale;
@@ -574,8 +574,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
                }
            } else if (scs.hashCode() == subtypeHashCode) {
                if (DBG) {
                    Slog.w(TAG, "Return subtype " + scs.hashCode() + ", input= " + locale
                            + ", " + scs.getLocale());
                    Slog.w(TAG, "Return subtype " + scs.hashCode() + ", " + scs.getLocale());
                }
                // 3. Use the user specified spell check language
                return scs;