6.0.3 - 新增使用修改安全设置权限自启无障碍 修复toast/socket导致崩溃 资源英文补全 支持64位系统 部分插件及工具版本更新
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
android:label="common"
|
||||
android:supportsRtl="true" />
|
||||
</manifest>
|
||||
|
||||
@@ -34,10 +34,6 @@ public class GlobalAppContext {
|
||||
return get().getString(resId);
|
||||
}
|
||||
|
||||
public static String getString(int resId, Object... formatArgs) {
|
||||
return get().getString(resId, formatArgs);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||
public static int getColor(int id) {
|
||||
return get().getColor(id);
|
||||
@@ -45,41 +41,50 @@ public class GlobalAppContext {
|
||||
|
||||
public static void toast(final String message) {
|
||||
if (Looper.myLooper() == Looper.getMainLooper()) {
|
||||
Toast.makeText(get(), message, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
toastMessage(message);
|
||||
} else {
|
||||
sHandler.post(() -> toastMessage(message));
|
||||
}
|
||||
}
|
||||
|
||||
public static void toast(final String message, int duration) {
|
||||
if (Looper.myLooper() == Looper.getMainLooper()) {
|
||||
toastMessage(message, duration);
|
||||
} else {
|
||||
sHandler.post(() -> toastMessage(message, duration));
|
||||
}
|
||||
sHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(get(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void toast(final int resId) {
|
||||
if (Looper.myLooper() == Looper.getMainLooper()) {
|
||||
Toast.makeText(get(), resId, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
toastResId(resId);
|
||||
} else {
|
||||
sHandler.post(() -> toastResId(resId));
|
||||
}
|
||||
sHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(get(), resId, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void toast(final int resId, final Object... args) {
|
||||
public static void toast(final int resId, int duration) {
|
||||
if (Looper.myLooper() == Looper.getMainLooper()) {
|
||||
Toast.makeText(get(), getString(resId, args), Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
toastResId(resId, duration);
|
||||
} else {
|
||||
sHandler.post(() -> toastResId(resId, duration));
|
||||
}
|
||||
sHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(get(), getString(resId, args), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void toastMessage(String message) {
|
||||
Toast.makeText(get(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
private static void toastMessage(String message, int duration) {
|
||||
Toast.makeText(get(), message, duration).show();
|
||||
}
|
||||
|
||||
private static void toastResId(int resId) {
|
||||
Toast.makeText(get(), resId, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
private static void toastResId(int resId, int duration) {
|
||||
Toast.makeText(get(), resId, duration).show();
|
||||
}
|
||||
|
||||
public static void post(Runnable r) {
|
||||
|
||||
@@ -119,7 +119,7 @@ public class IntentUtil {
|
||||
installApk(context, path, fileProviderAuthority);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
Toast.makeText(context, R.string.error_activity_not_found_for_apk_installing, Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(context, R.string.text_activity_not_found_for_apk_installing, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,48 @@
|
||||
<resources>
|
||||
<string name="app_name">common</string>
|
||||
<string name="text_no_floating_window_permission">No drawing overlay permission</string>
|
||||
<string name="air_dialog_description_failed_invalid_token">Invalid access token</string>
|
||||
<string name="air_dialog_description_failed_issues_not_available">Issues are not enabled for the selected repository</string>
|
||||
<string name="air_dialog_description_failed_unknown">Unknown error</string>
|
||||
<string name="air_dialog_description_failed_wrong_credentials">Wrong username or password</string>
|
||||
<string name="air_dialog_title_failed">Can\'t send bug report</string>
|
||||
<string name="air_dialog_title_loading">Uploading to GitHub</string>
|
||||
<string name="air_error_no_description">Please enter an issue description</string>
|
||||
<string name="air_error_no_email">Please enter a e-mail address</string>
|
||||
<string name="air_error_no_password">Please enter your valid GitHub password</string>
|
||||
<string name="air_error_no_title">Please enter an issue title</string>
|
||||
<string name="air_error_no_username">Please enter your valid GitHub username</string>
|
||||
<string name="air_label_device_info">Device information</string>
|
||||
<string name="air_label_email">E-mail</string>
|
||||
<string name="air_label_email_optional">E-mail (optional)</string>
|
||||
<string name="air_label_issue_description">Issue description</string>
|
||||
<string name="air_label_issue_title">Issue title</string>
|
||||
<string name="air_label_password">Password</string>
|
||||
<string name="air_label_use_account">Send using GitHub account</string>
|
||||
<string name="air_label_use_email">Send by e-mail</string>
|
||||
<string name="air_label_use_guest">Send anonymously</string>
|
||||
<string name="air_label_username">Username</string>
|
||||
<string name="air_title_issue">Issue</string>
|
||||
<string name="air_title_login">Login</string>
|
||||
<string name="air_title_report_issue">Report an issue</string>
|
||||
<string name="go_to_accessibility_settings"><![CDATA[[Go to] Settings -> Accessibility Services -> AutoJs6 [Enable]]]></string>
|
||||
<string name="summary_enable_a11y_service_with_root_access">Enable accessibility service with root access automatically when needed</string>
|
||||
<string name="summary_enable_a11y_service_with_secure_settings">Enable accessibility service with secure settings automatically when needed</string>
|
||||
<string name="summary_stable_mode">More stable layout analysis but worse code compatibility (a11y service restarting needed)</string>
|
||||
<string name="text_a11y_service">Accessibility service</string>
|
||||
<string name="text_activity_not_found_for_apk_installing">No APK installer</string>
|
||||
<string name="text_disable_a11y_service_failed">Disable accessibility service failed</string>
|
||||
<string name="text_enable_a11y_service_with_root_access_automatically">Enable accessibility service with root access automatically</string>
|
||||
<string name="text_enable_a11y_service_with_root_access_failed">Enable accessibility service with root access failed</string>
|
||||
<string name="text_enable_a11y_service_with_root_access_timeout">Enable accessibility service with root access timed out</string>
|
||||
<string name="text_enable_a11y_service_with_secure_settings_automatically">Enable accessibility service with secure settings automatically</string>
|
||||
<string name="text_enable_a11y_service_with_secure_settings_failed">Enable accessibility service with secure settings failed</string>
|
||||
<string name="text_enable_a11y_service_with_secure_settings_timeout">Enable accessibility service with secure settings timed out</string>
|
||||
<string name="text_error">Error</string>
|
||||
<string name="text_execution_finished" formatted="false">[%s] finished in %s seconds.\n</string>
|
||||
<string name="text_no_accessibility_permission">Accessibility service is disabled and the script has stopped</string>
|
||||
<string name="text_no_floating_window_permission">No \"display over other apps\" permission</string>
|
||||
<string name="text_others">Others</string>
|
||||
<string name="text_please_choose">Please choose</string>
|
||||
<string name="text_script_running">Script running</string>
|
||||
<string name="text_stable_mode">Stable mode</string>
|
||||
<string name="text_use_volume_to_stop_running">Use volume up key to stop all running scripts</string>
|
||||
</resources>
|
||||
|
||||
49
common/src/main/res/values-zh/strings.xml
Normal file
49
common/src/main/res/values-zh/strings.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="air_dialog_description_failed_invalid_token">无效的访问令牌</string>
|
||||
<string name="air_dialog_description_failed_issues_not_available">当前 GitHub 仓库未启用 Issues 功能</string>
|
||||
<string name="air_dialog_description_failed_unknown">未知错误</string>
|
||||
<string name="air_dialog_description_failed_wrong_credentials">无效的用户名或密码</string>
|
||||
<string name="air_dialog_title_failed">无法发送错误报告</string>
|
||||
<string name="air_dialog_title_loading">正在上传到 GitHub</string>
|
||||
<string name="air_error_no_description">请输入议题描述</string>
|
||||
<string name="air_error_no_email">请输入电子邮箱</string>
|
||||
<string name="air_error_no_password">请输入有效的 GitHub 密码</string>
|
||||
<string name="air_error_no_title">请输入议题标题</string>
|
||||
<string name="air_error_no_username">请输入有效的 GitHub 用户名</string>
|
||||
<string name="air_label_device_info">设备信息</string>
|
||||
<string name="air_label_email">电子邮箱</string>
|
||||
<string name="air_label_email_optional">电子邮箱 (选填)</string>
|
||||
<string name="air_label_issue_description">描述</string>
|
||||
<string name="air_label_issue_title">标题</string>
|
||||
<string name="air_label_password">密码</string>
|
||||
<string name="air_label_use_account">使用 GitHub 账户发送</string>
|
||||
<string name="air_label_use_email">使用 E-mail 发送</string>
|
||||
<string name="air_label_use_guest">匿名发送</string>
|
||||
<string name="air_label_username">用户名</string>
|
||||
<string name="air_title_issue">议题</string>
|
||||
<string name="air_title_login">登录</string>
|
||||
<string name="air_title_report_issue">提交报告</string>
|
||||
<string name="go_to_accessibility_settings"><![CDATA[[打开] 系统设置 -> 无障碍服务 -> AutoJs6 [启用]]]></string>
|
||||
<string name="summary_enable_a11y_service_with_root_access">自动尝试使用 root 权限启用无障碍服务</string>
|
||||
<string name="summary_enable_a11y_service_with_secure_settings">自动尝试使用修改安全设置权限启用无障碍服务</string>
|
||||
<string name="summary_stable_mode">增强布局分析稳定性但降低代码兼容性 (需重启无障碍服务)</string>
|
||||
<string name="text_a11y_service">无障碍服务</string>
|
||||
<string name="text_activity_not_found_for_apk_installing">找不到 APK 安装器</string>
|
||||
<string name="text_disable_a11y_service_failed">禁用无障碍服务失败</string>
|
||||
<string name="text_enable_a11y_service_with_root_access_automatically">使用 root 权限自动启用无障碍服务</string>
|
||||
<string name="text_enable_a11y_service_with_root_access_failed">使用 root 权限启用无障碍服务失败</string>
|
||||
<string name="text_enable_a11y_service_with_root_access_timeout">使用 root 权限启用无障碍服务超时</string>
|
||||
<string name="text_enable_a11y_service_with_secure_settings_automatically">使用修改安全设置权限自动启用无障碍服务</string>
|
||||
<string name="text_enable_a11y_service_with_secure_settings_failed">使用修改安全设置权限启用无障碍服务失败</string>
|
||||
<string name="text_enable_a11y_service_with_secure_settings_timeout">使用修改安全设置权限启用无障碍服务超时</string>
|
||||
<string name="text_error">错误</string>
|
||||
<string name="text_execution_finished" formatted="false">[%s] 运行结束 (用时 %s 秒)\n</string>
|
||||
<string name="text_no_accessibility_permission">无障碍服务未启用</string>
|
||||
<string name="text_no_floating_window_permission">缺少 \"显示在其他应用上层\" 权限</string>
|
||||
<string name="text_others">其他</string>
|
||||
<string name="text_please_choose">请选择</string>
|
||||
<string name="text_script_running">脚本运行</string>
|
||||
<string name="text_stable_mode">稳定模式</string>
|
||||
<string name="text_use_volume_to_stop_running">使用 \"音量加\" 键停止所有运行的脚本</string>
|
||||
</resources>
|
||||
@@ -1,5 +1,54 @@
|
||||
<resources>
|
||||
<string name="app_name">common</string>
|
||||
<string name="text_no_floating_window_permission">没有悬浮窗权限</string>
|
||||
<string name="error_activity_not_found_for_apk_installing">找不到安装apk的应用</string>
|
||||
<string name="air_dialog_action_failed" translatable="false">OK</string>
|
||||
<string name="air_dialog_description_failed_invalid_token">Invalid access token</string>
|
||||
<string name="air_dialog_description_failed_issues_not_available">Issues are not enabled for the selected repository</string>
|
||||
<string name="air_dialog_description_failed_unknown">Unknown error</string>
|
||||
<string name="air_dialog_description_failed_wrong_credentials">Wrong username or password</string>
|
||||
<string name="air_dialog_title_failed">Can\'t send bug report</string>
|
||||
<string name="air_dialog_title_loading">Uploading to GitHub</string>
|
||||
<string name="air_error_no_description">Please enter an issue description</string>
|
||||
<string name="air_error_no_email">Please enter a e-mail address</string>
|
||||
<string name="air_error_no_password">Please enter your valid GitHub password</string>
|
||||
<string name="air_error_no_title">Please enter an issue title</string>
|
||||
<string name="air_error_no_username">Please enter your valid GitHub username</string>
|
||||
<string name="air_label_device_info">Device information</string>
|
||||
<string name="air_label_email">E-mail</string>
|
||||
<string name="air_label_email_optional">E-mail (optional)</string>
|
||||
<string name="air_label_issue_description">Issue description</string>
|
||||
<string name="air_label_issue_title">Issue title</string>
|
||||
<string name="air_label_password">Password</string>
|
||||
<string name="air_label_use_account">Send using GitHub account</string>
|
||||
<string name="air_label_use_email">Send by e-mail</string>
|
||||
<string name="air_label_use_guest">Send anonymously</string>
|
||||
<string name="air_label_username">Username</string>
|
||||
<string name="air_title_issue">Issue</string>
|
||||
<string name="air_title_login">Login</string>
|
||||
<string name="air_title_report_issue">Report an issue</string>
|
||||
<string name="app_name" translatable="false">AutoJs6</string>
|
||||
<string name="go_to_accessibility_settings"><![CDATA[[Go to] Settings -> Accessibility Services -> AutoJs6 [Enable]]]></string>
|
||||
<string name="key_enable_a11y_service_with_root_access" translatable="false">key_enable_a11y_service_with_root_access</string>
|
||||
<string name="key_enable_a11y_service_with_secure_settings" translatable="false">key_enable_a11y_service_with_secure_settings</string>
|
||||
<string name="key_stable_mode" translatable="false">key_stable_mode</string>
|
||||
<string name="key_use_volume_control_running" translatable="false">key_use_volume_control_running</string>
|
||||
<string name="summary_enable_a11y_service_with_root_access">Enable accessibility service with root access automatically when needed</string>
|
||||
<string name="summary_enable_a11y_service_with_secure_settings">Enable accessibility service with secure settings automatically when needed</string>
|
||||
<string name="summary_stable_mode">More stable layout analysis but worse code compatibility (a11y service restarting needed)</string>
|
||||
<string name="text_a11y_service">Accessibility service</string>
|
||||
<string name="text_activity_not_found_for_apk_installing">No APK installer</string>
|
||||
<string name="text_disable_a11y_service_failed">Disable accessibility service failed</string>
|
||||
<string name="text_enable_a11y_service_with_root_access_automatically">Enable accessibility service with root access automatically</string>
|
||||
<string name="text_enable_a11y_service_with_root_access_failed">Enable accessibility service with root access failed</string>
|
||||
<string name="text_enable_a11y_service_with_root_access_timeout">Enable accessibility service with root access timed out</string>
|
||||
<string name="text_enable_a11y_service_with_secure_settings_automatically">Enable accessibility service with secure settings automatically</string>
|
||||
<string name="text_enable_a11y_service_with_secure_settings_failed">Enable accessibility service with secure settings failed</string>
|
||||
<string name="text_enable_a11y_service_with_secure_settings_timeout">Enable accessibility service with secure settings timed out</string>
|
||||
<string name="text_error">Error</string>
|
||||
<string name="text_execution_finished" formatted="false">[%s] finished in %s seconds.\n</string>
|
||||
<string name="text_no_accessibility_permission">Accessibility service is disabled and the script has stopped</string>
|
||||
<string name="text_no_floating_window_permission">No \"display over other apps\" permission</string>
|
||||
<string name="text_others">Others</string>
|
||||
<string name="text_please_choose">Please choose</string>
|
||||
<string name="text_script_running">Script running</string>
|
||||
<string name="text_stable_mode">Stable mode</string>
|
||||
<string name="text_use_volume_to_stop_running">Use volume up key to stop all running scripts</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user