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);
|
||||
|
||||
createDirectories();
|
||||
master();
|
||||
NotificationUtil.init();
|
||||
|
||||
Shizuku.addRequestPermissionResultListener(REQUEST_PERMISSION_RESULT_LISTENER);
|
||||
}
|
||||
|
||||
private void createDirectories() {
|
||||
mkdir("conf");
|
||||
mkdir("log");
|
||||
private void master() {
|
||||
// This will affect the fengshui of the whole app, don't remove this
|
||||
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 static int getXposedApiVersion() {
|
||||
Log.e(App.TAG, "getXposedApiVersion: Xposed is not active");
|
||||
return -1;
|
||||
try {
|
||||
Log.e(App.TAG, "getXposedApiVersion: Xposed is not active");
|
||||
return -1;
|
||||
} catch (Exception e) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getXposedVersion() {
|
||||
Log.e(App.TAG, "getXposedVersion: Xposed is not active");
|
||||
return null;
|
||||
try {
|
||||
Log.e(App.TAG, "getXposedVersion: Xposed is not active");
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static int getXposedVersionCode() {
|
||||
Log.e(App.TAG, "getXposedVersionCode: Xposed is not active");
|
||||
return -1;
|
||||
try {
|
||||
Log.e(App.TAG, "getXposedVersionCode: Xposed is not active");
|
||||
return -1;
|
||||
} catch (Exception e) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getXposedVariant() {
|
||||
Log.e(App.TAG, "getXposedVariant: Xposed is not active");
|
||||
return null;
|
||||
try {
|
||||
Log.e(App.TAG, "getXposedVariant: Xposed is not active");
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getEnabledModulesListFile() {
|
||||
return getBaseDir() + "conf/enabled_modules.list";
|
||||
try {
|
||||
return getBaseDir() + "conf/enabled_modules.list";
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getModulesListFile() {
|
||||
return getBaseDir() + "conf/modules.list";
|
||||
try {
|
||||
return getBaseDir() + "conf/modules.list";
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getBaseDir() {
|
||||
return App.getInstance().getApplicationInfo().deviceProtectedDataDir + "/";
|
||||
try {
|
||||
return App.getInstance().getApplicationInfo().deviceProtectedDataDir + "/";
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue