diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Telecom.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Telecom.java new file mode 100644 index 0000000000..d48541ed8c --- /dev/null +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Telecom.java @@ -0,0 +1,31 @@ +/* + * This file is part of HyperCeiler. + + * HyperCeiler is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + + * Copyright (C) 2023-2024 HyperCeiler Contributions + */ +package com.sevtinge.hyperceiler.module.app; + +import com.sevtinge.hyperceiler.module.base.BaseModule; +import com.sevtinge.hyperceiler.module.base.HookExpand; +import com.sevtinge.hyperceiler.module.hook.telecom.ScamReminderBypass; + +@HookExpand(pkg = "com.android.server.telecom", isPad = false, tarAndroid = 33) +public class Telecom extends BaseModule { + @Override + public void handleLoadPackage() { + initHook(new ScamReminderBypass(), mPrefsMap.getBoolean("scam_reminder_bypass")); + } +} diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/telecom/ScamReminderBypass.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/telecom/ScamReminderBypass.java new file mode 100644 index 0000000000..abeed886f2 --- /dev/null +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/telecom/ScamReminderBypass.java @@ -0,0 +1,33 @@ +/* + * This file is part of HyperCeiler. + + * HyperCeiler is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + + * Copyright (C) 2023-2024 HyperCeiler Contributions + */ +package com.sevtinge.hyperceiler.module.hook.telecom; + +import com.sevtinge.hyperceiler.module.base.BaseHook; + +public class ScamReminderBypass extends BaseHook { + @Override + public void init() throws NoSuchMethodException { + hookAllMethods("com.android.server.telecom.MiuiScamReminder", lpparam.classLoader, "isPotentialInCfummi", new MethodHook() { + @Override + protected void after(MethodHookParam param) throws Throwable { + param.setResult(""); + } + }); + } +} diff --git a/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/TelecomFragment.java b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/TelecomFragment.java new file mode 100644 index 0000000000..c8d75cc358 --- /dev/null +++ b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/TelecomFragment.java @@ -0,0 +1,29 @@ +/* + * This file is part of HyperCeiler. + + * HyperCeiler is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + + * Copyright (C) 2023-2024 HyperCeiler Contributions + */ +package com.sevtinge.hyperceiler.ui.fragment; + +import com.sevtinge.hyperceiler.R; +import com.sevtinge.hyperceiler.ui.fragment.base.SettingsPreferenceFragment; + +public class TelecomFragment extends SettingsPreferenceFragment { + @Override + public int getContentResId() { + return R.xml.telecom; + } +} diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index e6304bb305..dd0afce114 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -1772,4 +1772,9 @@ 您可以长按或双击后选择文本进行操作,或者复制并反馈给开发者。 今天是 HyperCeiler 的生日!\n感谢与您岁月相伴之恩,愿来年再续前缘,共赴风雨,携手并进! + + 通话管理 + 允许直接拨打呼叫转移MMI码 + 允许直接拨打类似**21*8#的MMI码来开启呼叫转移 + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ad2d32ba9a..a376fff9ba 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1725,4 +1725,10 @@ Auto Brightness VoWiFi SIM1 VoWiFi SIM2 + + + Phone Calls + Allow Dail call-forwarding MMI code directly + Allow Dail MMI Code like **21*8# to enable call-forwarding directly + diff --git a/app/src/main/res/xml/prefs_main.xml b/app/src/main/res/xml/prefs_main.xml index c347104295..43a0fcb121 100644 --- a/app/src/main/res/xml/prefs_main.xml +++ b/app/src/main/res/xml/prefs_main.xml @@ -57,6 +57,13 @@ android:summary="com.android.incallui" android:title="@string/incallui" /> + + + + + + + + + + +