diff --git a/app/build.gradle b/app/build.gradle index aca700192..24ffc5a65 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,8 +19,8 @@ android { applicationId 'org.koitharu.kotatsu' minSdk = 21 targetSdk = 35 - versionCode = 1011 - versionName = '8.1.5' + versionCode = 1012 + versionName = '8.1.6' generatedDensities = [] testInstrumentationRunner 'org.koitharu.kotatsu.HiltTestRunner' ksp { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 840fb88d3..e2a343fd5 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -52,6 +52,7 @@ android:hasFragileUserData="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" + android:localeConfig="@xml/locales_config" android:largeHeap="true" android:networkSecurityConfig="@xml/network_security_config" android:requestLegacyExternalStorage="true" diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/core/util/ext/Android.kt b/app/src/main/kotlin/org/koitharu/kotatsu/core/util/ext/Android.kt index 9f301b28f..cfd5c5967 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/core/util/ext/Android.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/core/util/ext/Android.kt @@ -1,7 +1,6 @@ package org.koitharu.kotatsu.core.util.ext import android.Manifest -import android.annotation.SuppressLint import android.app.Activity import android.app.ActivityManager import android.app.ActivityManager.MemoryInfo @@ -53,6 +52,7 @@ import okio.use import org.json.JSONException import org.jsoup.internal.StringUtil.StringJoiner import org.koitharu.kotatsu.BuildConfig +import org.koitharu.kotatsu.R import org.koitharu.kotatsu.main.ui.MainActivity import org.koitharu.kotatsu.parsers.util.runCatchingCancellable import org.xmlpull.v1.XmlPullParser @@ -140,7 +140,6 @@ val Context.ramAvailable: Long return result.availMem } -@SuppressLint("DiscouragedApi") fun Context.getLocalesConfig(): LocaleListCompat { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { LocaleConfig(this).supportedLocales?.let { @@ -149,8 +148,7 @@ fun Context.getLocalesConfig(): LocaleListCompat { } val tagsList = StringJoiner(",") try { - val resId = resources.getIdentifier("_generated_res_locale_config", "xml", packageName) - val xpp: XmlPullParser = resources.getXml(resId) + val xpp: XmlPullParser = resources.getXml(R.xml.locales_config) while (xpp.eventType != XmlPullParser.END_DOCUMENT) { if (xpp.eventType == XmlPullParser.START_TAG) { if (xpp.name == "locale") { diff --git a/app/src/main/res/xml/locales_config.xml b/app/src/main/res/xml/locales_config.xml index b26cc38d0..90a9c202b 100644 --- a/app/src/main/res/xml/locales_config.xml +++ b/app/src/main/res/xml/locales_config.xml @@ -1,59 +1,62 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +