Enable Xposed API call protection by default (#2423)

This commit is contained in:
Howard Wu 2023-03-06 21:18:38 +08:00 committed by GitHub
parent 7112bb5a91
commit 0709f10f59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -209,7 +209,7 @@
<string name="update_channel_bate">Beta</string>
<string name="update_channel_nightly">Nightly build</string>
<string name="settings_xposed_api_call_protection">Xposed API call protection</string>
<string name="settings_xposed_api_call_protection_summary">Block dynamically loaded module code to use Xposed API, this may break some modules but benefit security (experimental feature)</string>
<string name="settings_xposed_api_call_protection_summary">Block dynamically loaded module code to use Xposed API, this may break some modules but benefit security</string>
<!-- Module Repo -->
<string name="module_readme">Readme</string>

View File

@ -96,7 +96,7 @@ public class ConfigManager {
sqLiteDatabase -> Log.w(TAG, "database corrupted"));
private boolean verboseLog = true;
private boolean dexObfuscate = false;
private boolean dexObfuscate = true;
private boolean enableStatusNotification = true;
private Path miscPath = null;
@ -263,7 +263,7 @@ public class ConfigManager {
verboseLog = bool == null || (boolean) bool;
bool = config.get("enable_dex_obfuscate");
dexObfuscate = bool != null && (boolean) bool;
dexObfuscate = bool == null || (boolean) bool;
bool = config.get("enable_auto_add_shortcut");
if (bool != null) {
@ -1023,9 +1023,8 @@ public class ConfigManager {
// this is for manager and should not use the cache result
boolean dexObfuscate() {
Map<String, Object> config = getModulePrefs("lspd", 0, "config");
Object bool = config.get("enable_dex_obfuscate");
return bool != null && (boolean) bool;
var bool = getModulePrefs("lspd", 0, "config").get("enable_dex_obfuscate");
return bool == null || (boolean) bool;
}
public boolean enableStatusNotification() {