Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -197,7 +197,12 @@ public final class BridgeContext extends Context { mRenderResources = renderResources; mRenderResources = renderResources; mConfig = config; mConfig = config; mAssets = new BridgeAssetManager(); AssetManager systemAssetManager = AssetManager.getSystem(); if (systemAssetManager instanceof BridgeAssetManager) { mAssets = (BridgeAssetManager) systemAssetManager; } else { throw new AssertionError("Creating BridgeContext without initializing Bridge"); } mAssets.setAssetRepository(assets); mAssets.setAssetRepository(assets); mApplicationInfo = new ApplicationInfo(); mApplicationInfo = new ApplicationInfo(); Loading Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -197,7 +197,12 @@ public final class BridgeContext extends Context { mRenderResources = renderResources; mRenderResources = renderResources; mConfig = config; mConfig = config; mAssets = new BridgeAssetManager(); AssetManager systemAssetManager = AssetManager.getSystem(); if (systemAssetManager instanceof BridgeAssetManager) { mAssets = (BridgeAssetManager) systemAssetManager; } else { throw new AssertionError("Creating BridgeContext without initializing Bridge"); } mAssets.setAssetRepository(assets); mAssets.setAssetRepository(assets); mApplicationInfo = new ApplicationInfo(); mApplicationInfo = new ApplicationInfo(); Loading