|
|
@ -16,7 +16,7 @@ object AppContextWrapper { |
|
|
|
fun wrap(context: Context): Context { |
|
|
|
fun wrap(context: Context): Context { |
|
|
|
var fontScale = context.getPrefInt(PreferKey.fontScale) / 10f |
|
|
|
var fontScale = context.getPrefInt(PreferKey.fontScale) / 10f |
|
|
|
if (fontScale !in 0.8f..1.6f) { |
|
|
|
if (fontScale !in 0.8f..1.6f) { |
|
|
|
fontScale = Configuration().fontScale |
|
|
|
fontScale = 0f |
|
|
|
} |
|
|
|
} |
|
|
|
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { |
|
|
|
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { |
|
|
|
val resources: Resources = context.resources |
|
|
|
val resources: Resources = context.resources |
|
|
|