lets not use the old way of updating app configuration on Android 7+

This commit is contained in:
tibbi 2020-09-19 10:15:43 +02:00
parent 22f13286be
commit 35e64de3a8
2 changed files with 3 additions and 2 deletions

View file

@ -6,7 +6,7 @@ buildscript {
propMinSdkVersion = 21
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '5.30.9'
propVersionName = '5.30.10'
kotlin_version = '1.4.10'
}

View file

@ -1,10 +1,11 @@
package com.simplemobiletools.commons.extensions
import android.app.Application
import com.simplemobiletools.commons.helpers.isNougatPlus
import java.util.*
fun Application.checkUseEnglish() {
if (baseConfig.useEnglish) {
if (baseConfig.useEnglish && !isNougatPlus()) {
val conf = resources.configuration
conf.locale = Locale.ENGLISH
resources.updateConfiguration(conf, resources.displayMetrics)