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
FieldsFields inherited from class org.robolectric.shadows.ShadowAssetManager
ATTRIBUTE_TYPE_PRECIDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final intaddAssetPathNative(String path) protected intaddAssetPathNative(String path, boolean appAsLib) protected static booleanapplyStyle(long themeToken, int defStyleAttr, int defStyleRes, long xmlParserToken, int[] attrs, int[] outValues, int[] outIndices) protected static voidapplyStyle(long themeToken, int defStyleAttr, int defStyleRes, long xmlParserToken, int[] inAttrs, int length, long outValuesAddress, long outIndicesAddress) static voidapplyThemeStyle(long themePtr, int styleRes, boolean force) static voidcopyTheme(long destPtr, long sourcePtr) protected voiddeleteTheme(long theme) protected voiddestroyAsset(long asset) protected static voidint[]getArrayIntResource(int arrayResId) protected intgetArraySize(int id) protected int[]getArrayStringInfo(int arrayResId) protected String[]getArrayStringResource(int arrayResId) protected longgetAssetLength(long asset) protected longgetAssetRemainingLength(long assetHandle) protected SparseArray<String>protected longgetNativeStringBlock(int block) static StringgetResourceBagValue(int ident, int bagEntryId, org.robolectric.res.android.ResTable resTable) getResourceBagValues(int ident, org.robolectric.res.android.ResTable res) protected StringgetResourceEntryName(int resid) intgetResourceIdentifier(String name, String defType, String defPackage) protected StringgetResourceName(int resid) protected StringgetResourcePackageName(int resid) protected StringgetResourceTypeName(int resid) protected intprotected voidinit(boolean isSystem) protected String[]protected intloadResourceBagValue(int ident, int bagEntryId, TypedValue outValue, boolean resolve) Returns true if the resource was found, filling in mRetStringBlock and mRetData.protected intloadResourceValue(int ident, short density, TypedValue outValue, boolean resolve) protected static intloadThemeAttributeValue(long themeHandle, int ident, TypedValue outValue, boolean resolve) protected longnewTheme()protected longprotected ParcelFileDescriptoropenAssetFd(String fileName, long[] outOffsets) protected ParcelFileDescriptoropenNonAssetFdNative(int cookie, String fileName, long[] outOffsets) protected longopenNonAssetNative(int cookie, String fileName, int accessMode) protected longopenXmlAssetNative(int cookie, String fileName) protected intreadAsset(long asset, byte[] bArray, int off, int len) protected intreadAssetChar(long asset) static voidreset()protected static booleanresolveAttrs(long themeToken, int defStyleAttr, int defStyleRes, int[] inValues, int[] attrs, int[] outValues, int[] outIndices) protected intretrieveArray(int id, int[] outValues) protected booleanretrieveAttributes(long xmlParserToken, int[] attrs, int[] outValues, int[] outIndices) protected longseekAsset(long asset, long offset, int whence) final voidsetConfiguration(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) voidsetConfiguration(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
-
Field Details
-
realObject
-
-
Constructor Details
-
ShadowArscAssetManager
public ShadowArscAssetManager()
-
-
Method Details
-
reset
@Resetter public static void reset() -
list
- 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
-
getResourceName
-
getResourcePackageName
-
getResourceTypeName
-
getResourceEntryName
-
addAssetPathNative
-
addAssetPathNative
@HiddenApi @Implementation(minSdk=24) protected int addAssetPathNative(String path, boolean appAsLib) -
getResourceIdentifier
-
openAsset
@HiddenApi @Implementation protected long 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 long 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 protected void destroyAsset(long asset) -
readAssetChar
@HiddenApi @Implementation protected int readAssetChar(long asset) -
readAsset
@HiddenApi @Implementation protected int readAsset(long asset, byte[] bArray, int off, int len) throws IOException - Throws:
IOException
-
seekAsset
@HiddenApi @Implementation protected long seekAsset(long asset, long offset, int whence) -
getAssetLength
@HiddenApi @Implementation protected long getAssetLength(long asset) -
getAssetRemainingLength
@HiddenApi @Implementation protected long getAssetRemainingLength(long assetHandle) -
loadResourceValue
@HiddenApi @Implementation protected int loadResourceValue(int ident, short density, TypedValue outValue, boolean resolve) -
getResourceBagValues
-
loadResourceBagValue
@Implementation @HiddenApi protected 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, org.robolectric.res.android.ResTable resTable) -
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(maxSdk=25) protected static boolean 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 protected 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 long getNativeStringBlock(int block) -
getAssignedPackageIdentifiers
-
newTheme
@HiddenApi @Implementation protected long newTheme() -
deleteTheme
@HiddenApi @Implementation protected void deleteTheme(long theme) -
applyThemeStyle
@HiddenApi @Implementation(maxSdk=27) public static void applyThemeStyle(long themePtr, int styleRes, boolean force) -
copyTheme
@HiddenApi @Implementation(maxSdk=27) public static void copyTheme(long destPtr, long sourcePtr) -
loadThemeAttributeValue
@HiddenApi @Implementation protected static int loadThemeAttributeValue(long themeHandle, int ident, TypedValue outValue, boolean resolve) -
openXmlAssetNative
@HiddenApi @Implementation protected long openXmlAssetNative(int cookie, String fileName) throws FileNotFoundException - Throws:
FileNotFoundException
-
getArrayStringResource
-
getArrayStringInfo
@HiddenApi @Implementation protected int[] getArrayStringInfo(int arrayResId) -
getArrayIntResource
@HiddenApi @Implementation public int[] getArrayIntResource(int arrayResId) -
init
@HiddenApi @Implementation protected void init(boolean isSystem) -
getStringBlockCount
@HiddenApi @Implementation protected int getStringBlockCount()
-