Commit 4d110ebd authored by Administrator's avatar Administrator

fix: PopupWindow constructor internal api change

parent 74738ac8
......@@ -5,8 +5,10 @@ import android.app.Activity;
import android.app.Dialog;
import android.app.Fragment;
import android.app.LocalActivityManager;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.view.Window;
......@@ -258,6 +260,20 @@ public class PageTriggerManager {
}
});
//popupWindow不被activity管理
try {
RposedHelpers.findAndHookConstructor(PopupWindow.class, Context.class, AttributeSet.class, int.class, int.class, new RC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
Log.i(SuperAppium.TAG, "create PopupWindow: " + param.thisObject.getClass().getName());
popupWindowSets.add(new WeakReference<>((PopupWindow) param.thisObject));
}
});
} catch (NoSuchMethodError e) {
//ignore
}
}
public static void trigger(int delay) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment