summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Diego Perez <diegoperez@google.com> 2016-07-20 12:32:24 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-07-20 12:32:25 +0000
commita80f37eca0fc0eababa5264f63483bcaf75f8e01 (patch)
tree33ee5671496b1d1d6a7fcfc005fd62cb072c7731
parentd61b11163a324b7c73735df0ebf421eb69281646 (diff)
parent34e012196275cf936d64d3333405acdf77a9d852 (diff)
Merge "Restore getAccessibleMethod in the preferences inflater"
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/SupportPreferencesUtil.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/SupportPreferencesUtil.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/SupportPreferencesUtil.java
index 0124e83d79e8..6ad9efc81afa 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/SupportPreferencesUtil.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/SupportPreferencesUtil.java
@@ -41,6 +41,7 @@ import java.io.IOException;
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 @@ public class SupportPreferencesUtil {
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");