Add more clients support
This commit is contained in:
parent
8a06e6c411
commit
05f2bf3055
5 changed files with 24 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,7 +2,6 @@
|
|||
.gradle
|
||||
/local.properties
|
||||
/.idea
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
|
|
2
app/.gitignore
vendored
2
app/.gitignore
vendored
|
@ -1 +1,3 @@
|
|||
/build
|
||||
/release
|
||||
/debug
|
|
@ -7,7 +7,7 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
applicationId "com.shatyuka.killergram"
|
||||
minSdk 23
|
||||
minSdk 16
|
||||
targetSdk 31
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package com.shatyuka.killergram;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import de.robv.android.xposed.IXposedHookLoadPackage;
|
||||
import de.robv.android.xposed.XC_MethodReplacement;
|
||||
import de.robv.android.xposed.XposedBridge;
|
||||
|
@ -7,8 +10,16 @@ import de.robv.android.xposed.XposedHelpers;
|
|||
import de.robv.android.xposed.callbacks.XC_LoadPackage;
|
||||
|
||||
public class MainHook implements IXposedHookLoadPackage {
|
||||
public final static List<String> hookPackages = Arrays.asList(
|
||||
"org.telegram.messenger",
|
||||
"org.telegram.messenger.web",
|
||||
"nekox.messenger",
|
||||
"tw.nekomimi.nekogram",
|
||||
"org.telegram.plus");
|
||||
|
||||
@Override
|
||||
public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam lpparam) {
|
||||
if (hookPackages.contains(lpparam.packageName)) {
|
||||
try {
|
||||
Class<?> chatUIActivityClass = XposedHelpers.findClass("org.telegram.ui.ChatActivity", lpparam.classLoader);
|
||||
XposedBridge.hookAllMethods(chatUIActivityClass, "addSponsoredMessages", XC_MethodReplacement.returnConstant(null));
|
||||
|
@ -16,3 +27,4 @@ public class MainHook implements IXposedHookLoadPackage {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,5 +2,9 @@
|
|||
<resources>
|
||||
<string-array name="xposedscope">
|
||||
<item>org.telegram.messenger</item>
|
||||
<item>org.telegram.messenger.web</item>
|
||||
<item>nekox.messenger</item>
|
||||
<item>tw.nekomimi.nekogram</item>
|
||||
<item>org.telegram.plus</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Reference in a new issue