Class of android.content.res · AssetManager.java · Android's reference
public final class AssetManager implements AutoCloseable
The resource tables and assets of the app: the HLE of libandroidfw's AssetManager2 (src/android/res/arsc.c). Each native call is made holding the manager's lock, as Android's AssetManager does.
public static final int ACCESS_UNKNOWN = 0 sourcepublic static final int ACCESS_RANDOM = 1 sourcepublic static final int ACCESS_STREAMING = 2 sourcepublic static final int ACCESS_BUFFER = 3 sourcepublic AssetManager() sourcepublic static AssetManager forApk() sourceThe app's APKs: the base's resources.arsc, its cookie 1, then each split's that has one. A configuration split's (a density's, a language's) holds the base's package with its configurations' entries, which a lookup takes with the base's (arsc.c).
public synchronized void setConfiguration(Configuration c, DisplayMetrics m) sourcepublic InputStream open(String fileName) throws IOException sourcepublic InputStream open(String fileName, int accessMode) throws IOException sourcepublic InputStream openNonAsset(String fileName) throws IOException sourcepublic AssetFileDescriptor openFd(String fileName) throws IOException sourceAn asset as a file: copied out of the APK to the app's cache once.
public AssetFileDescriptor openNonAssetFd(String fileName) throws IOException sourceA file of the APK outside assets/, copied out the same way.
public String[] list(String path) throws IOException sourcepublic XmlResourceParser openXmlResourceParser(String fileName) throws IOException sourcepublic XmlResourceParser openXmlResourceParser(int cookie, String fileName) throws IOException sourcepublic String[] getLocales() sourcepublic synchronized void close() sourceMade from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.