Constructor of ActivityThread is private (#1833)
This commit is contained in:
parent
6b7fdb2fac
commit
9a022f4c17
|
|
@ -102,7 +102,8 @@ public final class XposedBridge {
|
||||||
// ActivityThread for now and the call will throw an NPE. Luckily they check the
|
// ActivityThread for now and the call will throw an NPE. Luckily they check the
|
||||||
// nullability of the result configuration. So we hereby set a dummy
|
// nullability of the result configuration. So we hereby set a dummy
|
||||||
// ActivityThread to bypass such a situation.
|
// ActivityThread to bypass such a situation.
|
||||||
XposedHelpers.setStaticObjectField(ActivityThread.class, "sCurrentActivityThread", new ActivityThread());
|
var fake = XposedHelpers.newInstance(ActivityThread.class);
|
||||||
|
XposedHelpers.setStaticObjectField(ActivityThread.class, "sCurrentActivityThread", fake);
|
||||||
try {
|
try {
|
||||||
TypedArray ta = res.obtainTypedArray(res.getIdentifier(
|
TypedArray ta = res.obtainTypedArray(res.getIdentifier(
|
||||||
"preloaded_drawables", "array", "android"));
|
"preloaded_drawables", "array", "android"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue