parent
3be05fbf9b
commit
4cd01428ed
@ -123,7 +123,7 @@ private fun ExtensionContent(
|
|||||||
onClickUpdateAll: () -> Unit,
|
onClickUpdateAll: () -> Unit,
|
||||||
) {
|
) {
|
||||||
var trustState by remember { mutableStateOf<Extension.Untrusted?>(null) }
|
var trustState by remember { mutableStateOf<Extension.Untrusted?>(null) }
|
||||||
val showMiuiWarning = DeviceUtil.isMiui && !DeviceUtil.isMiuiOptimizationDisabled()
|
val showMiuiWarning = DeviceUtil.isMiui && DeviceUtil.miuiMajorVersion >= 13 && !DeviceUtil.isMiuiOptimizationDisabled()
|
||||||
val uriHandler = LocalUriHandler.current
|
val uriHandler = LocalUriHandler.current
|
||||||
|
|
||||||
FastScrollLazyColumn(
|
FastScrollLazyColumn(
|
||||||
|
@ -10,6 +10,20 @@ object DeviceUtil {
|
|||||||
getSystemProperty("ro.miui.ui.version.name")?.isNotEmpty() ?: false
|
getSystemProperty("ro.miui.ui.version.name")?.isNotEmpty() ?: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extracts the MIUI major version code from a string like "V12.5.3.0.QFGMIXM".
|
||||||
|
*
|
||||||
|
* @return MIUI major version code (e.g., 13) or -1 if can't be parsed.
|
||||||
|
*/
|
||||||
|
val miuiMajorVersion by lazy {
|
||||||
|
if (!isMiui) return@lazy -1
|
||||||
|
|
||||||
|
Build.VERSION.INCREMENTAL
|
||||||
|
.substringBefore('.')
|
||||||
|
.trimStart('V')
|
||||||
|
.toIntOrNull() ?: -1
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressLint("PrivateApi")
|
@SuppressLint("PrivateApi")
|
||||||
fun isMiuiOptimizationDisabled(): Boolean {
|
fun isMiuiOptimizationDisabled(): Boolean {
|
||||||
val sysProp = getSystemProperty("persist.sys.miui_optimization")
|
val sysProp = getSystemProperty("persist.sys.miui_optimization")
|
||||||
|
@ -305,7 +305,7 @@
|
|||||||
<string name="ext_installer_shizuku" translatable="false">Shizuku</string>
|
<string name="ext_installer_shizuku" translatable="false">Shizuku</string>
|
||||||
<string name="ext_installer_shizuku_stopped">Shizuku is not running</string>
|
<string name="ext_installer_shizuku_stopped">Shizuku is not running</string>
|
||||||
<string name="ext_installer_shizuku_unavailable_dialog">Install and start Shizuku to use Shizuku as extension installer.</string>
|
<string name="ext_installer_shizuku_unavailable_dialog">Install and start Shizuku to use Shizuku as extension installer.</string>
|
||||||
<string name="ext_miui_warning">Installing extensions may not work if MIUI Optimization is enabled. Try disabling it or installing from the website instead.</string>
|
<string name="ext_miui_warning">Installing extensions may not work if MIUI Optimization is enabled. Try disabling it or tap here to download from the website instead.</string>
|
||||||
|
|
||||||
<!-- Reader section -->
|
<!-- Reader section -->
|
||||||
<string name="pref_fullscreen">Fullscreen</string>
|
<string name="pref_fullscreen">Fullscreen</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user