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:
parent
d3bb8318fe
commit
ff77e66239
1 changed files with 9 additions and 0 deletions
|
@ -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) {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue