refactor: test HyperOS 2.0

This commit is contained in:
2024-11-02 00:25:00 +08:00
parent 94f3fd12cd
commit b10ff658ab
2 changed files with 3 additions and 3 deletions

View File

@@ -114,7 +114,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
showDialog {
title = "不支持的系统版本"
msg = (if (miSystemVersion.isNotBlank())
"此模块目前支持 MIUI 11~14 和 HyperOS 1.0 系统,你的系统版本为 $miSystemVersion,暂不支持。\n\n" +
"此模块目前支持 MIUI 11~14 和 HyperOS 1.0~2.0 系统,你的系统版本为 $miSystemVersion,暂不支持。\n\n" +
"如果你的系统版本识别有误,请检查是否有相关插件修改了系统版本。\n\n"
else "无法获取系统版本,请检查你是否修改了系统参数或使用非官方系统。\n\n") + "若有其它疑问,你可以点击下方按钮前往项目地址进行反馈。"
confirmButton(text = "前往项目地址") {

View File

@@ -175,7 +175,7 @@ inline val isNotMIOS get() = !isMIOS
val isSupportMiSystemVersion
get() = when {
isMIOS -> when (miosVersion) {
"1.0", "1.1" -> true
"1.0", "1.1", "2.0" -> true
else -> false
}
isMIUI -> when (miuiVersion) {
@@ -720,4 +720,4 @@ fun Context.hideOrShowLauncherIcon(isShow: Boolean) {
val Context.isLauncherIconShowing
get() = packageManager?.getComponentEnabledSetting(
ComponentName(packageName, "${BuildConfigWrapper.APPLICATION_ID}.Home")
) != PackageManager.COMPONENT_ENABLED_STATE_DISABLED
) != PackageManager.COMPONENT_ENABLED_STATE_DISABLED