Package org.robolectric.shadows
Class ShadowLegacyAssetManager
java.lang.Object
org.robolectric.shadows.ShadowAssetManager
org.robolectric.shadows.ShadowLegacyAssetManager
@Implements(value=android.content.res.AssetManager.class,
looseSignatures=true,
shadowPicker=Picker.class)
public class ShadowLegacyAssetManager
extends ShadowAssetManager
-
Nested Class Summary
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowAssetManager
ShadowAssetManager.ArscBase, ShadowAssetManager.Picker
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.google.common.collect.Ordering<String>
protected AssetManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
__constructor__
(boolean isSystem) int
addAssetPath
(String path) protected int
addAssetPathNative
(String path) protected int
addAssetPathNative
(String path, boolean appAsLib) protected static boolean
applyStyle
(int themeToken, int defStyleAttr, int defStyleRes, int xmlParserToken, int[] attrs, int[] outValues, int[] outIndices) protected static boolean
applyStyle
(long themeToken, int defStyleAttr, int defStyleRes, long xmlParserToken, int[] attrs, int[] outValues, int[] outIndices) protected static void
applyStyle
(long themeToken, int defStyleAttr, int defStyleRes, long xmlParserToken, int[] inAttrs, int length, long outValuesAddress, long outIndicesAddress) protected void
applyStyleToTheme
(long themePtr, int resId, boolean force) static void
applyThemeStyle
(int themePtr, int styleRes, boolean force) static void
applyThemeStyle
(long themePtr, int styleRes, boolean force) static void
copyTheme
(int destPtr, int sourcePtr) static void
copyTheme
(long destPtr, long sourcePtr) protected void
deleteTheme
(int theme) protected void
deleteTheme
(long theme) protected void
destroyAsset
(int asset) protected void
destroyAsset
(long asset) protected static void
protected Object
int[]
getArrayIntResource
(int resId) protected int
getArraySize
(int id) protected int[]
getArrayStringInfo
(int arrayResId) protected String[]
getArrayStringResource
(int arrayResId) protected long
getAssetLength
(int asset) protected long
getAssetLength
(long asset) protected long
getAssetRemainingLength
(int asset) protected long
getAssetRemainingLength
(long assetHandle) protected SparseArray<String>
getAttrTypeData
(ResName resName) protected String[]
protected Number
getNativeStringBlock
(int block) getResourceBagText
(int ident, int bagEntryId) protected String
getResourceEntryName
(int resid) int
getResourceIdentifier
(String name, String defType, String defPackage) protected int[]
getResourceIntArray
(int resId) protected String
getResourceName
(int resid) protected String
getResourcePackageName
(int resid) String[]
getResourceStringArray
(int id) protected ResourceTable
getResourceText
(int ident) getResourceTextArray
(int resId) protected String
getResourceTypeName
(int resid) boolean
getResourceValue
(int ident, int density, TypedValue outValue, boolean resolveRefs) protected int
boolean
getThemeValue
(int themePtr, int ident, TypedValue outValue, boolean resolveRefs) boolean
getThemeValue
(long themePtr, int ident, TypedValue outValue, boolean resolveRefs) protected TypedArray
getTypedArrayResource
(Resources resources, int resId) protected void
init()
protected void
init
(boolean isSystem) boolean
protected String[]
protected int
loadResourceBagValue
(int ident, int bagEntryId, TypedValue outValue, boolean resolve) protected int
loadResourceValue
(int ident, short density, TypedValue outValue, boolean resolve) protected static int
loadThemeAttributeValue
(int themeHandle, int ident, TypedValue outValue, boolean resolve) protected static int
loadThemeAttributeValue
(long themeHandle, int ident, TypedValue outValue, boolean resolve) protected XmlResourceParser
loadXmlResourceParser
(int resId, String type) protected static void
nativeAssetDestroy
(long asset_ptr) protected static long
nativeAssetGetLength
(long asset_ptr) protected static long
nativeAssetGetRemainingLength
(long asset_ptr) protected static int
nativeAssetRead
(long asset_ptr, byte[] java_buffer, int offset, int len) protected static int
nativeAssetReadChar
(long asset_ptr) protected static long
nativeAssetSeek
(long asset_ptr, long offset, int whence) protected static long
protected static String[]
protected static void
nativeThemeCopy
(long destPtr, long sourcePtr) protected static void
nativeThemeCopy
(long dstAssetManagerPtr, long dstThemePtr, long srcAssetManagerPtr, long srcThemePtr) protected Number
newTheme()
protected InputStream
protected InputStream
protected Number
protected ParcelFileDescriptor
openAssetFd
(String fileName, long[] outOffsets) protected AssetFileDescriptor
openNonAsset
(int cookie, String fileName, int accessMode) openNonAssetFd
(int cookie, String fileName) protected ParcelFileDescriptor
openNonAssetFdNative
(int cookie, String fileName, long[] outOffsets) protected Number
openNonAssetNative
(int cookie, String fileName, int accessMode) protected Number
openXmlAssetNative
(int cookie, String fileName) protected XmlResourceParser
openXmlResourceParser
(int cookie, String fileName) void
releaseTheme
(int themePtr) void
releaseTheme
(long themePtr) static void
reset()
protected static boolean
resolveAttrs
(long themeToken, int defStyleAttr, int defStyleRes, int[] inValues, int[] attrs, int[] outValues, int[] outIndices) protected ResName
resolveResName
(ResName resName, ResTable_config config) protected TypedResource
resolveResourceValue
(TypedResource value, ResTable_config config, int resId) protected int
retrieveArray
(int id, int[] outValues) protected boolean
retrieveAttributes
(int xmlParserToken, int[] attrs, int[] outValues, int[] outIndices) protected boolean
retrieveAttributes
(long xmlParserToken, int[] attrs, int[] outValues, int[] outIndices) protected long
seekAsset
(int asset, long offset, int whence) protected long
seekAsset
(long asset, long offset, int whence) void
setApkAssets
(Object apkAssetsObject, Object invalidateCachesObject) final void
setConfiguration
(int mcc, int mnc, String locale, int orientation, int touchscreen, int density, int keyboard, int keyboardHidden, int navigation, int screenWidth, int screenHeight, int smallestScreenWidthDp, int screenWidthDp, int screenHeightDp, int screenLayout, int uiMode, int sdkVersion) void
setConfiguration
(int mcc, int mnc, String locale, int orientation, int touchscreen, int density, int keyboard, int keyboardHidden, int navigation, int screenWidth, int screenHeight, int smallestScreenWidthDp, int screenWidthDp, int screenHeightDp, int screenLayout, int uiMode, int colorMode, int majorVersion) void
Methods inherited from class org.robolectric.shadows.ShadowAssetManager
useLegacy
-
Field Details
-
ATTRIBUTE_TYPE_PRECIDENCE
-
realObject
-
-
Constructor Details
-
ShadowLegacyAssetManager
public ShadowLegacyAssetManager()
-
-
Method Details
-
getAttrTypeData
-
__constructor__
-
__constructor__
-
nativeCreate
-
init
-
init
-
getResourceTable
-
getResourceText
-
getResourceBagText
-
getStringBlockCount
-
getResourceStringArray
-
getResourceIdentifier
@HiddenApi @Implementation public int getResourceIdentifier(String name, String defType, String defPackage) -
getResourceValue
@HiddenApi @Implementation public boolean getResourceValue(int ident, int density, TypedValue outValue, boolean resolveRefs) -
getResourceTextArray
-
getThemeValue
@HiddenApi @Implementation(maxSdk=20) public boolean getThemeValue(int themePtr, int ident, TypedValue outValue, boolean resolveRefs) -
getThemeValue
@HiddenApi @Implementation(minSdk=21) public boolean getThemeValue(long themePtr, int ident, TypedValue outValue, boolean resolveRefs) -
ensureStringBlocks
-
open
- Throws:
IOException
-
open
- Throws:
IOException
-
openFd
- Throws:
IOException
-
list
- Throws:
IOException
-
openAsset
@HiddenApi @Implementation(maxSdk=27) protected Number openAsset(String fileName, int mode) throws FileNotFoundException - Throws:
FileNotFoundException
-
openAssetFd
@HiddenApi @Implementation(maxSdk=27) protected ParcelFileDescriptor openAssetFd(String fileName, long[] outOffsets) throws IOException - Throws:
IOException
-
openNonAsset
@HiddenApi @Implementation public InputStream openNonAsset(int cookie, String fileName, int accessMode) throws IOException - Throws:
IOException
-
openNonAssetNative
@HiddenApi @Implementation(maxSdk=27) protected Number openNonAssetNative(int cookie, String fileName, int accessMode) throws FileNotFoundException - Throws:
FileNotFoundException
-
openNonAssetFd
@HiddenApi @Implementation public AssetFileDescriptor openNonAssetFd(int cookie, String fileName) throws IOException - Throws:
IOException
-
openNonAssetFdNative
@HiddenApi @Implementation(maxSdk=27) protected ParcelFileDescriptor openNonAssetFdNative(int cookie, String fileName, long[] outOffsets) throws IOException - Throws:
IOException
-
openXmlAssetNative
@HiddenApi @Implementation(maxSdk=27) protected Number openXmlAssetNative(int cookie, String fileName) throws FileNotFoundException - Throws:
FileNotFoundException
-
openXmlResourceParser
@Implementation protected XmlResourceParser openXmlResourceParser(int cookie, String fileName) throws IOException - Throws:
IOException
-
seekAsset
-
seekAsset
@HiddenApi @Implementation(minSdk=21, maxSdk=27) protected long seekAsset(long asset, long offset, int whence) -
getAssetLength
-
getAssetLength
-
getAssetRemainingLength
-
getAssetRemainingLength
@HiddenApi @Implementation(minSdk=21, maxSdk=27) protected long getAssetRemainingLength(long assetHandle) -
destroyAsset
-
destroyAsset
-
loadXmlResourceParser
protected XmlResourceParser loadXmlResourceParser(int resId, String type) throws Resources.NotFoundException - Throws:
Resources.NotFoundException
-
addAssetPath
-
addAssetPathNative
-
addAssetPathNative
@HiddenApi @Implementation(minSdk=24, maxSdk=27) protected int addAssetPathNative(String path, boolean appAsLib) -
setApkAssets
@HiddenApi @Implementation(minSdk=28) public void setApkAssets(Object apkAssetsObject, Object invalidateCachesObject) -
isUpToDate
-
setLocale
-
getLocales
-
setConfiguration
@HiddenApi @Implementation(maxSdk=25) public final void setConfiguration(int mcc, int mnc, String locale, int orientation, int touchscreen, int density, int keyboard, int keyboardHidden, int navigation, int screenWidth, int screenHeight, int smallestScreenWidthDp, int screenWidthDp, int screenHeightDp, int screenLayout, int uiMode, int sdkVersion) -
setConfiguration
@HiddenApi @Implementation(minSdk=26, maxSdk=33) public void setConfiguration(int mcc, int mnc, String locale, int orientation, int touchscreen, int density, int keyboard, int keyboardHidden, int navigation, int screenWidth, int screenHeight, int smallestScreenWidthDp, int screenWidthDp, int screenHeightDp, int screenLayout, int uiMode, int colorMode, int majorVersion) -
getArrayIntResource
-
getResourceIntArray
-
getArrayStringResource
-
getArrayStringInfo
-
newTheme
-
getTypedArrayResource
-
createTheme
-
dumpTheme
@HiddenApi @Implementation(minSdk=21, maxSdk=27) protected static void dumpTheme(long theme, int priority, String tag, String prefix) -
releaseTheme
-
releaseTheme
-
deleteTheme
-
deleteTheme
-
applyThemeStyle
@HiddenApi @Implementation(maxSdk=20) public static void applyThemeStyle(int themePtr, int styleRes, boolean force) -
applyThemeStyle
@HiddenApi @Implementation(minSdk=21, maxSdk=27) public static void applyThemeStyle(long themePtr, int styleRes, boolean force) -
copyTheme
-
copyTheme
@HiddenApi @Implementation(minSdk=21, maxSdk=27) public static void copyTheme(long destPtr, long sourcePtr) -
nativeThemeCopy
@HiddenApi @Implementation(minSdk=28, maxSdk=28) protected static void nativeThemeCopy(long destPtr, long sourcePtr) -
nativeThemeCopy
@HiddenApi @Implementation(minSdk=29) protected static void nativeThemeCopy(long dstAssetManagerPtr, long dstThemePtr, long srcAssetManagerPtr, long srcThemePtr) -
applyStyle
@HiddenApi @Implementation(maxSdk=20) protected static boolean applyStyle(int themeToken, int defStyleAttr, int defStyleRes, int xmlParserToken, int[] attrs, int[] outValues, int[] outIndices) -
applyStyle
@HiddenApi @Implementation(minSdk=26, maxSdk=27) protected static void applyStyle(long themeToken, int defStyleAttr, int defStyleRes, long xmlParserToken, int[] inAttrs, int length, long outValuesAddress, long outIndicesAddress) -
applyStyleToTheme
@HiddenApi @Implementation(minSdk=28) protected void applyStyleToTheme(long themePtr, int resId, boolean force) -
applyStyle
@HiddenApi @Implementation(minSdk=21, maxSdk=25) protected static boolean applyStyle(long themeToken, int defStyleAttr, int defStyleRes, long xmlParserToken, int[] attrs, int[] outValues, int[] outIndices) -
resolveAttrs
@HiddenApi @Implementation(minSdk=21, maxSdk=27) protected static boolean resolveAttrs(long themeToken, int defStyleAttr, int defStyleRes, int[] inValues, int[] attrs, int[] outValues, int[] outIndices) -
retrieveAttributes
@HiddenApi @Implementation(maxSdk=20) protected boolean retrieveAttributes(int xmlParserToken, int[] attrs, int[] outValues, int[] outIndices) -
retrieveAttributes
@Implementation(minSdk=21, maxSdk=27) protected boolean retrieveAttributes(long xmlParserToken, int[] attrs, int[] outValues, int[] outIndices) -
loadThemeAttributeValue
@HiddenApi @Implementation(maxSdk=20) protected static int loadThemeAttributeValue(int themeHandle, int ident, TypedValue outValue, boolean resolve) -
loadThemeAttributeValue
@HiddenApi @Implementation(minSdk=21, maxSdk=27) protected static int loadThemeAttributeValue(long themeHandle, int ident, TypedValue outValue, boolean resolve) -
resolveResName
-
resolveResourceValue
protected TypedResource resolveResourceValue(TypedResource value, ResTable_config config, int resId) -
getResourceName
-
getResourcePackageName
-
getResourceTypeName
-
getResourceEntryName
-
getArraySize
-
retrieveArray
-
getNativeStringBlock
-
getAssignedPackageIdentifiers
-
loadResourceValue
@Implementation(maxSdk=27) protected int loadResourceValue(int ident, short density, TypedValue outValue, boolean resolve) -
loadResourceBagValue
@Implementation(maxSdk=27) protected int loadResourceBagValue(int ident, int bagEntryId, TypedValue outValue, boolean resolve) -
nativeAssetDestroy
-
nativeAssetReadChar
-
nativeAssetRead
@Implementation(minSdk=28) protected static int nativeAssetRead(long asset_ptr, byte[] java_buffer, int offset, int len) throws IOException - Throws:
IOException
-
nativeAssetSeek
@Implementation(minSdk=28) protected static long nativeAssetSeek(long asset_ptr, long offset, int whence) -
nativeAssetGetLength
-
nativeAssetGetRemainingLength
-
nativeCreateIdmapsForStaticOverlaysTargetingAndroid
@Implementation(minSdk=29, maxSdk=30) protected static String[] nativeCreateIdmapsForStaticOverlaysTargetingAndroid() -
reset
-