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