@Implements(value=android.os.storage.StorageManager.class) public class ShadowStorageManager extends java.lang.Object
Fake implementation of StorageManager
| Constructor and Description |
|---|
ShadowStorageManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addStorageVolume(android.os.storage.StorageVolume storageVolume)
Adds a
StorageVolume to the list returned by getStorageVolumes(). |
android.os.storage.StorageVolume |
getStorageVolume(java.io.File file)
Checks whether File belongs to any
StorageVolume in the list returned by getStorageVolumes(). |
protected java.util.List<android.os.storage.StorageVolume> |
getStorageVolumes()
Returns the storage volumes configured via
#addStorageVolume(). |
android.os.storage.StorageVolume[] |
getVolumeList()
Gets the volume list from
getVolumeList(int, int) |
protected static android.os.storage.StorageVolume[] |
getVolumeList(int userId,
int flags) |
protected static boolean |
isFileEncryptedNativeOrEmulated() |
protected static boolean |
isUserKeyUnlocked(int userId) |
void |
resetStorageVolumeList()
Clears the storageVolumeList.
|
void |
setFileEncryptedNativeOrEmulated(boolean isSupported)
Setter for
isFileEncryptedNativeOrEmulated() |
@Implementation(minSdk=23) protected static android.os.storage.StorageVolume[] getVolumeList(int userId, int flags)
public android.os.storage.StorageVolume[] getVolumeList()
Gets the volume list from getVolumeList(int, int)
public void addStorageVolume(android.os.storage.StorageVolume storageVolume)
Adds a StorageVolume to the list returned by getStorageVolumes().
StorageVolume - to add to list@Implementation(minSdk=24) protected java.util.List<android.os.storage.StorageVolume> getStorageVolumes()
Returns the storage volumes configured via #addStorageVolume().
public void resetStorageVolumeList()
Clears the storageVolumeList.
@Implementation(minSdk=24) public android.os.storage.StorageVolume getStorageVolume(java.io.File file)
Checks whether File belongs to any StorageVolume in the list returned by getStorageVolumes().
File - to check@HiddenApi @Implementation(minSdk=24) protected static boolean isFileEncryptedNativeOrEmulated()
public void setFileEncryptedNativeOrEmulated(boolean isSupported)
Setter for isFileEncryptedNativeOrEmulated()
isSupported - a boolean value to set file encrypted native or not@HiddenApi @Implementation(minSdk=24) protected static boolean isUserKeyUnlocked(int userId)