Fix custom font rendering

The context was using the wrong asset manager.

Bug: http://b.android.com/198897
Change-Id: Id58473a4539ed93a9f338c730686128c7089fc92
This commit is contained in:
Deepanshu Gupta
2016-01-14 14:52:32 -08:00
parent 0c08fc0fc5
commit 2ea852541f

View File

@@ -196,7 +196,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();