Skip to content

Commit

Permalink
Remove useless log
Browse files Browse the repository at this point in the history
  • Loading branch information
MlgmXyysd committed Feb 5, 2021
1 parent 48ec306 commit b95eb8d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,34 @@ public class ConfigManager {

private static final HashMap<String, Boolean> compatModeCache = new HashMap<>();

public static boolean shouldUseCompatMode(String packageName) {
Boolean result;
if (compatModeCache.containsKey(packageName)
&& (result = compatModeCache.get(packageName)) != null) {
return result;
}
result = isFileExists(getConfigPath("compatlist/" + packageName));
compatModeCache.put(packageName, result);
return result;
}

private static boolean isFileExists(String path) {
return SELinuxHelper.getAppDataFileService().checkFileExists(path);
}
// public static boolean shouldUseCompatMode(String packageName) {
// Boolean result;
// if (compatModeCache.containsKey(packageName)
// && (result = compatModeCache.get(packageName)) != null) {
// return result;
// }
// result = isFileExists(getConfigPath("compatlist/" + packageName));
// compatModeCache.put(packageName, result);
// return result;
// }

// private static boolean isFileExists(String path) {
// return SELinuxHelper.getAppDataFileService().checkFileExists(path);
// }

public static native boolean isBlackWhiteListEnabled();

public static native boolean isNoModuleLogEnabled();

public static native boolean isResourcesHookEnabled();

public static native boolean isDeoptBootImageEnabled();
// public static native boolean isDeoptBootImageEnabled();

public static native boolean isSELinuxEnforced();

public static native String getInstallerPackageName();

public static native String getXposedPropPath();
// public static native String getXposedPropPath();

public static native String getLibSandHookName();

Expand Down
4 changes: 2 additions & 2 deletions edxp-core/src/main/cpp/main/src/config_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ namespace edxp {
initialized_(initialized || InitConfigPath()),
installer_pkg_name_(RetrieveInstallerPkgName()),
white_list_enable_(path_exists(GetConfigPath("usewhitelist"))),
deopt_boot_image_enabled_(path_exists(GetConfigPath("deoptbootimage"))),
// deopt_boot_image_enabled_(path_exists(GetConfigPath("deoptbootimage"))),
no_module_log_enabled_(path_exists(GetConfigPath("disable_modules_log"))),
resources_hook_enabled_(path_exists(GetConfigPath("enable_resources"))),
white_list_(GetAppList(GetConfigPath("whitelist/"))),
Expand All @@ -169,7 +169,7 @@ namespace edxp {
LOGI("base config path: %s", base_config_path_.c_str());
LOGI(" using installer package name: %s", installer_pkg_name_.c_str());
LOGI(" using whitelist: %s", BoolToString(white_list_enable_));
LOGI(" deopt boot image: %s", BoolToString(deopt_boot_image_enabled_));
// LOGI(" deopt boot image: %s", BoolToString(deopt_boot_image_enabled_));
LOGI(" no module log: %s", BoolToString(no_module_log_enabled_));
LOGI(" resources hook: %s", BoolToString(resources_hook_enabled_));
LOGI(" white list: \n %s", ([this]() {
Expand Down
2 changes: 1 addition & 1 deletion edxp-core/src/main/cpp/main/src/config_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace edxp {

inline const auto &IsResourcesHookEnabled() const { return resources_hook_enabled_; }

inline const auto &IsDeoptBootImageEnabled() const { return deopt_boot_image_enabled_; }
// inline const auto &IsDeoptBootImageEnabled() const { return deopt_boot_image_enabled_; }

inline const auto &IsNoModuleLogEnabled() const { return no_module_log_enabled_; }

Expand Down
8 changes: 4 additions & 4 deletions edxp-core/src/main/cpp/main/src/jni/edxp_config_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ namespace edxp {
return (jboolean) ConfigManager::GetInstance()->IsResourcesHookEnabled();
}

static jboolean ConfigManager_isDeoptBootImageEnabled(JNI_START) {
return (jboolean) ConfigManager::GetInstance()->IsDeoptBootImageEnabled();
}
// static jboolean ConfigManager_isDeoptBootImageEnabled(JNI_START) {
// return (jboolean) ConfigManager::GetInstance()->IsDeoptBootImageEnabled();
// }

static jboolean ConfigManager_isSELinuxEnforced(JNI_START) {
return (jboolean) ConfigManager::GetInstance()->IsSELinuxEnforced();
Expand Down Expand Up @@ -77,7 +77,7 @@ namespace edxp {
static JNINativeMethod gMethods[] = {
NATIVE_METHOD(ConfigManager, isBlackWhiteListEnabled, "()Z"),
NATIVE_METHOD(ConfigManager, isResourcesHookEnabled, "()Z"),
NATIVE_METHOD(ConfigManager, isDeoptBootImageEnabled, "()Z"),
// NATIVE_METHOD(ConfigManager, isDeoptBootImageEnabled, "()Z"),
NATIVE_METHOD(ConfigManager, isNoModuleLogEnabled, "()Z"),
NATIVE_METHOD(ConfigManager, isSELinuxEnforced, "()Z"),
NATIVE_METHOD(ConfigManager, getInstallerPackageName, "()Ljava/lang/String;"),
Expand Down

0 comments on commit b95eb8d

Please sign in to comment.