diff options
| author | 2016-01-15 05:29:10 +0000 | |
|---|---|---|
| committer | 2016-01-15 05:29:10 +0000 | |
| commit | 15cc7bba8d04c7ced6fa41bafc9810f0b55bbe12 (patch) | |
| tree | 836f2f99bd24bbdb3e1e8519cec70145e811a8e8 | |
| parent | 02bb4295f0aff8fab1d58ac48b1ca2c8a727ceb5 (diff) | |
| parent | 14df39f9e5855caef8d272fb136abe17b225d971 (diff) | |
Merge "Fix custom font rendering" into mnc-ub-dev am: f5984d5fce
am: 14df39f9e5
* commit '14df39f9e5855caef8d272fb136abe17b225d971':
Fix custom font rendering
| -rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java index 63411b070d58..e6fb6207a206 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java @@ -197,7 +197,12 @@ public final class BridgeContext extends Context { mRenderResources = renderResources; 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); mApplicationInfo = new ApplicationInfo(); |