Fix hook manager (maybe)
This commit is contained in:
parent
af499b4907
commit
92bcaec8f2
|
|
@ -125,15 +125,21 @@ public class App extends Application {
|
||||||
|
|
||||||
pref = PreferenceManager.getDefaultSharedPreferences(this);
|
pref = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
|
||||||
createDirectories();
|
master();
|
||||||
NotificationUtil.init();
|
NotificationUtil.init();
|
||||||
|
|
||||||
Shizuku.addRequestPermissionResultListener(REQUEST_PERMISSION_RESULT_LISTENER);
|
Shizuku.addRequestPermissionResultListener(REQUEST_PERMISSION_RESULT_LISTENER);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createDirectories() {
|
private void master() {
|
||||||
mkdir("conf");
|
// This will affect the fengshui of the whole app, don't remove this
|
||||||
mkdir("log");
|
Constants.getXposedVersionCode();
|
||||||
|
Constants.getXposedVersion();
|
||||||
|
Constants.getXposedApiVersion();
|
||||||
|
Constants.getXposedVariant();
|
||||||
|
Constants.getBaseDir();
|
||||||
|
Constants.getModulesListFile();
|
||||||
|
Constants.getEnabledModulesListFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,34 +4,62 @@ import android.util.Log;
|
||||||
|
|
||||||
public class Constants {
|
public class Constants {
|
||||||
public static int getXposedApiVersion() {
|
public static int getXposedApiVersion() {
|
||||||
|
try {
|
||||||
Log.e(App.TAG, "getXposedApiVersion: Xposed is not active");
|
Log.e(App.TAG, "getXposedApiVersion: Xposed is not active");
|
||||||
return -1;
|
return -1;
|
||||||
|
} catch (Exception e) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getXposedVersion() {
|
public static String getXposedVersion() {
|
||||||
|
try {
|
||||||
Log.e(App.TAG, "getXposedVersion: Xposed is not active");
|
Log.e(App.TAG, "getXposedVersion: Xposed is not active");
|
||||||
return null;
|
return null;
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getXposedVersionCode() {
|
public static int getXposedVersionCode() {
|
||||||
|
try {
|
||||||
Log.e(App.TAG, "getXposedVersionCode: Xposed is not active");
|
Log.e(App.TAG, "getXposedVersionCode: Xposed is not active");
|
||||||
return -1;
|
return -1;
|
||||||
|
} catch (Exception e) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getXposedVariant() {
|
public static String getXposedVariant() {
|
||||||
|
try {
|
||||||
Log.e(App.TAG, "getXposedVariant: Xposed is not active");
|
Log.e(App.TAG, "getXposedVariant: Xposed is not active");
|
||||||
return null;
|
return null;
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getEnabledModulesListFile() {
|
public static String getEnabledModulesListFile() {
|
||||||
|
try {
|
||||||
return getBaseDir() + "conf/enabled_modules.list";
|
return getBaseDir() + "conf/enabled_modules.list";
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getModulesListFile() {
|
public static String getModulesListFile() {
|
||||||
|
try {
|
||||||
return getBaseDir() + "conf/modules.list";
|
return getBaseDir() + "conf/modules.list";
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getBaseDir() {
|
public static String getBaseDir() {
|
||||||
|
try {
|
||||||
return App.getInstance().getApplicationInfo().deviceProtectedDataDir + "/";
|
return App.getInstance().getApplicationInfo().deviceProtectedDataDir + "/";
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue