summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2017-05-26 20:54:49 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-05-26 20:54:57 +0000
commitbd8fb0e71d02a0b3b85fa7bfed410f8d6df125bb (patch)
treee2c6972860a573e7210c95878e058459788f5765
parentb25f52c042dc8954812767a3ee99b4dff4a6afef (diff)
parenta7cec30f983cbb3d90b13449adf43fec5c1ec677 (diff)
Merge "Resolve inflate attr against default package" into oc-dev
-rw-r--r--core/java/android/view/LayoutInflater.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/view/LayoutInflater.java b/core/java/android/view/LayoutInflater.java
index f987e4ee184a..ad46d07d61c9 100644
--- a/core/java/android/view/LayoutInflater.java
+++ b/core/java/android/view/LayoutInflater.java
@@ -923,8 +923,11 @@ public abstract class LayoutInflater {
+ " include tag: <include layout=\"@layout/layoutID\" />");
}
- // Attempt to resolve the "?attr/name" string to an identifier.
- layout = context.getResources().getIdentifier(value.substring(1), null, null);
+ // Attempt to resolve the "?attr/name" string to an attribute
+ // within the default (e.g. application) package.
+ layout = context.getResources().getIdentifier(
+ value.substring(1), "attr", context.getPackageName());
+
}
// The layout might be referencing a theme attribute.