summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-01-07 20:30:01 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-01-07 20:30:01 +0000
commit58a8a678bd72da68e6a21852926084fefbb3e02a (patch)
treebf075de4315251a86eec14407a41da0b36782a14 /core
parentedbe35357c66e865c91f7759f8adf3d0519b7f46 (diff)
parenteb14ccf0202b3050830523865e147b2dcfa819ba (diff)
downloadframeworks_base-58a8a678bd72da68e6a21852926084fefbb3e02a.zip
frameworks_base-58a8a678bd72da68e6a21852926084fefbb3e02a.tar.gz
frameworks_base-58a8a678bd72da68e6a21852926084fefbb3e02a.tar.bz2
Merge "Revert "Allow Views to specify a theme override""
Diffstat (limited to 'core')
-rw-r--r--core/java/android/view/LayoutInflater.java41
1 files changed, 9 insertions, 32 deletions
diff --git a/core/java/android/view/LayoutInflater.java b/core/java/android/view/LayoutInflater.java
index 32c9885..aa43bad 100644
--- a/core/java/android/view/LayoutInflater.java
+++ b/core/java/android/view/LayoutInflater.java
@@ -91,8 +91,6 @@ public abstract class LayoutInflater {
private static final String TAG_1995 = "blink";
private static final String TAG_REQUEST_FOCUS = "requestFocus";
- private static final String ATTR_THEME = "theme";
-
/**
* Hook to allow clients of the LayoutInflater to restrict the set of Views that are allowed
* to be inflated.
@@ -679,44 +677,23 @@ public abstract class LayoutInflater {
name = attrs.getAttributeValue(null, "class");
}
- // Apply a theme override, if necessary.
- final Context viewContext;
- final int themeResId = attrs.getAttributeResourceValue(null, ATTR_THEME, 0);
- if (themeResId != 0) {
- viewContext = new ContextThemeWrapper(mContext, themeResId);
- } else if (parent != null) {
- viewContext = parent.getContext();
- } else {
- viewContext = mContext;
- }
-
if (DEBUG) System.out.println("******** Creating view: " + name);
try {
View view;
- if (mFactory2 != null) {
- view = mFactory2.onCreateView(parent, name, viewContext, attrs);
- } else if (mFactory != null) {
- view = mFactory.onCreateView(name, viewContext, attrs);
- } else {
- view = null;
- }
+ if (mFactory2 != null) view = mFactory2.onCreateView(parent, name, mContext, attrs);
+ else if (mFactory != null) view = mFactory.onCreateView(name, mContext, attrs);
+ else view = null;
if (view == null && mPrivateFactory != null) {
- view = mPrivateFactory.onCreateView(parent, name, viewContext, attrs);
+ view = mPrivateFactory.onCreateView(parent, name, mContext, attrs);
}
-
+
if (view == null) {
- final Object lastContext = mConstructorArgs[0];
- mConstructorArgs[0] = viewContext;
- try {
- if (-1 == name.indexOf('.')) {
- view = onCreateView(parent, name, attrs);
- } else {
- view = createView(name, null, attrs);
- }
- } finally {
- mConstructorArgs[0] = lastContext;
+ if (-1 == name.indexOf('.')) {
+ view = onCreateView(parent, name, attrs);
+ } else {
+ view = createView(name, null, attrs);
}
}