Minor update
- Added more Android compatibility code
This commit is contained in:
parent
1cfee5ff47
commit
8ef3df8245
@ -41,7 +41,8 @@ public final class SafeReflection {
|
|||||||
f.setAccessible(true);
|
f.setAccessible(true);
|
||||||
l = u.objectFieldOffset(AccessibleObject.class.getDeclaredField("override")); // Most desktop versions of Java
|
l = u.objectFieldOffset(AccessibleObject.class.getDeclaredField("override")); // Most desktop versions of Java
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
f = Field.class.getDeclaredField("accessFlags");
|
try { f = Field.class.getDeclaredField("artField").getType().getDeclaredField("accessFlags"); }
|
||||||
|
catch(Exception ignored){ f = Field.class.getDeclaredField("accessFlags"); }
|
||||||
f.setAccessible(true);
|
f.setAccessible(true);
|
||||||
l = u.objectFieldOffset(AccessibleObject.class.getDeclaredField("flag")); // God-damned Android
|
l = u.objectFieldOffset(AccessibleObject.class.getDeclaredField("flag")); // God-damned Android
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user