Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java +15 −6 Original line number Diff line number Diff line Loading @@ -247,11 +247,16 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso * The counterpart is {@link #setUp()}. */ private void tearDown() { // The context may be null, if there was an error during init(). if (mContext != null) { // Make sure to remove static references, otherwise we could not unload the lib mContext.disposeResources(); } if (sCurrentContext != null) { // quit HandlerThread created during this session. HandlerThread_Delegate.cleanUp(sCurrentContext); } // clear the stored ViewConfiguration since the map is per density and not per context. ViewConfiguration_Accessor.clearConfigurations(); Loading @@ -262,10 +267,14 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso sCurrentContext = null; Bridge.setLog(null); if (mContext != null) { mContext.getRenderResources().setFrameworkResourceIdProvider(null); mContext.getRenderResources().setLogger(null); } mContext = null; } public static BridgeContext getCurrentContext() { return sCurrentContext; } Loading Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java +15 −6 Original line number Diff line number Diff line Loading @@ -247,11 +247,16 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso * The counterpart is {@link #setUp()}. */ private void tearDown() { // The context may be null, if there was an error during init(). if (mContext != null) { // Make sure to remove static references, otherwise we could not unload the lib mContext.disposeResources(); } if (sCurrentContext != null) { // quit HandlerThread created during this session. HandlerThread_Delegate.cleanUp(sCurrentContext); } // clear the stored ViewConfiguration since the map is per density and not per context. ViewConfiguration_Accessor.clearConfigurations(); Loading @@ -262,10 +267,14 @@ public abstract class RenderAction<T extends RenderParams> extends FrameworkReso sCurrentContext = null; Bridge.setLog(null); if (mContext != null) { mContext.getRenderResources().setFrameworkResourceIdProvider(null); mContext.getRenderResources().setLogger(null); } mContext = null; } public static BridgeContext getCurrentContext() { return sCurrentContext; } Loading