Loading core/java/android/view/LayoutInflater.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -348,6 +348,7 @@ public abstract class LayoutInflater { public View inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot) { public View inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot) { synchronized (mConstructorArgs) { synchronized (mConstructorArgs) { final AttributeSet attrs = Xml.asAttributeSet(parser); final AttributeSet attrs = Xml.asAttributeSet(parser); Context lastContext = (Context)mConstructorArgs[0]; mConstructorArgs[0] = mContext; mConstructorArgs[0] = mContext; View result = root; View result = root; Loading Loading @@ -432,11 +433,11 @@ public abstract class LayoutInflater { + ": " + e.getMessage()); + ": " + e.getMessage()); ex.initCause(e); ex.initCause(e); throw ex; throw ex; } } finally { // Don't retain static reference on context. // Told retain static reference on context. mConstructorArgs[0] = lastContext; mConstructorArgs[0] = null; mConstructorArgs[1] = null; mConstructorArgs[1] = null; } return result; return result; } } Loading Loading
core/java/android/view/LayoutInflater.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -348,6 +348,7 @@ public abstract class LayoutInflater { public View inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot) { public View inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot) { synchronized (mConstructorArgs) { synchronized (mConstructorArgs) { final AttributeSet attrs = Xml.asAttributeSet(parser); final AttributeSet attrs = Xml.asAttributeSet(parser); Context lastContext = (Context)mConstructorArgs[0]; mConstructorArgs[0] = mContext; mConstructorArgs[0] = mContext; View result = root; View result = root; Loading Loading @@ -432,11 +433,11 @@ public abstract class LayoutInflater { + ": " + e.getMessage()); + ": " + e.getMessage()); ex.initCause(e); ex.initCause(e); throw ex; throw ex; } } finally { // Don't retain static reference on context. // Told retain static reference on context. mConstructorArgs[0] = lastContext; mConstructorArgs[0] = null; mConstructorArgs[1] = null; mConstructorArgs[1] = null; } return result; return result; } } Loading