Skip to content

Commit

Permalink
opt: crash log message to res
Browse files Browse the repository at this point in the history
  • Loading branch information
lingqiqi5211 committed Feb 4, 2025
1 parent 734145c commit 242316a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import android.os.Looper;

import com.hchen.hooktool.log.AndroidLog;
import com.sevtinge.hyperceiler.R;
import com.sevtinge.hyperceiler.utils.shell.ShellInit;

import fan.appcompat.app.AlertDialog;
Expand All @@ -37,9 +38,9 @@ public class CrashHandlerDialog {
String crashInfo = intent.getStringExtra("crashInfo");

new AlertDialog.Builder(context)
.setTitle("错误")
.setMessage("模块发生致命崩溃事件,无法继续运行!请携带以下报错信息进行反馈!\n" + crashInfo)
.setPositiveButton("结束进程", (d, w) -> {
.setTitle(context.getString(R.string.error))
.setMessage(context.getString(R.string.app_error_desc) + crashInfo)
.setPositiveButton(context.getString(R.string.app_exit), (d, w) -> {
AndroidLog.logI(TAG, "kill myself!!");
((Activity) context).moveTaskToBack(true);
((Activity) context).finish();
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
<string name="new_cta_app_main_purpose">修改系统应用</string>
<string name="new_cta_app_all_purpose_title">欢迎使用 HyperCeiler,本应用依赖 Xposed 框架运行,你可以使用本应用劫持并修改其他受支持的应用以实现对系统的增强功能。在使用过程中,为了为您提供更多功能,我们可能会向您申请 Root/Su 权限。您可随时前往您的 Root/Su 管理器进行管理。</string>
<!--HyperCeiler Tips-->
<string name="error">错误</string>
<string name="warn">警告</string>
<string name="app_error_desc">本模块发生了致命崩溃事件,无法继续运行!请携带以下报错信息进行反馈!\n\n</string>
<string name="app_exit">结束进程</string>
<string name="safe_mode_desc">%1$s 由于多次崩溃,已进入安全模式,HyperCeiler 对其的功能已停用。\n您可以解除对其的安全模式,或稍后进入 HyperCeiler 处理。</string>
<string name="safe_mode_history">查看异常记录</string>
<string name="safe_mode_cancel">解除</string>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@
<string name="new_cta_app_main_purpose">modify system apps</string>
<string name="new_cta_app_all_purpose_title">Welcome to HyperCeiler! This app relies on the Xposed framework to run. You can use this app to hijack and modify other supported apps to enhance the system. During usage, in order to provide you with more functions, we may apply for Root/Su permissions from you. You can manage it at any time by going to your Root/Su Manager.</string>
<!--HyperCeiler Tips-->
<string name="error">Error</string>
<string name="warn">Attention</string>
<string name="app_error_desc">This module had a fatal collapse and could not continue to run! Please bring the following error information for feedback! \n\n</string>
<string name="app_exit">Ending process</string>
<string name="safe_mode_desc">%1$s has entered Safe mode due to multiple crashes, and HyperCeiler features has been temporarily disabled.</string>
<string name="safe_mode_history">View exception records</string>
<string name="safe_mode_cancel">Disable Safe mode</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/xml/system_ui_lock_screen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
app:defaultValue="6"
android:dependency="prefs_key_system_ui_lock_screen_show_spacing_value"
android:key="prefs_key_system_ui_lock_screen_show_spacing"
android:layout="@layout/miuix_preference_widget_seekbar_compat_no_title"
app:defaultValueTitle="@string/array_default"
app:showDividerValue="2"
app:format="%s s"
Expand Down

0 comments on commit 242316a

Please sign in to comment.