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

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

Fix another deadlock between IMMS and TSMS am: e3e31a88

am: 7fa2d8cf

Change-Id: Id34f9ce36ea64f453ac1e2584ef56fa191c76715
parents 7751e1a2 7fa2d8cf
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,