diff --git a/app/src/main/kotlin/star/sky/voyager/activity/pages/apps/MiAiPage.kt b/app/src/main/kotlin/star/sky/voyager/activity/pages/apps/MiAiPage.kt
index 6d2aa90a..787351c1 100644
--- a/app/src/main/kotlin/star/sky/voyager/activity/pages/apps/MiAiPage.kt
+++ b/app/src/main/kotlin/star/sky/voyager/activity/pages/apps/MiAiPage.kt
@@ -138,11 +138,6 @@ class MiAiPage : BasePage() {
textId = R.string.meeting_mode,
), SwitchV("meeting_mode")
)
- TextSummaryWithSwitch(
- TextSummaryV(
- textId = R.string.aiasst_vision_new_voip,
- ), SwitchV("aiasst_vision_new_voip")
- )
TextSummaryWithSwitch(
TextSummaryV(
textId = R.string.desktop_mode_screen_translate,
diff --git a/app/src/main/kotlin/star/sky/voyager/hook/apps/AiasstVision.kt b/app/src/main/kotlin/star/sky/voyager/hook/apps/AiasstVision.kt
index 9b3f1cae..2de471fb 100644
--- a/app/src/main/kotlin/star/sky/voyager/hook/apps/AiasstVision.kt
+++ b/app/src/main/kotlin/star/sky/voyager/hook/apps/AiasstVision.kt
@@ -3,7 +3,6 @@ package star.sky.voyager.hook.apps
import de.robv.android.xposed.callbacks.XC_LoadPackage
import star.sky.voyager.hook.hooks.aiasstvision.DesktopModeScreenTranslate
import star.sky.voyager.hook.hooks.aiasstvision.MeetingMode
-import star.sky.voyager.hook.hooks.aiasstvision.NewVoip
import star.sky.voyager.hook.hooks.aiasstvision.SplitScreenTranslate
import star.sky.voyager.utils.init.AppRegister
@@ -14,7 +13,6 @@ object AiasstVision : AppRegister() {
autoInitHooks(
lpparam,
MeetingMode, // 解锁会议模式
- NewVoip, //
DesktopModeScreenTranslate, // 允许在工作台模式下使用屏幕翻译
SplitScreenTranslate, // 解锁分屏翻译
)
diff --git a/app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/MeetingMode.kt b/app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/MeetingMode.kt
index 48fd3dd3..f1118b24 100644
--- a/app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/MeetingMode.kt
+++ b/app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/MeetingMode.kt
@@ -1,17 +1,14 @@
package star.sky.voyager.hook.hooks.aiasstvision
-import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks
import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
import star.sky.voyager.utils.init.HookRegister
import star.sky.voyager.utils.key.hasEnable
+import star.sky.voyager.utils.voyager.LazyClass.AiasstVisionSystemUtilsCls
object MeetingMode : HookRegister() {
override fun init() = hasEnable("meeting_mode") {
- val systemUtilsCls =
- loadClass("com.xiaomi.aiasst.vision.utils.SystemUtils")
-
- systemUtilsCls.methodFinder().filter {
+ AiasstVisionSystemUtilsCls.methodFinder().filter {
name in setOf(
"isSupportNewVoip",
"isM81",
diff --git a/app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/NewVoip.kt b/app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/NewVoip.kt
deleted file mode 100644
index 0b31e072..00000000
--- a/app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/NewVoip.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-package star.sky.voyager.hook.hooks.aiasstvision
-
-import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
-import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
-import star.sky.voyager.utils.init.HookRegister
-import star.sky.voyager.utils.key.hasEnable
-import star.sky.voyager.utils.voyager.LazyClass.AiasstVisionSystemUtilsCls
-
-object NewVoip : HookRegister() {
- override fun init() = hasEnable("aiasst_vision_new_voip") {
- AiasstVisionSystemUtilsCls.methodFinder()
- .filterByName("isSupportNewVoip")
- .first().createHook {
- returnConstant(true)
- }
-
- }
-}
\ No newline at end of file
diff --git a/app/src/main/kotlin/star/sky/voyager/hook/hooks/android/DarkModeForAllApps.kt b/app/src/main/kotlin/star/sky/voyager/hook/hooks/android/DarkModeForAllApps.kt
index 634fbdf3..e1de1250 100644
--- a/app/src/main/kotlin/star/sky/voyager/hook/hooks/android/DarkModeForAllApps.kt
+++ b/app/src/main/kotlin/star/sky/voyager/hook/hooks/android/DarkModeForAllApps.kt
@@ -8,6 +8,7 @@ import com.github.kyuubiran.ezxhelper.ObjectUtils.invokeMethodBestMatch
import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
import star.sky.voyager.utils.init.HookRegister
import star.sky.voyager.utils.key.hasEnable
+import star.sky.voyager.utils.voyager.LazyClass.MiuiBuildCls
import star.sky.voyager.utils.yife.Build.IS_INTERNATIONAL_BUILD
object DarkModeForAllApps : HookRegister() {
@@ -18,11 +19,11 @@ object DarkModeForAllApps : HookRegister() {
clazzForceDarkAppListManager.methodFinder().filterByName("getDarkModeAppList").toList()
.createHooks {
before {
- setStaticObject(loadClass("miui.os.Build"), "IS_INTERNATIONAL_BUILD", true)
+ setStaticObject(MiuiBuildCls, "IS_INTERNATIONAL_BUILD", true)
}
after {
setStaticObject(
- loadClass("miui.os.Build"),
+ MiuiBuildCls,
"IS_INTERNATIONAL_BUILD",
IS_INTERNATIONAL_BUILD
)
diff --git a/app/src/main/kotlin/star/sky/voyager/hook/hooks/fileexplorer/SelectName.kt b/app/src/main/kotlin/star/sky/voyager/hook/hooks/fileexplorer/SelectName.kt
index eb23751b..a3aafa94 100644
--- a/app/src/main/kotlin/star/sky/voyager/hook/hooks/fileexplorer/SelectName.kt
+++ b/app/src/main/kotlin/star/sky/voyager/hook/hooks/fileexplorer/SelectName.kt
@@ -11,6 +11,13 @@ import star.sky.voyager.utils.yife.XSharedPreferences.getBoolean
object SelectName : HookRegister() {
override fun init() {
+ val selectable by lazy {
+ getBoolean("file_explorer_can_selectable", false)
+ }
+ val singleLine by lazy {
+ getBoolean("file_explorer_is_single_line", false)
+ }
+ if (selectable && !singleLine) return
hasEnable("file_explorer_can_selectable") {
hasEnable("file_explorer_is_single_line") {
loadClass("com.android.fileexplorer.view.FileListItem").methodFinder()
@@ -22,10 +29,7 @@ object SelectName : HookRegister() {
"mFileNameTextView"
))?.apply {
setTextIsSelectable(
- getBoolean(
- "file_explorer_can_selectable",
- false
- )
+ selectable
)
isSingleLine = getBoolean("file_explorer_is_single_line", false)
}
diff --git a/app/src/main/kotlin/star/sky/voyager/hook/hooks/home/RestoreSwitchMinusScreen.kt b/app/src/main/kotlin/star/sky/voyager/hook/hooks/home/RestoreSwitchMinusScreen.kt
index 7aaa6bec..621212a0 100644
--- a/app/src/main/kotlin/star/sky/voyager/hook/hooks/home/RestoreSwitchMinusScreen.kt
+++ b/app/src/main/kotlin/star/sky/voyager/hook/hooks/home/RestoreSwitchMinusScreen.kt
@@ -13,11 +13,11 @@ import com.github.kyuubiran.ezxhelper.ObjectUtils.invokeMethodBestMatch
import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
import star.sky.voyager.utils.init.HookRegister
import star.sky.voyager.utils.key.hasEnable
+import star.sky.voyager.utils.voyager.LazyClass.MiuiBuildCls
object RestoreSwitchMinusScreen : HookRegister() {
override fun init() = hasEnable("restore_switch_minus_screen") {
val clazzUtilities = loadClass("com.miui.home.launcher.common.Utilities")
- val clazzMiuiBuild = loadClass("miui.os.Build")
val clazzLauncher = loadClass("com.miui.home.launcher.Launcher")
val clazzMiuiHomeSettings = loadClass("com.miui.home.settings.MiuiHomeSettings")
loadClass("com.miui.home.launcher.DeviceConfig").methodFinder()
@@ -39,21 +39,21 @@ object RestoreSwitchMinusScreen : HookRegister() {
clazzUtilities, "getCurrentPersonalAssistant"
)!! as String) == "personal_assistant_google"
setStaticObject(
- clazzMiuiBuild,
+ MiuiBuildCls,
"IS_INTERNATIONAL_BUILD",
isPersonalAssistantGoogle
)
}
after {
- setStaticObject(clazzMiuiBuild, "IS_INTERNATIONAL_BUILD", false)
+ setStaticObject(MiuiBuildCls, "IS_INTERNATIONAL_BUILD", false)
}
}
clazzLauncher.declaredConstructors.createHooks {
before {
- setStaticObject(clazzMiuiBuild, "IS_INTERNATIONAL_BUILD", true)
+ setStaticObject(MiuiBuildCls, "IS_INTERNATIONAL_BUILD", true)
}
after {
- setStaticObject(clazzMiuiBuild, "IS_INTERNATIONAL_BUILD", false)
+ setStaticObject(MiuiBuildCls, "IS_INTERNATIONAL_BUILD", false)
}
}
clazzMiuiHomeSettings.methodFinder().filterByName("onCreatePreferences")
diff --git a/app/src/main/kotlin/star/sky/voyager/hook/hooks/mediaeditor/FilterManager.kt b/app/src/main/kotlin/star/sky/voyager/hook/hooks/mediaeditor/FilterManager.kt
index 9b37e654..39a3bdec 100644
--- a/app/src/main/kotlin/star/sky/voyager/hook/hooks/mediaeditor/FilterManager.kt
+++ b/app/src/main/kotlin/star/sky/voyager/hook/hooks/mediaeditor/FilterManager.kt
@@ -1,7 +1,6 @@
package star.sky.voyager.hook.hooks.mediaeditor
import android.os.Build
-import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
import com.github.kyuubiran.ezxhelper.ClassUtils.setStaticObject
import com.github.kyuubiran.ezxhelper.EzXHelper.safeClassLoader
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
@@ -9,6 +8,7 @@ import com.github.kyuubiran.ezxhelper.finders.MethodFinder
import io.luckypray.dexkit.enums.MatchType
import star.sky.voyager.utils.init.HookRegister
import star.sky.voyager.utils.key.hasEnable
+import star.sky.voyager.utils.voyager.LazyClass.AndroidBuildCls
import star.sky.voyager.utils.yife.DexKit.safeDexKitBridge
object FilterManager : HookRegister() {
@@ -24,10 +24,10 @@ object FilterManager : HookRegister() {
if (!this@FilterManager::device.isInitialized) {
device = Build.DEVICE
}
- setStaticObject(loadClass("android.os.Build"), "DEVICE", "wayne")
+ setStaticObject(AndroidBuildCls, "DEVICE", "wayne")
}
after {
- setStaticObject(loadClass("android.os.Build"), "DEVICE", device)
+ setStaticObject(AndroidBuildCls, "DEVICE", device)
}
}
}
diff --git a/app/src/main/kotlin/star/sky/voyager/hook/hooks/multipackage/TaplusUnlock.kt b/app/src/main/kotlin/star/sky/voyager/hook/hooks/multipackage/TaplusUnlock.kt
index a2d03db3..bb6414a5 100644
--- a/app/src/main/kotlin/star/sky/voyager/hook/hooks/multipackage/TaplusUnlock.kt
+++ b/app/src/main/kotlin/star/sky/voyager/hook/hooks/multipackage/TaplusUnlock.kt
@@ -7,6 +7,7 @@ import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
import star.sky.voyager.utils.init.HookRegister
import star.sky.voyager.utils.key.hasEnable
+import star.sky.voyager.utils.voyager.LazyClass.MiuiBuildCls
import star.sky.voyager.utils.voyager.LazyClass.SettingsFeaturesCls
import star.sky.voyager.utils.yife.Build.IS_TABLET
@@ -31,7 +32,7 @@ object TaplusUnlock : HookRegister() {
.filterByName("getFragment")
.first().createHook {
setStaticObject(
- loadClass("miui.os.Build"),
+ MiuiBuildCls,
"IS_TABLET",
false
)
diff --git a/app/src/main/kotlin/star/sky/voyager/hook/hooks/screenshot/DeviceShell.kt b/app/src/main/kotlin/star/sky/voyager/hook/hooks/screenshot/DeviceShell.kt
index 7ccb8fcf..847793e5 100644
--- a/app/src/main/kotlin/star/sky/voyager/hook/hooks/screenshot/DeviceShell.kt
+++ b/app/src/main/kotlin/star/sky/voyager/hook/hooks/screenshot/DeviceShell.kt
@@ -8,6 +8,7 @@ import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinde
import star.sky.voyager.utils.init.HookRegister
import star.sky.voyager.utils.key.XSPUtils.getString
import star.sky.voyager.utils.key.hasEnable
+import star.sky.voyager.utils.voyager.LazyClass.AndroidBuildCls
object DeviceShell : HookRegister() {
private lateinit var device: String
@@ -23,11 +24,11 @@ object DeviceShell : HookRegister() {
if (!this@DeviceShell::device.isInitialized) {
device = Build.DEVICE
}
- setStaticObject(loadClass("android.os.Build"), "DEVICE", deviceS)
+ setStaticObject(AndroidBuildCls, "DEVICE", deviceS)
}
after {
- setStaticObject(loadClass("android.os.Build"), "DEVICE", device)
+ setStaticObject(AndroidBuildCls, "DEVICE", device)
}
}
}
diff --git a/app/src/main/kotlin/star/sky/voyager/utils/voyager/LazyClass.kt b/app/src/main/kotlin/star/sky/voyager/utils/voyager/LazyClass.kt
index ada481fd..0fc6c959 100644
--- a/app/src/main/kotlin/star/sky/voyager/utils/voyager/LazyClass.kt
+++ b/app/src/main/kotlin/star/sky/voyager/utils/voyager/LazyClass.kt
@@ -11,6 +11,10 @@ object LazyClass {
loadClass("android.os.SystemProperties")
}
+ val AndroidBuildCls by lazy {
+ loadClass("android.os.Build")
+ }
+
val MiuiBuildCls by lazy {
loadClass("miui.os.Build")
}
diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml
index f20a7f16..e799ad35 100644
--- a/app/src/main/res/values-ja-rJP/strings.xml
+++ b/app/src/main/res/values-ja-rJP/strings.xml
@@ -386,7 +386,6 @@
あなたのデバイス型番を Xiaomi 13 Pro に偽装し、制限を回避します
ミーティングモードのロックを解除する
- Unlock New Voip
ワークベンチモードで画面翻訳を許可する
分割画面翻訳のロックを解除する
画面を分割するときに、単一のアプリケーションの翻訳を許可する
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 397eb5ab..9a92ac3c 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -386,7 +386,6 @@
对小爱建议伪装你的机型为小米13 Pro,以移除它对机型和账号的限制
解锁会议模式
- 解锁网络通话翻译
允许在工作台模式下使用屏幕翻译
解锁分屏翻译
允许在分屏时单独对单个应用使用翻译
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4dbafbf1..2e94d2b6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -388,7 +388,6 @@
For Aireco, it is recommended to disguise your model as Xiaomi 13 Pro to remove its restrictions on the model and account.
Unlock Meeting Mode
- Unlock New Voip
Allow screen translation in workbench mode
Unlock split-screen translation
Allow translation for a single application when splitting the screen