Merge "More fixes for VectorDrawable memory management"
diff --git a/bridge/src/com/android/layoutlib/bridge/android/support/SupportPreferencesUtil.java b/bridge/src/com/android/layoutlib/bridge/android/support/SupportPreferencesUtil.java
index 0124e83..6ad9efc 100644
--- a/bridge/src/com/android/layoutlib/bridge/android/support/SupportPreferencesUtil.java
+++ b/bridge/src/com/android/layoutlib/bridge/android/support/SupportPreferencesUtil.java
@@ -41,6 +41,7 @@
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 
+import static com.android.layoutlib.bridge.util.ReflectionUtils.getAccessibleMethod;
 import static com.android.layoutlib.bridge.util.ReflectionUtils.getClassInstance;
 import static com.android.layoutlib.bridge.util.ReflectionUtils.getMethod;
 import static com.android.layoutlib.bridge.util.ReflectionUtils.invoke;
@@ -93,9 +94,10 @@
         Object preferenceInflater = instantiateClass(callback, PREFERENCE_INFLATER,
           new Class[]{Context.class, preferenceManager.getClass()},
           new Object[]{context, preferenceManager});
-        Object inflatedPreference = invoke(
-          getMethod(preferenceInflater.getClass(), "inflate", XmlPullParser.class,
-            preferenceGroupClass), preferenceInflater, parser, null);
+        Object inflatedPreference =
+                invoke(getAccessibleMethod(preferenceInflater.getClass(), "inflate",
+                        XmlPullParser.class, preferenceGroupClass), preferenceInflater, parser,
+                        null);
 
         if (inflatedPreference == null) {
             throw new ReflectionException("inflate method returned null");