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

Commit 7fa2d8cf authored by Yohei Yukawa's avatar Yohei Yukawa Committed by android-build-merger
Browse files

Fix another deadlock between IMMS and TSMS

am: e3e31a88

Change-Id: I4c622e7e55eedb5667b5e89f6fea51b262c4ae75
parents 518969b8 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,