Reference IMA language code bug
PiperOrigin-RevId: 343883034
This commit is contained in:
parent
d5829336eb
commit
5b51cb7284
@ -1959,11 +1959,12 @@ public final class ImaAdsLoader
|
||||
|
||||
/**
|
||||
* Returns a language code that's suitable for passing to {@link ImaSdkSettings#setLanguage} and
|
||||
* corresponds to the device's {@link Locale#getDefault() default Locale}.
|
||||
* corresponds to the device's {@link Locale#getDefault() default Locale}. IMA will fall back to
|
||||
* its default language code ("en") if the value returned is unsupported.
|
||||
*/
|
||||
// TODO: It may be possible to define a better mapping onto IMA's supported language codes. See:
|
||||
// https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/localization.
|
||||
// IMA will fall back to its default language code ("en") if the value returned is unsupported.
|
||||
// [Internal ref: b/174042000] will help if implemented.
|
||||
private static String getImaLanguageCodeForDefaultLocale() {
|
||||
return Util.splitAtFirst(Util.getSystemLanguageCodes()[0], "-")[0];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user