FileDocCategorySizeDatePackage
BridgeAssetManager.javaAPI DocAndroid 5.1 API1850Thu Mar 12 22:22:44 GMT 2015android.content.res

BridgeAssetManager

public class BridgeAssetManager extends android.content.res.AssetManager

Fields Summary
Constructors Summary
private BridgeAssetManager()

    
Methods Summary
public static voidclearSystem()
Clears the static {@link AssetManager#sSystem} to make sure we don't leave objects around that would prevent us from unloading the library.

        AssetManager.sSystem = null;
    
public static android.content.res.AssetManagerinitSystem()
This initializes the static field {@link AssetManager#sSystem} which is used by methods who get a global asset manager using {@link AssetManager#getSystem()}.

They will end up using our bridge asset manager.

{@link Bridge} calls this method after setting up a new bridge.

        if (!(AssetManager.sSystem instanceof BridgeAssetManager)) {
            // Note that AssetManager() creates a system AssetManager and we override it
            // with our BridgeAssetManager.
            AssetManager.sSystem = new BridgeAssetManager();
            AssetManager.sSystem.makeStringBlocks(null);
        }
        return AssetManager.sSystem;