/aosp14/frameworks/base/services/core/java/com/android/server/location/countrydetector/ |
H A D | ComprehensiveCountryDetector.java | 136 mCountryFromLocation = country; 187 private void addToLogs(Country country) { in addToLogs() argument 188 if (country == null) { in addToLogs() 198 mLastCountryAddedToLogs = country; in addToLogs() 205 Slog.d(TAG, country.toString()); in addToLogs() 207 mDebugLogs.add(country); in addToLogs() 271 Country country = getCountry(); in detectCountry() local 274 mCountry = country; in detectCountry() 402 && (country == null || !country.equals(detectedCountry))) { in notifyIfCountryChanged() 492 for (Country country : mDebugLogs) { in toString() [all …]
|
H A D | CountryDetectorBase.java | 69 protected void notifyListener(Country country) { in notifyListener() argument 71 mListener.onCountryDetected(country); in notifyListener()
|
H A D | LocationBasedCountryDetector.java | 76 String country = null; in getCountryFromLocation() local 82 country = addresses.get(0).getCountryCode(); in getCountryFromLocation() 87 return country; in getCountryFromLocation()
|
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/location/countrydetector/ |
H A D | ComprehensiveCountryDetectorTest.java | 38 mNotifiedCountry = country; in notifyLocationBasedListener() 129 public void onCountryDetected(Country country) { 131 mCountry = country; 154 Country country = countryDetector.detectCountry(); 155 assertTrue(sameCountry(country, resultCountry)); 175 Country country = countryDetector.detectCountry(); 176 assertTrue(sameCountry(country, resultCountry)); 199 assertTrue(sameCountry(country, resultCountry)); 220 assertTrue(sameCountry(country, resultCountry)); 241 assertTrue(sameCountry(country, resultCountry)); [all …]
|
H A D | LocationBasedCountryDetectorTest.java | 47 this(country, provider, 1000 * 60 * 5); in TestCountryDetector() 52 mCountry = country; in TestCountryDetector() 158 public void onCountryDetected(Country country) { in onCountryDetected() argument 160 if (country != null) { in onCountryDetected() 161 mCountryCode = country.getCountryIso(); in onCountryDetected() 183 final String country = "us"; in testFindingCountryCommon() local 220 final String country = "us"; in testFindingCountryCancelled() local 245 final String country = "us"; in testFindingLocationCancelled() local 263 final String country = "us"; in testFindingLocationFailed() local 286 final String country = "us"; in testFindingCountryFailed() local [all …]
|
/aosp14/frameworks/base/tests/TtsTests/src/com/android/speech/tts/ |
H A D | MockableTextToSpeechService.java | 40 protected int onIsLanguageAvailable(String lang, String country, String variant) { in onIsLanguageAvailable() argument 41 return sDelegate.onIsLanguageAvailable(lang, country, variant); in onIsLanguageAvailable() 50 protected int onLoadLanguage(String lang, String country, String variant) { in onLoadLanguage() argument 51 return sDelegate.onLoadLanguage(lang, country, variant); in onLoadLanguage() 65 int onIsLanguageAvailable(String lang, String country, String variant); in onIsLanguageAvailable() argument 69 int onLoadLanguage(String lang, String country, String variant); in onLoadLanguage() argument
|
/aosp14/frameworks/base/location/java/android/location/ |
H A D | Country.java | 124 public Country(Country country) { in Country() argument 125 mCountryIso = country.mCountryIso; in Country() 126 mSource = country.mSource; in Country() 127 mTimestamp = country.mTimestamp; in Country() 242 public boolean equalsIgnoreSource(Country country) { in equalsIgnoreSource() argument 243 return country != null && mCountryIso.equals(country.getCountryIso()); in equalsIgnoreSource()
|
H A D | CountryListener.java | 34 void onCountryDetected(Country country); in onCountryDetected() argument 39 default void accept(Country country) { in accept() argument 40 onCountryDetected(country); in accept()
|
H A D | GeocoderParams.java | 101 String country = in.readString8(); 105 new Locale(language, country, variant));
|
H A D | CountryDetector.java | 81 public void onCountryDetected(final Country country) { in onCountryDetected() argument 82 mExecutor.execute(() -> mListener.accept(country)); in onCountryDetected()
|
H A D | ICountryListener.aidl | 25 void onCountryDetected(in Country country); in onCountryDetected() argument
|
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/ |
H A D | CountryDetectorServiceTest.java | 64 public void onCountryDetected(Country country) { in onCountryDetected() argument 65 mCountry = country; in onCountryDetected() 85 public void notifyReceivers(Country country) { in notifyReceivers() argument 86 super.notifyReceivers(country); in notifyReceivers() 177 Country country = new Country("US", Country.COUNTRY_SOURCE_NETWORK); in notifyReceivers_twoListenersRegistered_bothNotified() local 185 mCountryDetectorService.notifyReceivers(country); in notifyReceivers_twoListenersRegistered_bothNotified() 189 expect.that(countryListenerA.getCountry().equalsIgnoreSource(country)).isTrue(); in notifyReceivers_twoListenersRegistered_bothNotified() 190 expect.that(countryListenerB.getCountry().equalsIgnoreSource(country)).isTrue(); in notifyReceivers_twoListenersRegistered_bothNotified()
|
/aosp14/frameworks/base/core/java/android/speech/tts/ |
H A D | TtsEngines.java | 95 for (String country : Locale.getISOCountries()) { 97 normalizeCountry.put(new Locale("", country).getISO3Country(), country); in normalizeCountry.put() argument 386 String language = "", country = "", variant = ""; in parseLocaleString() local 402 country = split[1].toUpperCase(); in parseLocaleString() 415 String normalizedCountry= sNormalizeCountry.get(country); in parseLocaleString() 417 country = normalizedCountry; in parseLocaleString() 423 Locale result = new Locale(language, country, variant); in parseLocaleString() 455 String country = ttsLocale.getCountry(); in normalizeTTSLocale() local 456 if (!TextUtils.isEmpty(country)) { in normalizeTTSLocale() 457 String normalizedCountry= sNormalizeCountry.get(country); in normalizeTTSLocale() [all …]
|
H A D | ITextToSpeechService.aidl | 134 int isLanguageAvailable(in String lang, in String country, in String variant); in isLanguageAvailable() argument 149 String[] getFeaturesForLanguage(in String lang, in String country, in String variant); in getFeaturesForLanguage() argument 166 int loadLanguage(in IBinder caller, in String lang, in String country, in String variant); in loadLanguage() argument 209 String getDefaultVoiceNameFor(in String lang, in String country, in String variant); in getDefaultVoiceNameFor() argument
|
H A D | TextToSpeechService.java | 320 int localeStatus = onIsLanguageAvailable(lang, country, variant); in onGetDefaultVoiceNameFor() 327 iso3Locale = new Locale(lang, country); in onGetDefaultVoiceNameFor() 330 iso3Locale = new Locale(lang, country, variant); in onGetDefaultVoiceNameFor() 1207 String language, String country, String variant) { in LoadLanguageItem() argument 1210 mCountry = country; in LoadLanguageItem() 1401 return onIsLanguageAvailable(lang, country, variant); 1406 String lang, String country, String variant) { 1428 int retVal = onIsLanguageAvailable(lang, country, variant); 1440 country, 1482 int retVal = onIsLanguageAvailable(lang, country, variant); [all …]
|
H A D | TextToSpeech.java | 1584 String language = null, country = null; 1593 country = loc.getISO3Country(); 1612 + country + "-" + variant); 1629 + language + "-" + country + "-" + variant 1689 String country = mParams.getString(Engine.KEY_PARAM_COUNTRY, ""); 1691 return new Locale(lang, country, variant); 1754 String country = ""; 1756 country = voice.getLocale().getISO3Country(); 1762 mParams.putString(Engine.KEY_PARAM_COUNTRY, country); 1870 String language = null, country = null; [all …]
|
H A D | SynthesisRequest.java | 137 void setLanguage(String language, String country, String variant) { in setLanguage() argument 139 mCountry = country; in setLanguage()
|
/aosp14/frameworks/base/services/core/java/com/android/server/ |
H A D | CountryDetectorService.java | 151 final Country country = detectCountry(); in addListener() local 152 if (country != null) { in addListener() 153 listener.onCountryDetected(country); in addListener() 176 protected void notifyReceivers(Country country) { in notifyReceivers() argument 180 receiver.getListener().onCountryDetected(country); in notifyReceivers() 209 mLocationBasedDetectorListener = country -> mHandler.post(() -> notifyReceivers(country)); in initialize()
|
/aosp14/frameworks/base/services/people/java/com/android/server/people/data/ |
H A D | Utils.java | 36 Country country = detector.detectCountry(); in getCurrentCountryIso() local 37 if (country != null) { in getCurrentCountryIso() 38 countryIso = country.getCountryIso(); in getCurrentCountryIso()
|
/aosp14/frameworks/base/services/core/java/com/android/server/textservices/ |
H A D | LocaleUtils.java | 75 final String country = systemLocale.getCountry(); in getSuitableLocalesForSpellChecker() local 76 final boolean hasCountry = !TextUtils.isEmpty(country); in getSuitableLocalesForSpellChecker() 80 systemLocaleLanguageCountryVariant = new Locale(language, country, variant); in getSuitableLocalesForSpellChecker() 85 systemLocaleLanguageCountry = new Locale(language, country); in getSuitableLocalesForSpellChecker()
|
/aosp14/frameworks/base/native/android/ |
H A D | configuration.cpp | 63 outCountry[0] = config->country[0]; in AConfiguration_getCountry() 64 outCountry[1] = config->country[1]; in AConfiguration_getCountry() 155 void AConfiguration_setCountry(AConfiguration* config, const char* country) { in AConfiguration_setCountry() argument 156 config->country[0] = country[0]; in AConfiguration_setCountry() 157 config->country[1] = country[1]; in AConfiguration_setCountry()
|
/aosp14/frameworks/base/tools/aapt2/filter/ |
H A D | ConfigFilter.cpp | 64 android::localeDataComputeScript(script_buffer, config.language, config.country); in ScriptsMatch() 70 android::localeDataComputeScript(script_buffer, entry.language, entry.country); in ScriptsMatch() 104 if (config.language[0] != '\0' && config.country[0] == '\0' && in Match()
|
/aosp14/frameworks/base/tools/aapt/ |
H A D | ResourceFilter.cpp | 80 localeDataComputeScript(scriptBuffer, config.language, config.country); in scriptsMatch() 87 scriptBuffer, entry.language, entry.country); in scriptsMatch() 125 config.country[0] == '\0' && in match()
|
/aosp14/frameworks/base/core/java/com/android/internal/app/ |
H A D | LocaleHelper.java | 117 final String country = ULocale.getDisplayCountry(languageTag, uDisplayLocale); in getDisplayCountry() local 120 return String.format("%s (%s)", country, in getDisplayCountry() 123 return country; in getDisplayCountry()
|
/aosp14/frameworks/base/tools/aapt2/test/ |
H A D | Builders.h | 224 ConfigDescriptionBuilder& setCountry(uint16_t country) { in setCountry() argument 225 config_.country[0] = country >> 8; in setCountry() 226 config_.country[1] = country & 0xff; in setCountry()
|