Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
HChenX committed Jun 10, 2024
2 parents 3de3dc7 + 7785bda commit f711a10
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 2 deletions.
31 changes: 31 additions & 0 deletions app/src/main/java/com/sevtinge/hyperceiler/module/app/Telecom.java
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/>.
* 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"));
}
}
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/>.
* 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("");
}
});
}
}
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/>.
* 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;
}
}
9 changes: 7 additions & 2 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@
<string name="system_framework_core_patch_enhanced_mode_desc">可以解决一些应用内部的完整性校验,一般无需开启</string>
<string name="system_framework_disable_low_api_check">禁用低 API 校验</string>
<string name="system_framework_disable_low_api_check_desc">允许安装 TargetSDK 低于 23 的应用</string>
<string name="system_framework_disable_persistent">禁用持久检查</string>
<string name="system_framework_disable_persistent_more">允许直接更新持久 APP ,比如直接更新系统界面</string>
<string name="system_framework_disable_persistent">禁用持久性检查</string>
<string name="system_framework_disable_persistent_more">允许安装声明为持久性的应用</string>
<!--浏览器-->
<string name="browser">浏览器</string>
<string name="browser_debug_mode">解锁开发者选项</string>
Expand Down Expand Up @@ -1772,4 +1772,9 @@
<string name="headtip_tip_long_press_to_copy">您可以长按或双击后选择文本进行操作,或者复制并反馈给开发者。</string>
<string name="happy_birthday_hyperceiler">今天是 HyperCeiler 的生日!\n感谢与您岁月相伴之恩,愿来年再续前缘,共赴风雨,携手并进!</string>

<!--通话管理-->
<string name="telecom">通话管理</string>
<string name="scam_reminder_bypass_caption">允许直接拨打呼叫转移MMI码</string>
<string name="scam_reminder_bypass_description">允许直接拨打类似**21*8#的MMI码来开启呼叫转移</string>

</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1725,4 +1725,10 @@
<string name="ic_qs_title_autobrightness">Auto Brightness</string>
<string name="ic_qs_title_vowifi1">VoWiFi SIM1</string>
<string name="ic_qs_title_vowifi2">VoWiFi SIM2</string>

<!--Telecom-->
<string name="telecom">Phone Calls</string>
<string name="scam_reminder_bypass_caption">Allow Dail call-forwarding MMI code directly</string>
<string name="scam_reminder_bypass_description">Allow Dail MMI Code like **21*8# to enable call-forwarding directly</string>

</resources>
7 changes: 7 additions & 0 deletions app/src/main/res/xml/prefs_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@
android:summary="com.android.incallui"
android:title="@string/incallui" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.TelecomFragment"
android:icon="@drawable/ic_call"
android:key="prefs_key_telecom"
android:summary="com.android.server.telecom"
android:title="@string/telecom" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.MmsFragment"
android:icon="@drawable/ic_mms"
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/xml/prefs_set_homepage_entrance.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@
android:summary="com.android.phone"
android:title="@string/phone" />

<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_phone"
android:key="prefs_key_telecom_state"
android:layout="@layout/preference_header"
android:summary="com.android.server.telecom"
android:title="@string/telecom" />

<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_downloads"
Expand Down
14 changes: 14 additions & 0 deletions app/src/main/res/xml/telecom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:myLocation="@string/telecom">
<PreferenceCategory>
<SwitchPreference
android:defaultValue="false"
android:key="prefs_key_scam_reminder_bypass"
android:title="@string/scam_reminder_bypass_caption"
android:summary="@string/scam_reminder_bypass_description"/>

</PreferenceCategory>

</PreferenceScreen>

0 comments on commit f711a10

Please sign in to comment.