Workaround for #9726

This commit is contained in:
yashikada
2026-03-01 16:29:09 +01:00
committed by John Wu
parent 6bb48df712
commit 7845da2943

View File

@@ -123,7 +123,7 @@ interface LocaleSetting {
names.add(AppContext.getString(R.string.system_default)) names.add(AppContext.getString(R.string.system_default))
tags.add("") tags.add("")
if (Build.VERSION.SDK_INT >= 34) { if ((Build.VERSION.SDK_INT == 34 && !isRunningAsStub) || Build.VERSION.SDK_INT >= 35) {
// Use platform LocaleConfig parser // Use platform LocaleConfig parser
val config = localeConfig val config = localeConfig
val list = config.supportedLocales ?: LocaleList.getEmptyLocaleList() val list = config.supportedLocales ?: LocaleList.getEmptyLocaleList()
@@ -168,7 +168,7 @@ interface LocaleSetting {
} }
private val localeManagerUsable get() = private val localeManagerUsable get() =
if (isRunningAsStub) Build.VERSION.SDK_INT >= 34 else Build.VERSION.SDK_INT >= 33 if (isRunningAsStub) Build.VERSION.SDK_INT >= 35 else Build.VERSION.SDK_INT >= 33
val useLocaleManager by lazy { val useLocaleManager by lazy {
localeManagerUsable && localeManagerUsable &&