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

Commit 40d51e70 authored by Przemyslaw Szczepaniak's avatar Przemyslaw Szczepaniak Committed by Android (Google) Code Review
Browse files

Make TtsEngines.getDefaultLocale() method public

TtsEngines is hidden class, it's not a public API.
It's required for tracking system language setting by TTS engines
(Change: Ic4bde97ef7406adb64cc03efbe660275360ba3af )

Bug: 8613986
Change-Id: Iafafcdb244e1520893bee65febd5a137e3556317
parent 7fb27f74
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -355,7 +355,18 @@ public class TtsEngines {
        return v1Locale;
    }

    private String getDefaultLocale() {
    /**
     * Return the default device locale in form of 3 letter codes delimited by
     * {@link #LOCALE_DELIMITER}:
     * <ul>
     *   <li> "ISO 639-2/T language code" if locale have no country entry</li>
     *   <li> "ISO 639-2/T language code{@link #LOCALE_DELIMITER}ISO 3166 country code "
     *     if locale have no variant entry</li>
     *   <li> "ISO 639-2/T language code{@link #LOCALE_DELIMITER}ISO 3166 country code
     *     {@link #LOCALE_DELIMITER} variant" if locale have variant entry</li>
     * </ul>
     */
    public String getDefaultLocale() {
        final Locale locale = Locale.getDefault();

        // Note that the default locale might have an empty variant