Package org.robolectric.shadows
Class ShadowArscAssetManager
- java.lang.Object
-
- org.robolectric.shadows.ShadowAssetManager
-
- org.robolectric.shadows.ShadowAssetManager.ArscBase
-
- org.robolectric.shadows.ShadowArscAssetManager
-
@Implements(value=android.content.res.AssetManager.class, maxSdk=27, shadowPicker=Picker.class) public class ShadowArscAssetManager extends ShadowAssetManager.ArscBase
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowAssetManager
ShadowAssetManager.ArscBase, ShadowAssetManager.Picker
-
-
Field Summary
Fields Modifier and Type Field Description protected AssetManager
realObject
-
Constructor Summary
Constructors Constructor Description ShadowArscAssetManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addAssetPath(String path)
protected int
addAssetPathNative(String path)
protected int
addAssetPathNative(String path, boolean appAsLib)
protected static void
applyStyle(int themeToken, int defStyleAttr, int defStyleRes, int xmlParserToken, int[] attrs, int[] outValues, int[] outIndices)
protected static void
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)
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
dumpTheme(long theme, int priority, String tag, String prefix)
int[]
getArrayIntResource(int arrayResId)
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>
getAssignedPackageIdentifiers()
protected Number
getNativeStringBlock(int block)
static String
getResourceBagValue(int ident, int bagEntryId, ResTable resTable)
static Map<String,Integer>
getResourceBagValues(int ident, ResTable res)
protected String
getResourceEntryName(int resid)
int
getResourceIdentifier(String name, String defType, String defPackage)
protected String
getResourceName(int resid)
protected String
getResourcePackageName(int resid)
protected String
getResourceTypeName(int resid)
protected int
getStringBlockCount()
protected void
init()
protected void
init(boolean isSystem)
protected String[]
list(String path)
protected int
loadResourceBagValue(int ident, int bagEntryId, TypedValue outValue, boolean resolve)
Returns true if the resource was found, filling in mRetStringBlock and mRetData.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 Number
newTheme()
protected Number
openAsset(String fileName, int mode)
protected ParcelFileDescriptor
openAssetFd(String fileName, long[] outOffsets)
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 int
readAsset(int asset, byte[] b, int off, int len)
protected int
readAsset(long asset, byte[] bArray, int off, int len)
protected int
readAssetChar(int asset)
protected int
readAssetChar(long asset)
static void
reset()
protected static boolean
resolveAttrs(long themeToken, int defStyleAttr, int defStyleRes, int[] inValues, int[] attrs, int[] outValues, int[] outIndices)
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
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 sdkVersion)
-
Methods inherited from class org.robolectric.shadows.ShadowAssetManager.ArscBase
getCompileTimeResTable
-
Methods inherited from class org.robolectric.shadows.ShadowAssetManager
useLegacy
-
-
-
-
Field Detail
-
realObject
@RealObject protected AssetManager realObject
-
-
Method Detail
-
reset
@Resetter public static void reset()
-
list
@Implementation protected final String[] list(String path) throws IOException
- Throws:
IOException
-
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) 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 sdkVersion)
-
dumpTheme
@HiddenApi @Implementation protected static void dumpTheme(long theme, int priority, String tag, String prefix)
-
getResourceName
@Implementation protected String getResourceName(int resid)
-
getResourcePackageName
@Implementation protected String getResourcePackageName(int resid)
-
getResourceTypeName
@Implementation protected String getResourceTypeName(int resid)
-
getResourceEntryName
@Implementation protected String getResourceEntryName(int resid)
-
addAssetPath
@HiddenApi @Implementation(maxSdk=17) public int addAssetPath(String path)
-
addAssetPathNative
@HiddenApi @Implementation(minSdk=18, maxSdk=23) protected final int addAssetPathNative(String path)
-
addAssetPathNative
@HiddenApi @Implementation(minSdk=24) protected int addAssetPathNative(String path, boolean appAsLib)
-
getResourceIdentifier
@HiddenApi @Implementation public int getResourceIdentifier(String name, String defType, String defPackage)
-
openAsset
@HiddenApi @Implementation protected final Number openAsset(String fileName, int mode) throws FileNotFoundException
- Throws:
FileNotFoundException
-
openAssetFd
@HiddenApi @Implementation protected ParcelFileDescriptor openAssetFd(String fileName, long[] outOffsets) throws IOException
- Throws:
IOException
-
openNonAssetNative
@HiddenApi @Implementation protected final Number openNonAssetNative(int cookie, String fileName, int accessMode) throws FileNotFoundException
- Throws:
FileNotFoundException
-
openNonAssetFdNative
@HiddenApi @Implementation protected ParcelFileDescriptor openNonAssetFdNative(int cookie, String fileName, long[] outOffsets) throws IOException
- Throws:
IOException
-
destroyAsset
@HiddenApi @Implementation(maxSdk=20) protected final void destroyAsset(int asset)
-
destroyAsset
@HiddenApi @Implementation(minSdk=21) protected final void destroyAsset(long asset)
-
readAssetChar
@HiddenApi @Implementation(maxSdk=20) protected final int readAssetChar(int asset)
-
readAssetChar
@HiddenApi @Implementation(minSdk=21) protected final int readAssetChar(long asset)
-
readAsset
@HiddenApi @Implementation(maxSdk=20) protected final int readAsset(int asset, byte[] b, int off, int len) throws IOException
- Throws:
IOException
-
readAsset
@HiddenApi @Implementation(minSdk=21) protected final int readAsset(long asset, byte[] bArray, int off, int len) throws IOException
- Throws:
IOException
-
seekAsset
@HiddenApi @Implementation(maxSdk=20) protected final long seekAsset(int asset, long offset, int whence)
-
seekAsset
@HiddenApi @Implementation(minSdk=21) protected final long seekAsset(long asset, long offset, int whence)
-
getAssetLength
@HiddenApi @Implementation(maxSdk=20) protected final long getAssetLength(int asset)
-
getAssetLength
@HiddenApi @Implementation(minSdk=21) protected final long getAssetLength(long asset)
-
getAssetRemainingLength
@HiddenApi @Implementation(maxSdk=20) protected final long getAssetRemainingLength(int asset)
-
getAssetRemainingLength
@HiddenApi @Implementation(minSdk=21) protected final long getAssetRemainingLength(long assetHandle)
-
loadResourceValue
@HiddenApi @Implementation protected int loadResourceValue(int ident, short density, TypedValue outValue, boolean resolve)
-
getResourceBagValues
public static Map<String,Integer> getResourceBagValues(int ident, ResTable res)
-
loadResourceBagValue
@Implementation @HiddenApi protected final int loadResourceBagValue(int ident, int bagEntryId, TypedValue outValue, boolean resolve)
Returns true if the resource was found, filling in mRetStringBlock and mRetData.
-
getResourceBagValue
public static String getResourceBagValue(int ident, int bagEntryId, ResTable resTable)
-
applyStyle
@HiddenApi @Implementation(maxSdk=20) protected static void 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)
-
applyStyle
@HiddenApi @Implementation(minSdk=21, maxSdk=25) protected static void applyStyle(long themeToken, int defStyleAttr, int defStyleRes, long xmlParserToken, int[] attrs, int[] outValues, int[] outIndices)
-
resolveAttrs
@Implementation @HiddenApi protected static boolean resolveAttrs(long themeToken, int defStyleAttr, int defStyleRes, int[] inValues, int[] attrs, int[] outValues, int[] outIndices)
-
retrieveAttributes
@HiddenApi @Implementation(maxSdk=20) protected final boolean retrieveAttributes(int xmlParserToken, int[] attrs, int[] outValues, int[] outIndices)
-
retrieveAttributes
@HiddenApi @Implementation(minSdk=21) protected final boolean retrieveAttributes(long xmlParserToken, int[] attrs, int[] outValues, int[] outIndices)
-
getArraySize
@HiddenApi @Implementation protected int getArraySize(int id)
-
retrieveArray
@Implementation @HiddenApi protected int retrieveArray(int id, int[] outValues)
-
getNativeStringBlock
@HiddenApi @Implementation protected Number getNativeStringBlock(int block)
-
getAssignedPackageIdentifiers
@Implementation protected final SparseArray<String> getAssignedPackageIdentifiers()
-
newTheme
@HiddenApi @Implementation protected final Number newTheme()
-
deleteTheme
@HiddenApi @Implementation(maxSdk=20) protected final void deleteTheme(int theme)
-
deleteTheme
@HiddenApi @Implementation(minSdk=21) protected final void deleteTheme(long theme)
-
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
@HiddenApi @Implementation(maxSdk=20) public static void copyTheme(int destPtr, int sourcePtr)
-
copyTheme
@HiddenApi @Implementation(minSdk=21, maxSdk=27) public static void copyTheme(long destPtr, long sourcePtr)
-
loadThemeAttributeValue
@HiddenApi @Implementation(maxSdk=20) protected static int loadThemeAttributeValue(int themeHandle, int ident, TypedValue outValue, boolean resolve)
-
loadThemeAttributeValue
@HiddenApi @Implementation(minSdk=21) protected static int loadThemeAttributeValue(long themeHandle, int ident, TypedValue outValue, boolean resolve)
-
openXmlAssetNative
@HiddenApi @Implementation protected final Number openXmlAssetNative(int cookie, String fileName) throws FileNotFoundException
- Throws:
FileNotFoundException
-
getArrayStringResource
@HiddenApi @Implementation protected final String[] getArrayStringResource(int arrayResId)
-
getArrayStringInfo
@HiddenApi @Implementation protected final int[] getArrayStringInfo(int arrayResId)
-
getArrayIntResource
@HiddenApi @Implementation public int[] getArrayIntResource(int arrayResId)
-
init
@HiddenApi @Implementation(maxSdk=19) protected void init()
-
init
@HiddenApi @Implementation(minSdk=20) protected void init(boolean isSystem)
-
getStringBlockCount
@HiddenApi @Implementation protected int getStringBlockCount()
-
-