Android: Fix wrong field name in ExtractStyle.java
In Android 5.1 the field name for the inset state member in InsetDrawable changed from mInsetState to mState. Task-number: QTBUG-45714 Change-Id: I0ebada1ef90954013e5357cbd10df925f8f05295 Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
parent
ef622d55ca
commit
119c5ec93f
@ -1100,7 +1100,9 @@ public class ExtractStyle {
|
||||
{
|
||||
try {
|
||||
InsetDrawable d = (InsetDrawable)drawable;
|
||||
Object mInsetStateObject = getAccessibleField(InsetDrawable.class, "mInsetState").get(d);
|
||||
// mInsetState changed to mState in Android 5.1 (22)
|
||||
Object mInsetStateObject = getAccessibleField(InsetDrawable.class, (Build.VERSION.SDK_INT > 21) ? "mState"
|
||||
: "mInsetState").get(d);
|
||||
Rect _padding = new Rect();
|
||||
boolean hasPadding = d.getPadding(_padding);
|
||||
return getDrawable(getAccessibleField(mInsetStateObject.getClass(), "mDrawable").get(mInsetStateObject), filename, hasPadding ? _padding : null);
|
||||
|
Loading…
x
Reference in New Issue
Block a user