mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-28 20:40:13 +02:00
fix declared fields
This commit is contained in:
parent
ccfbc260a0
commit
073f81526c
@ -23,7 +23,7 @@ abstract class AbstractWrapper(
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun setEnumValue(fieldName: String, value: Enum<*>) {
|
||||
val type = instance!!.javaClass.fields.find { it.name == fieldName }?.type as Class<out Enum<*>>
|
||||
val type = instance!!.javaClass.declaredFields.find { it.name == fieldName }?.type as Class<out Enum<*>>
|
||||
XposedHelpers.setObjectField(instance, fieldName, java.lang.Enum.valueOf(type, value.name))
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user