Home
last modified time | relevance | path

Searched refs:VolumeInfo (Results 1 – 25 of 38) sorted by relevance

12

/frameworks/base/core/java/android/os/storage/
DVolumeInfo.java65 public class VolumeInfo implements Parcelable { class
101 private static final Comparator<VolumeInfo>
102 sDescriptionComparator = new Comparator<VolumeInfo>() {
104 public int compare(VolumeInfo lhs, VolumeInfo rhs) {
105 if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(lhs.getId())) {
118 sStateToEnvironment.put(VolumeInfo.STATE_UNMOUNTED, Environment.MEDIA_UNMOUNTED); in sStateToEnvironment.put()
119 sStateToEnvironment.put(VolumeInfo.STATE_CHECKING, Environment.MEDIA_CHECKING); in sStateToEnvironment.put()
120 sStateToEnvironment.put(VolumeInfo.STATE_MOUNTED, Environment.MEDIA_MOUNTED); in sStateToEnvironment.put()
121 … sStateToEnvironment.put(VolumeInfo.STATE_MOUNTED_READ_ONLY, Environment.MEDIA_MOUNTED_READ_ONLY); in sStateToEnvironment.put()
122 sStateToEnvironment.put(VolumeInfo.STATE_FORMATTING, Environment.MEDIA_UNMOUNTED); in sStateToEnvironment.put()
[all …]
DStorageManager.java280 mCallback.onVolumeStateChanged((VolumeInfo) args.arg1, args.argi2, args.argi3); in handleMessage()
319 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in onVolumeStateChanged()
668 public @Nullable VolumeInfo findVolumeById(String id) { in findVolumeById()
671 for (VolumeInfo vol : getVolumes()) { in findVolumeById()
680 public @Nullable VolumeInfo findVolumeByUuid(String fsUuid) { in findVolumeByUuid()
683 for (VolumeInfo vol : getVolumes()) { in findVolumeByUuid()
704 public @Nullable VolumeInfo findPrivateForEmulated(VolumeInfo emulatedVol) { in findPrivateForEmulated()
713 public @Nullable VolumeInfo findEmulatedForPrivate(VolumeInfo privateVol) { in findEmulatedForPrivate()
722 public @Nullable VolumeInfo findVolumeByQualifiedUuid(String volumeUuid) { in findVolumeByQualifiedUuid()
724 return findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL); in findVolumeByQualifiedUuid()
[all …]
DIStorageEventListener.aidl20 import android.os.storage.VolumeInfo;
50 void onVolumeStateChanged(in VolumeInfo vol, int oldState, int newState) = 2; in onVolumeStateChanged()
DVolumeInfo.aidl19 parcelable VolumeInfo;
DStorageEventListener.java41 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in onVolumeStateChanged()
/frameworks/base/core/tests/coretests/src/android/app/
DApplicationPackageManagerTest.java24 import android.os.storage.VolumeInfo;
34 import static android.os.storage.VolumeInfo.STATE_MOUNTED;
35 import static android.os.storage.VolumeInfo.STATE_UNMOUNTED;
48 private static final VolumeInfo sInternalVol = new VolumeInfo("private",
49 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/);
51 private static final VolumeInfo sAdoptedVol = new VolumeInfo("adopted",
52 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/);
54 private static final VolumeInfo sPublicVol = new VolumeInfo("public",
55 VolumeInfo.TYPE_PUBLIC, null /*DiskInfo*/, null /*partGuid*/);
57 private static final VolumeInfo sPrivateUnmountedVol = new VolumeInfo("private2",
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/deviceinfo/
DStorageVolumeProvider.java20 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()
DStorageManagerVolumeProvider.java21 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()
DPrivateStorageInfo.java22 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()
DStorageMeasurement.java30 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()
203 if ((mVolume.getType() == VolumeInfo.TYPE_PRIVATE) && mVolume.isMountedReadable()) { in measureExactStorage()
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/
DStorageNotification.java37 import android.os.storage.VolumeInfo;
75 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) {
84 final VolumeInfo vol = mStorageManager.findVolumeByUuid(rec.getFsUuid());
175 final List<VolumeInfo> vols = mStorageManager.getVolumes(); in start()
176 for (VolumeInfo vol : vols) { in start()
193 if (rec.getType() != VolumeInfo.TYPE_PRIVATE) continue; in updateMissingPrivateVolumes()
196 final VolumeInfo info = mStorageManager.findVolumeByUuid(fsUuid); in updateMissingPrivateVolumes()
240 .setSmallIcon(getSmallIcon(disk, VolumeInfo.STATE_UNMOUNTABLE)) in onDiskScannedInternal()
272 private void onVolumeStateChangedInternal(VolumeInfo vol) { in onVolumeStateChangedInternal()
274 case VolumeInfo.TYPE_PRIVATE: in onVolumeStateChangedInternal()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/storage/
DAppCollectorTest.java29 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()
DDiskStatsLoggingServiceTest.java42 import android.os.storage.VolumeInfo;
194 VolumeInfo volumeInfo = in testDontCrashOnRun()
195 new VolumeInfo(VolumeInfo.ID_PRIVATE_INTERNAL, VolumeInfo.TYPE_PRIVATE, null, null); in testDontCrashOnRun()
/frameworks/base/services/core/java/com/android/server/
DStorageManagerService.java82 import android.os.storage.VolumeInfo;
328 private final ArrayMap<String, VolumeInfo> mVolumes = new ArrayMap<>();
358 private VolumeInfo findVolumeByIdOrThrow(String id) { in findVolumeByIdOrThrow()
360 final VolumeInfo vol = mVolumes.get(id); in findVolumeByIdOrThrow()
371 final VolumeInfo vol = mVolumes.valueAt(i); in findVolumeIdForPathOrThrow()
383 final VolumeInfo vol = mVolumes.valueAt(i); in findRecordForPath()
405 private @Nullable VolumeInfo findStorageForUuid(String volumeUuid) { in findStorageForUuid()
408 return storage.findVolumeById(VolumeInfo.ID_EMULATED_INTERNAL); in findStorageForUuid()
427 final VolumeInfo vol = mVolumes.valueAt(i); in shouldBenchmark()
692 final VolumeInfo vol = (VolumeInfo) msg.obj; in handleMessage()
[all …]
/frameworks/base/cmds/sm/src/com/android/commands/sm/
DSm.java25 import android.os.storage.VolumeInfo;
118 filterType = VolumeInfo.TYPE_PUBLIC; in runListVolumes()
120 filterType = VolumeInfo.TYPE_PRIVATE; in runListVolumes()
122 filterType = VolumeInfo.TYPE_EMULATED; in runListVolumes()
127 final VolumeInfo[] vols = mSm.getVolumes(0); in runListVolumes()
128 for (VolumeInfo vol : vols) { in runListVolumes()
130 final String envState = VolumeInfo.getEnvironmentForState(vol.getState()); in runListVolumes()
/frameworks/base/core/tests/coretests/src/android/content/pm/
DPackageHelperTests.java25 import android.os.storage.VolumeInfo;
39 import static android.os.storage.VolumeInfo.STATE_MOUNTED;
64 VolumeInfo internalVol = new VolumeInfo("private", in createStorageManagerMock()
65 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/); in createStorageManagerMock()
70 VolumeInfo adoptedVol = new VolumeInfo("adopted", in createStorageManagerMock()
71 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/); in createStorageManagerMock()
76 VolumeInfo publicVol = new VolumeInfo("public", in createStorageManagerMock()
77 VolumeInfo.TYPE_PUBLIC, null /*DiskInfo*/, null /*partGuid*/); in createStorageManagerMock()
82 List<VolumeInfo> volumes = new ArrayList<>(); in createStorageManagerMock()
/frameworks/base/services/core/java/com/android/server/storage/
DAppCollector.java32 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()
DFileCollector.java26 import android.os.storage.VolumeInfo;
198 VolumeInfo primaryVolume = pm.getPrimaryStorageCurrentVolume(); in getSystemSize()
201 VolumeInfo shared = sm.findEmulatedForPrivate(primaryVolume); in getSystemSize()
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/
DExternalStorageProvider.java34 import android.os.storage.VolumeInfo;
123 VolumeInfo primaryVolume = null; in updateVolumesLocked()
125 final List<VolumeInfo> volumes = mStorageManager.getVolumes(); in updateVolumesLocked()
126 for (VolumeInfo volume : volumes) { in updateVolumesLocked()
132 if (volume.getType() == VolumeInfo.TYPE_EMULATED) { in updateVolumesLocked()
138 if (VolumeInfo.ID_EMULATED_INTERNAL.equals(volume.getId())) { in updateVolumesLocked()
155 final VolumeInfo privateVol = mStorageManager.findPrivateForEmulated(volume); in updateVolumesLocked()
159 } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC in updateVolumesLocked()
196 if (!VolumeInfo.ID_EMULATED_INTERNAL.equals(volume.getId())) { in updateVolumesLocked()
210 if (volume.getType() == VolumeInfo.TYPE_PUBLIC) { in updateVolumesLocked()
/frameworks/base/core/java/android/app/
DApplicationPackageManager.java79 import android.os.storage.VolumeInfo;
1893 public int movePackage(String packageName, VolumeInfo vol) { in movePackage()
1896 if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { in movePackage()
1911 public @Nullable VolumeInfo getPackageCurrentVolume(ApplicationInfo app) { in getPackageCurrentVolume()
1917 protected @Nullable VolumeInfo getPackageCurrentVolume(ApplicationInfo app, in getPackageCurrentVolume()
1920 return storage.findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL); in getPackageCurrentVolume()
1929 public @NonNull List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app) { in getPackageCandidateVolumes()
1935 protected @NonNull List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app, in getPackageCandidateVolumes()
1937 final VolumeInfo currentVol = getPackageCurrentVolume(app, storageManager); in getPackageCandidateVolumes()
1938 final List<VolumeInfo> vols = storageManager.getVolumes(); in getPackageCandidateVolumes()
[all …]
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/
DBridgePackageManager.java58 import android.os.storage.VolumeInfo;
861 public int movePackage(String packageName, VolumeInfo vol) { in movePackage()
866 public VolumeInfo getPackageCurrentVolume(ApplicationInfo app) { in getPackageCurrentVolume()
871 public List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app) { in getPackageCandidateVolumes()
876 public int movePrimaryStorage(VolumeInfo vol) { in movePrimaryStorage()
881 public VolumeInfo getPrimaryStorageCurrentVolume() { in getPrimaryStorageCurrentVolume()
886 public List<VolumeInfo> getPrimaryStorageCandidateVolumes() { in getPrimaryStorageCandidateVolumes()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserDataPreparerTest.java23 import android.os.storage.VolumeInfo;
90 VolumeInfo testVolume = new VolumeInfo("testuuid", VolumeInfo.TYPE_PRIVATE, null, null); in setup()
/frameworks/base/services/usage/java/com/android/server/usage/
DStorageStatsService.java48 import android.os.storage.VolumeInfo;
119 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in StorageStatsService()
121 case VolumeInfo.TYPE_PRIVATE: in StorageStatsService()
122 case VolumeInfo.TYPE_EMULATED: in StorageStatsService()
123 if (newState == VolumeInfo.STATE_MOUNTED) { in StorageStatsService()
173 final VolumeInfo vol = mStorage.findVolumeByUuid(volumeUuid); in getTotalBytes()
/frameworks/base/test-runner/src/android/test/mock/
DMockPackageManager.java56 import android.os.storage.VolumeInfo;
695 public int movePackage(String packageName, VolumeInfo vol) { in movePackage()
701 public VolumeInfo getPackageCurrentVolume(ApplicationInfo app) { in getPackageCurrentVolume()
707 public List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app) { in getPackageCandidateVolumes()
713 public int movePrimaryStorage(VolumeInfo vol) { in movePrimaryStorage()
719 public VolumeInfo getPrimaryStorageCurrentVolume() { in getPrimaryStorageCurrentVolume()
725 public List<VolumeInfo> getPrimaryStorageCandidateVolumes() { in getPrimaryStorageCandidateVolumes()
/frameworks/base/packages/ExtServices/src/android/ext/services/storage/
DCacheQuotaServiceImpl.java23 import android.os.storage.VolumeInfo;
127 final VolumeInfo vol = storageManager.findVolumeByUuid(uuid); in getReservedCacheSize()

12