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

Commit 786cec2f authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android (Google) Code Review
Browse files

Merge "Fix another deadlock between IMMS and TSMS" into nyc-mr1-dev

parents 7b68411d e3e31a88
Loading
Loading
Loading
Loading
+55 −51
Original line number Diff line number Diff line
@@ -459,13 +459,18 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
        if (!calledFromValidUser()) {
            return null;
        }
        final int subtypeHashCode;
        final SpellCheckerInfo sci;
        final Locale systemLocale;
        synchronized (mSpellCheckerMap) {
            final int subtypeHashCode =
            subtypeHashCode =
                    mSettings.getSelectedSpellCheckerSubtype(SpellCheckerSubtype.SUBTYPE_ID_NONE);
            if (DBG) {
                Slog.w(TAG, "getCurrentSpellCheckerSubtype: " + subtypeHashCode);
            }
            final SpellCheckerInfo sci = getCurrentSpellChecker(null);
            sci = getCurrentSpellChecker(null);
            systemLocale = mContext.getResources().getConfiguration().locale;
        }
        if (sci == null || sci.getSubtypeCount() == 0) {
            if (DBG) {
                Slog.w(TAG, "Subtype not found.");
@@ -493,7 +498,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
            }
            if (candidateLocale == null) {
                // 2. Use System locale if available in the spell checker
                    candidateLocale = mContext.getResources().getConfiguration().locale.toString();
                candidateLocale = systemLocale.toString();
            }
        }
        SpellCheckerSubtype candidate = null;
@@ -524,7 +529,6 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
        // spell check languages
        return candidate;
    }
    }

    @Override
    public void getSpellCheckerService(String sciId, String locale,