Force set device performance class to high and etc. (#41)

* Force set device performance class to high

thats unlock some features (at least blur mode in navbar)

* disable some restrictions

extend accounts limit to 999 and unlock premium icons
This commit is contained in:
void aire() 2022-07-29 05:17:28 +03:00 committed by GitHub
parent d3bb8318fe
commit ff77e66239
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,15 @@ public class MainHook implements IXposedHookLoadPackage {
if (chatUIActivityClass != null) {
XposedBridge.hookAllMethods(chatUIActivityClass, "addSponsoredMessages", XC_MethodReplacement.returnConstant(null));
}
Class<?> SharedConfigClass = XposedHelpers.findClassIfExists("org.telegram.messenger.SharedConfig", lpparam.classLoader);
if (SharedConfigClass != null) {
XposedBridge.hookAllMethods(SharedConfigClass, "getDevicePerformanceClass", XC_MethodReplacement.returnConstant(2));
}
Class<?> UserConfigClass = XposedHelpers.findClassIfExists("org.telegram.messenger.UserConfig", lpparam.classLoader);
if (UserConfigClass != null) {
XposedBridge.hookAllMethods(UserConfigClass, "getMaxAccountCount", XC_MethodReplacement.returnConstant(999));
XposedBridge.hookAllMethods(UserConfigClass, "hasPremiumOnAccounts", XC_MethodReplacement.returnConstant(true));
}
} catch (Throwable ignored) {
}
}