/frameworks/base/core/tests/coretests/src/android/app/ |
D | ApplicationPackageManagerTest.java | 19 import static android.os.storage.VolumeInfo.STATE_MOUNTED; 20 import static android.os.storage.VolumeInfo.STATE_UNMOUNTED; 27 import android.os.storage.VolumeInfo; 51 private static final VolumeInfo sInternalVol = new VolumeInfo("private", 52 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/); 54 private static final VolumeInfo sAdoptedVol = new VolumeInfo("adopted", 55 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/); 57 private static final VolumeInfo sPublicVol = new VolumeInfo("public", 58 VolumeInfo.TYPE_PUBLIC, null /*DiskInfo*/, null /*partGuid*/); 60 private static final VolumeInfo sPrivateUnmountedVol = new VolumeInfo("private2", [all …]
|
/frameworks/base/core/java/android/os/storage/ |
D | VolumeInfo.java | 68 public class VolumeInfo implements Parcelable { class 107 private static final Comparator<VolumeInfo> 108 sDescriptionComparator = new Comparator<VolumeInfo>() { 110 public int compare(VolumeInfo lhs, VolumeInfo rhs) { 111 if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(lhs.getId())) { 124 sStateToEnvironment.put(VolumeInfo.STATE_UNMOUNTED, Environment.MEDIA_UNMOUNTED); in sStateToEnvironment.put() 125 sStateToEnvironment.put(VolumeInfo.STATE_CHECKING, Environment.MEDIA_CHECKING); in sStateToEnvironment.put() 126 sStateToEnvironment.put(VolumeInfo.STATE_MOUNTED, Environment.MEDIA_MOUNTED); in sStateToEnvironment.put() 127 … sStateToEnvironment.put(VolumeInfo.STATE_MOUNTED_READ_ONLY, Environment.MEDIA_MOUNTED_READ_ONLY); in sStateToEnvironment.put() 128 sStateToEnvironment.put(VolumeInfo.STATE_FORMATTING, Environment.MEDIA_UNMOUNTED); in sStateToEnvironment.put() [all …]
|
D | IStorageEventListener.aidl | 20 import android.os.storage.VolumeInfo; 50 void onVolumeStateChanged(in VolumeInfo vol, int oldState, int newState) = 2; in onVolumeStateChanged()
|
D | StorageManager.java | 369 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in onVolumeStateChanged() 815 public @Nullable VolumeInfo findVolumeById(String id) { in findVolumeById() 818 for (VolumeInfo vol : getVolumes()) { in findVolumeById() 828 public @Nullable VolumeInfo findVolumeByUuid(String fsUuid) { in findVolumeByUuid() 831 for (VolumeInfo vol : getVolumes()) { in findVolumeByUuid() 852 public @Nullable VolumeInfo findPrivateForEmulated(VolumeInfo emulatedVol) { in findPrivateForEmulated() 867 public @Nullable VolumeInfo findEmulatedForPrivate(VolumeInfo privateVol) { in findEmulatedForPrivate() 877 public @Nullable VolumeInfo findVolumeByQualifiedUuid(String volumeUuid) { in findVolumeByQualifiedUuid() 879 return findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL); in findVolumeByQualifiedUuid() 905 for (VolumeInfo vol : mStorageManager.getVolumes(0)) { in getUuidForPath() [all …]
|
D | VolumeInfo.aidl | 19 parcelable VolumeInfo;
|
D | StorageEventListener.java | 51 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in onVolumeStateChanged()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/deviceinfo/ |
D | StorageVolumeProvider.java | 20 import android.os.storage.VolumeInfo; 38 List<VolumeInfo> getVolumes(); in getVolumes() 43 VolumeInfo findEmulatedForPrivate(VolumeInfo privateVolume); in findEmulatedForPrivate() 50 long getTotalBytes(StorageStatsManager stats, VolumeInfo volume) throws IOException; in getTotalBytes() 57 long getFreeBytes(StorageStatsManager stats, VolumeInfo volume) throws IOException; in getFreeBytes()
|
D | StorageManagerVolumeProvider.java | 21 import android.os.storage.VolumeInfo; 43 public List<VolumeInfo> getVolumes() { in getVolumes() 48 public VolumeInfo findEmulatedForPrivate(VolumeInfo privateVolume) { in findEmulatedForPrivate() 53 public long getTotalBytes(StorageStatsManager stats, VolumeInfo volume) throws IOException { in getTotalBytes() 58 public long getFreeBytes(StorageStatsManager stats, VolumeInfo volume) throws IOException { in getFreeBytes()
|
D | PrivateStorageInfo.java | 22 import android.os.storage.VolumeInfo; 47 for (VolumeInfo info : sm.getVolumes()) { in getPrivateStorageInfo() 48 if (info.getType() == VolumeInfo.TYPE_PRIVATE && info.isMountedReadable()) { in getPrivateStorageInfo() 60 public static long getTotalSize(VolumeInfo info, long totalInternalStorage) { in getTotalSize()
|
D | StorageMeasurement.java | 30 import android.os.storage.VolumeInfo; 102 private final VolumeInfo mVolume; 103 private final VolumeInfo mSharedVolume; 105 public StorageMeasurement(Context context, VolumeInfo volume, VolumeInfo sharedVolume) { in StorageMeasurement() 155 if (mVolume.getType() == VolumeInfo.TYPE_PUBLIC in measureExactStorage() 156 || mVolume.getType() == VolumeInfo.TYPE_STUB) { in measureExactStorage() 204 if ((mVolume.getType() == VolumeInfo.TYPE_PRIVATE) && mVolume.isMountedReadable()) { in measureExactStorage()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/ |
D | StorageNotification.java | 37 import android.os.storage.VolumeInfo; 79 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { 88 final VolumeInfo vol = mStorageManager.findVolumeByUuid(rec.getFsUuid()); 179 final List<VolumeInfo> vols = mStorageManager.getVolumes(); in start() 180 for (VolumeInfo vol : vols) { in start() 198 if (rec.getType() != VolumeInfo.TYPE_PRIVATE) continue; in updateMissingPrivateVolumes() 201 final VolumeInfo info = mStorageManager.findVolumeByUuid(fsUuid); in updateMissingPrivateVolumes() 245 .setSmallIcon(getSmallIcon(disk, VolumeInfo.STATE_UNMOUNTABLE)) in onDiskScannedInternal() 277 private void onVolumeStateChangedInternal(VolumeInfo vol) { in onVolumeStateChangedInternal() 279 case VolumeInfo.TYPE_PRIVATE: in onVolumeStateChangedInternal() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/storage/ |
D | AppCollectorTest.java | 29 import android.os.storage.VolumeInfo; 93 VolumeInfo volume = new VolumeInfo("testuuid", 0, null, null); in testNoApps() 103 VolumeInfo volume = new VolumeInfo("testuuid", 0, null, null); in testAppOnExternalVolume() 113 VolumeInfo volume = new VolumeInfo("testuuid", 0, null, null); in testOneValidApp() 130 VolumeInfo volume = new VolumeInfo("testuuid", 0, null, null); in testMultipleUsersOneApp() 151 VolumeInfo volume = new VolumeInfo("testuuid", 0, null, null); in testAppNotFoundDoesntCauseCrash()
|
D | DiskStatsLoggingServiceTest.java | 42 import android.os.storage.VolumeInfo; 196 VolumeInfo volumeInfo = in testDontCrashOnRun() 197 new VolumeInfo(VolumeInfo.ID_PRIVATE_INTERNAL, VolumeInfo.TYPE_PRIVATE, null, null); in testDontCrashOnRun()
|
/frameworks/base/services/core/java/com/android/server/storage/ |
D | StorageSessionController.java | 35 import android.os.storage.VolumeInfo; 82 public void onVolumeMount(ParcelFileDescriptor deviceFd, VolumeInfo vol) in onVolumeMount() 118 public void notifyVolumeStateChanged(VolumeInfo vol) throws ExternalStorageServiceException { in notifyVolumeStateChanged() 147 public StorageUserConnection onVolumeRemove(VolumeInfo vol) { in onVolumeRemove() 179 public void onVolumeUnmount(VolumeInfo vol) { in onVolumeUnmount() 344 public static boolean isEmulatedOrPublic(VolumeInfo vol) { in isEmulatedOrPublic() 345 return vol.type == VolumeInfo.TYPE_EMULATED || vol.type == VolumeInfo.TYPE_PUBLIC; in isEmulatedOrPublic() 363 private boolean shouldHandle(@Nullable VolumeInfo vol) { in shouldHandle()
|
D | AppCollector.java | 32 import android.os.storage.VolumeInfo; 61 public AppCollector(Context context, @NonNull VolumeInfo volume) { in AppCollector() 99 private final VolumeInfo mVolume; 104 BackgroundHandler(Looper looper, @NonNull VolumeInfo volume, in BackgroundHandler()
|
D | FileCollector.java | 26 import android.os.storage.VolumeInfo; 198 VolumeInfo primaryVolume = pm.getPrimaryStorageCurrentVolume(); in getSystemSize() 201 VolumeInfo shared = sm.findEmulatedForPrivate(primaryVolume); in getSystemSize()
|
/frameworks/base/services/core/java/com/android/server/ |
D | StorageManagerService.java | 120 import android.os.storage.VolumeInfo; 417 private final ArrayMap<String, VolumeInfo> mVolumes = new ArrayMap<>(); 467 private VolumeInfo findVolumeByIdOrThrow(String id) { in findVolumeByIdOrThrow() 469 final VolumeInfo vol = mVolumes.get(id); in findVolumeByIdOrThrow() 480 final VolumeInfo vol = mVolumes.valueAt(i); in findVolumeIdForPathOrThrow() 492 final VolumeInfo vol = mVolumes.valueAt(i); in findRecordForPath() 514 private @Nullable VolumeInfo findStorageForUuid(String volumeUuid) { in findStorageForUuid() 517 return storage.findVolumeById(VolumeInfo.ID_EMULATED_INTERNAL + ";" + 0); in findStorageForUuid() 536 final VolumeInfo vol = mVolumes.valueAt(i); in shouldBenchmark() 767 final VolumeInfo vol = (VolumeInfo) msg.obj; in handleMessage() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | PackageHelperTests.java | 19 import static android.os.storage.VolumeInfo.STATE_MOUNTED; 23 import android.os.storage.VolumeInfo; 57 VolumeInfo internalVol = new VolumeInfo("private", in createStorageManagerMock() 58 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/); in createStorageManagerMock() 63 VolumeInfo adoptedVol = new VolumeInfo("adopted", in createStorageManagerMock() 64 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/); in createStorageManagerMock() 69 VolumeInfo publicVol = new VolumeInfo("public", in createStorageManagerMock() 70 VolumeInfo.TYPE_PUBLIC, null /*DiskInfo*/, null /*partGuid*/); in createStorageManagerMock() 75 List<VolumeInfo> volumes = new ArrayList<>(); in createStorageManagerMock()
|
/frameworks/base/cmds/sm/src/com/android/commands/sm/ |
D | Sm.java | 26 import android.os.storage.VolumeInfo; 129 filterType = VolumeInfo.TYPE_PUBLIC; in runListVolumes() 131 filterType = VolumeInfo.TYPE_PRIVATE; in runListVolumes() 133 filterType = VolumeInfo.TYPE_EMULATED; in runListVolumes() 135 filterType = VolumeInfo.TYPE_STUB; in runListVolumes() 140 final VolumeInfo[] vols = mSm.getVolumes(0); in runListVolumes() 141 for (VolumeInfo vol : vols) { in runListVolumes() 143 final String envState = VolumeInfo.getEnvironmentForState(vol.getState()); in runListVolumes()
|
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ |
D | ExternalStorageProvider.java | 37 import android.os.storage.VolumeInfo; 127 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in onCreate() 168 final List<VolumeInfo> volumes = mStorageManager.getVolumes(); in updateVolumesLocked() 169 for (VolumeInfo volume : volumes) { in updateVolumesLocked() 175 if (volume.getType() == VolumeInfo.TYPE_EMULATED) { in updateVolumesLocked() 198 final VolumeInfo privateVol = mStorageManager.findPrivateForEmulated(volume); in updateVolumesLocked() 202 } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC in updateVolumesLocked() 203 || volume.getType() == VolumeInfo.TYPE_STUB) { in updateVolumesLocked() 239 if (volume.getType() != VolumeInfo.TYPE_EMULATED) { in updateVolumesLocked() 251 if (volume.getType() == VolumeInfo.TYPE_PUBLIC) { in updateVolumesLocked()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | UserDataPreparerTest.java | 29 import android.os.storage.VolumeInfo; 91 VolumeInfo testVolume = new VolumeInfo("testuuid", VolumeInfo.TYPE_PRIVATE, null, null); in setup()
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/ |
D | BridgePackageManager.java | 56 import android.os.storage.VolumeInfo; 870 public int movePackage(String packageName, VolumeInfo vol) { in movePackage() 875 public VolumeInfo getPackageCurrentVolume(ApplicationInfo app) { in getPackageCurrentVolume() 880 public List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app) { in getPackageCandidateVolumes() 885 public int movePrimaryStorage(VolumeInfo vol) { in movePrimaryStorage() 890 public VolumeInfo getPrimaryStorageCurrentVolume() { in getPrimaryStorageCurrentVolume() 895 public List<VolumeInfo> getPrimaryStorageCandidateVolumes() { in getPrimaryStorageCandidateVolumes()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/testutils/ |
D | PackageManagerStub.java | 37 import android.os.storage.VolumeInfo; 914 public int movePackage(String packageName, VolumeInfo vol) { in movePackage() 919 public VolumeInfo getPackageCurrentVolume(ApplicationInfo app) { in getPackageCurrentVolume() 924 public List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app) { in getPackageCandidateVolumes() 929 public int movePrimaryStorage(VolumeInfo vol) { in movePrimaryStorage() 934 public VolumeInfo getPrimaryStorageCurrentVolume() { in getPrimaryStorageCurrentVolume() 939 public List<VolumeInfo> getPrimaryStorageCandidateVolumes() { in getPrimaryStorageCandidateVolumes()
|
/frameworks/base/core/java/android/app/ |
D | ApplicationPackageManager.java | 84 import android.os.storage.VolumeInfo; 2261 public int movePackage(String packageName, VolumeInfo vol) { in movePackage() 2264 if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { in movePackage() 2280 public @Nullable VolumeInfo getPackageCurrentVolume(ApplicationInfo app) { in getPackageCurrentVolume() 2286 protected @Nullable VolumeInfo getPackageCurrentVolume(ApplicationInfo app, in getPackageCurrentVolume() 2289 return storage.findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL); in getPackageCurrentVolume() 2296 public @NonNull List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app) { in getPackageCandidateVolumes() 2302 protected @NonNull List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app, in getPackageCandidateVolumes() 2304 final VolumeInfo currentVol = getPackageCurrentVolume(app, storageManager); in getPackageCandidateVolumes() 2305 final List<VolumeInfo> vols = storageManager.getVolumes(); in getPackageCandidateVolumes() [all …]
|
/frameworks/base/services/usage/java/com/android/server/usage/ |
D | StorageStatsService.java | 60 import android.os.storage.VolumeInfo; 143 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in StorageStatsService() 145 case VolumeInfo.TYPE_PUBLIC: in StorageStatsService() 146 case VolumeInfo.TYPE_PRIVATE: in StorageStatsService() 147 case VolumeInfo.TYPE_EMULATED: in StorageStatsService() 148 if (newState == VolumeInfo.STATE_MOUNTED) { in StorageStatsService() 223 final VolumeInfo vol = mStorage.findVolumeByUuid(volumeUuid); in getTotalBytes()
|