Remove ReflectionUtils.setField
Categories
(Firefox for Android :: Tooling, task)
Tracking
()
People
(Reporter: mcarare, Unassigned)
References
Details
(Whiteboard: [fxdroid][group6] )
https://developer.android.com/about/versions/17/behavior-changes-17#static-final-fields
Apps running on Android 17 or higher that target Android 17 (API level 37) or higher cannot change static final fields. If an app attempts to change a static final field by using reflection, it will cause an IllegalAccessException. Attempting to modify one of these fields through JNI APIs (such as SetStaticLongField()) will cause the app to crash.
ReflectionUtils.setField would be subject to these changes only if it were to be used for static final fields. As long as it is strictly used for instance final fields (as is currently the case), it will continue to work as expected. However, as Android continues to tighten reflection access, it is recommended to eventually move towards using constructors or mockable interfaces where possible, though this is often difficult with GeckoView's data-only objects.
Updated•6 months ago
|
| Reporter | ||
Updated•6 months ago
|
Description
•