Allow nested xposedcontextwrapper

This commit is contained in:
LoveSy 2022-12-27 19:48:13 +08:00 committed by LoveSy
parent 31674f589e
commit d9f3ac1bad
1 changed files with 6 additions and 2 deletions

View File

@ -5,7 +5,11 @@ import android.content.ContextWrapper;
public class XposedContextWrapper extends ContextWrapper implements XposedInterface {
public XposedContextWrapper(XposedContext base) {
XposedContextWrapper(XposedContext base) {
super(base);
}
public XposedContextWrapper(XposedContextWrapper base) {
super(base);
}
@ -31,7 +35,7 @@ public class XposedContextWrapper extends ContextWrapper implements XposedInterf
@Override
final protected void attachBaseContext(Context base) {
if (base instanceof XposedContext) {
if (base instanceof XposedContext || base instanceof XposedContextWrapper) {
super.attachBaseContext(base);
} else {
throw new IllegalArgumentException();