Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
bump ver
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenMushroomNew committed Jul 11, 2021
1 parent cbc4acd commit 4357a5f
Show file tree
Hide file tree
Showing 42 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android {
minSdkVersion 24
targetSdkVersion 30
versionCode gitCommitCount
versionName "2.6.1-beta"
versionName "2.6.1"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

import java.lang.ref.WeakReference;

public abstract class XposedWrapper {
public abstract class XposedContext {
protected static WeakReference<Context> sContextRef;
protected static ClassLoader sClassLoader;
protected static Resources sRes;
public static String sPath;

protected XposedWrapper() {
protected XposedContext() {
}

protected static Context getContext() {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/gm/tieba/tabswitch/XposedInit.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
import gm.tieba.tabswitch.hooker.minus.SwitchManager;
import gm.tieba.tabswitch.widget.TbDialog;

public class XposedInit extends XposedWrapper implements IXposedHookLoadPackage, IXposedHookZygoteInit {
public class XposedInit extends XposedContext implements IXposedHookLoadPackage, IXposedHookZygoteInit {
@SuppressLint("DiscouragedPrivateApi")
@Override
public void initZygote(IXposedHookZygoteInit.StartupParam startupParam) throws Throwable {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gm/tieba/tabswitch/dao/Adp.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;

public class Adp extends XposedWrapper {
public class Adp extends XposedContext {
private static Adp sAdp;
public String BDUSS;
public String tbs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.R;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.Preferences;
import gm.tieba.tabswitch.dao.RulesDbHelper;
import gm.tieba.tabswitch.util.FileUtils;

public class AntiConfusion extends XposedWrapper implements IHooker {
public class AntiConfusion extends XposedContext implements IHooker {
private static final String SPRINGBOARD_ACTIVITY = "com.baidu.tieba.tblauncher.MainTabActivity";
private Activity mActivity;
private TextView mMessage;
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gm/tieba/tabswitch/hooker/TSPreference.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import gm.tieba.tabswitch.BuildConfig;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.R;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.AcRules;
import gm.tieba.tabswitch.dao.Preferences;
import gm.tieba.tabswitch.hooker.TSPreferenceHelper.SwitchButtonHolder;
Expand All @@ -33,7 +33,7 @@
import gm.tieba.tabswitch.widget.TbDialog;
import gm.tieba.tabswitch.widget.TbToast;

public class TSPreference extends XposedWrapper implements IHooker {
public class TSPreference extends XposedContext implements IHooker {
public final static String MAIN = "贴吧TS设置";
public final static String MODIFY_TAB = "修改页面";
public final static String NOTES = "备注关注的人";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.R;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.Preferences;
import gm.tieba.tabswitch.util.ReflectUtils;
import gm.tieba.tabswitch.widget.Switch;
import gm.tieba.tabswitch.widget.TbDialog;
import gm.tieba.tabswitch.widget.TbEditText;
import gm.tieba.tabswitch.widget.TbToast;

public class TSPreferenceHelper extends XposedWrapper {
public class TSPreferenceHelper extends XposedContext {
public static TextView createTextView(String text) {
TextView textView = new TextView(getContext());
textView.setText(text);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.R;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.AcRules;
import gm.tieba.tabswitch.util.ReflectUtils;

public class CreateView extends XposedWrapper implements IHooker {
public class CreateView extends XposedContext implements IHooker {
public void hook() throws Throwable {
AcRules.findRule(sRes.getString(R.string.CreateView), (AcRules.Callback) (rule, clazz, method) ->
XposedHelpers.findAndHookMethod(clazz, sClassLoader, method, Bundle.class, new XC_MethodHook() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.R;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.widget.NavigationBar;
import gm.tieba.tabswitch.widget.TbDialog;
import gm.tieba.tabswitch.widget.TbEditText;
import gm.tieba.tabswitch.widget.TbToast;

public class HistoryCache extends XposedWrapper implements IHooker {
public class HistoryCache extends XposedContext implements IHooker {
private String mRegex = "";

public void hook() throws Throwable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.Adp;
import gm.tieba.tabswitch.dao.Preferences;
import gm.tieba.tabswitch.hooker.TSPreferenceHelper;
import gm.tieba.tabswitch.widget.TbDialog;
import gm.tieba.tabswitch.widget.TbEditText;

public class MyAttention extends XposedWrapper implements IHooker {
public class MyAttention extends XposedContext implements IHooker {
public static LinearLayout createNotesPreference(Activity activity) {
Preferences.putBoolean("my_attention", !Preferences.getNotes().isEmpty());
TSPreferenceHelper.PreferenceLayout preferenceLayout = new TSPreferenceHelper.PreferenceLayout(activity);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gm/tieba/tabswitch/hooker/add/NewSub.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.R;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.AcRules;
import gm.tieba.tabswitch.util.ReflectUtils;
import gm.tieba.tabswitch.widget.NavigationBar;

public class NewSub extends XposedWrapper implements IHooker {
public class NewSub extends XposedContext implements IHooker {
private Object mThreadId;
private Object mPostId;

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gm/tieba/tabswitch/hooker/add/Ripple.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.R;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.AcRules;
import gm.tieba.tabswitch.util.DisplayUtils;
import gm.tieba.tabswitch.util.ReflectUtils;

public class Ripple extends XposedWrapper implements IHooker {
public class Ripple extends XposedContext implements IHooker {
public void hook() throws Throwable {
// 楼中楼
AcRules.findRule(sRes.getString(R.string.Ripple), (AcRules.Callback) (rule, clazz, method) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.util.FileUtils;
import gm.tieba.tabswitch.util.ReflectUtils;
import gm.tieba.tabswitch.widget.TbToast;
import okhttp3.Call;
import okhttp3.OkHttpClient;
import okhttp3.Response;

public class SaveImages extends XposedWrapper implements IHooker {
public class SaveImages extends XposedContext implements IHooker {
private List<String> mList;
private String mTitle;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.R;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.AcRules;
import gm.tieba.tabswitch.util.DisplayUtils;
import gm.tieba.tabswitch.util.ReflectUtils;
import gm.tieba.tabswitch.widget.TbDialog;
import gm.tieba.tabswitch.widget.TbEditText;
import gm.tieba.tabswitch.widget.TbToast;

public class ThreadStore extends XposedWrapper implements IHooker {
public class ThreadStore extends XposedContext implements IHooker {
private String mRegex = "";

public void hook() throws Throwable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.Adp;
import gm.tieba.tabswitch.dao.Preferences;
import gm.tieba.tabswitch.widget.TbToast;

public class AutoSign extends XposedWrapper implements IHooker {
public class AutoSign extends XposedContext implements IHooker {
//获取用户所有关注贴吧
private static final String LIKE_URL = "https://tieba.baidu.com/mo/q/newmoindex";
//获取用户的tbs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.util.DisplayUtils;
import gm.tieba.tabswitch.util.ReflectUtils;
import gm.tieba.tabswitch.widget.Switch;

public class EyeshieldMode extends XposedWrapper implements IHooker {
public class EyeshieldMode extends XposedContext implements IHooker {
private static boolean sSavedUiMode;

public void hook() throws Throwable {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gm/tieba/tabswitch/hooker/auto/FrsTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.R;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.AcRules;
import gm.tieba.tabswitch.util.ReflectUtils;

public class FrsTab extends XposedWrapper implements IHooker {
public class FrsTab extends XposedContext implements IHooker {
private int mPosition;

public void hook() throws Throwable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.Preferences;

public class OpenSign extends XposedWrapper implements IHooker {
public class OpenSign extends XposedContext implements IHooker {
public void hook() throws Throwable {
XposedHelpers.findAndHookMethod("com.baidu.tieba.tblauncher.MainTabActivity", sClassLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.AcRules;

public class OriginSrc extends XposedWrapper implements IHooker {
public class OriginSrc extends XposedContext implements IHooker {
private static void doHook() {
try {
AcRules.findRule("\"pic_amount\"", (AcRules.Callback) (rule, clazz, method) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.R;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.AcRules;
import gm.tieba.tabswitch.util.ReflectUtils;

@SuppressLint("ClickableViewAccessibility")
public class ForbidGesture extends XposedWrapper implements IHooker {
public class ForbidGesture extends XposedContext implements IHooker {
public void hook() throws Throwable {
// 帖子字号
AcRules.findRule(sRes.getString(R.string.ForbidGesture), (AcRules.Callback) (rule, clazz, method) ->
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gm/tieba/tabswitch/hooker/extra/Hide.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.BuildConfig;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;

public class Hide extends XposedWrapper implements IHooker {
public class Hide extends XposedContext implements IHooker {
/**
* @deprecated hook VMStack_getThreadStackTrace instead.
*/
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gm/tieba/tabswitch/hooker/extra/Native.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import android.annotation.SuppressLint;

import de.robv.android.xposed.XposedBridge;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;

@SuppressLint("UnsafeDynamicallyLoadedCode")
public class Native extends XposedWrapper {
public class Native extends XposedContext {
static {
String soPath = sPath + "!/lib/armeabi-v7a/libtshide.so";
for (int i = 0; i < 3; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.R;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.AcRules;
import gm.tieba.tabswitch.util.FileUtils;

public class RedirectImage extends XposedWrapper implements IHooker {
public class RedirectImage extends XposedContext implements IHooker {
public void hook() throws Throwable {
AcRules.findRule(sRes.getString(R.string.RedirectImage), (AcRules.Callback) (rule, clazz, method) -> {
for (Method md : XposedHelpers.findClass(clazz, sClassLoader).getDeclaredMethods()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;

public class StackTrace extends XposedWrapper implements IHooker {
public class StackTrace extends XposedContext implements IHooker {
public static List<String> sStes = new ArrayList<>();

public void hook() throws Throwable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
import dalvik.system.PathClassLoader;
import de.robv.android.xposed.XposedBridge;
import gm.tieba.tabswitch.BuildConfig;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.Preferences;
import gm.tieba.tabswitch.hooker.TSPreferenceHelper;
import gm.tieba.tabswitch.util.FileUtils;
import gm.tieba.tabswitch.widget.TbToast;

public class TraceChecker extends XposedWrapper {
public class TraceChecker extends XposedContext {
public static int sChildCount;
private final TSPreferenceHelper.PreferenceLayout mPreferenceLayout;
private final String JAVA = "java";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.Preferences;
import gm.tieba.tabswitch.util.Parser;

public class ContentFilter extends XposedWrapper implements IHooker {
public class ContentFilter extends XposedContext implements IHooker {
private final Set<Object> mIds = new HashSet<>();

public void hook() throws Throwable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedHelpers;
import gm.tieba.tabswitch.IHooker;
import gm.tieba.tabswitch.XposedWrapper;
import gm.tieba.tabswitch.XposedContext;
import gm.tieba.tabswitch.dao.Preferences;
import gm.tieba.tabswitch.widget.TbToast;

public class FollowFilter extends XposedWrapper implements IHooker {
public class FollowFilter extends XposedContext implements IHooker {
public void hook() throws Throwable {
XposedHelpers.findAndHookMethod("tbclient.Personalized.DataRes$Builder", sClassLoader,
"build", boolean.class, new XC_MethodHook() {
Expand Down
Loading

0 comments on commit 4357a5f

Please sign in to comment.