Fix ParserFactory not initialized error. [DO NOT MERGE]

Bug: http://b.android.com/175129
Change-Id: I2111673767e0f62ee910560022b559a177d55abd
(cherry picked from commit 996458b76c)
This commit is contained in:
Deepanshu Gupta
2015-05-29 17:00:34 -07:00
parent a287b8428a
commit e5fa12ad78

View File

@@ -99,9 +99,6 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso
return result; return result;
} }
// setup the ParserFactory
ParserFactory.setParserFactory(mParams.getLayoutlibCallback().getParserFactory());
HardwareConfig hardwareConfig = mParams.getHardwareConfig(); HardwareConfig hardwareConfig = mParams.getHardwareConfig();
// setup the display Metrics. // setup the display Metrics.
@@ -230,6 +227,9 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso
* The counterpart is {@link #tearDown()}. * The counterpart is {@link #tearDown()}.
*/ */
private void setUp() { private void setUp() {
// setup the ParserFactory
ParserFactory.setParserFactory(mParams.getLayoutlibCallback().getParserFactory());
// make sure the Resources object references the context (and other objects) for this // make sure the Resources object references the context (and other objects) for this
// scene // scene
mContext.initResources(); mContext.initResources();