Home
last modified time | relevance | path

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

12

/frameworks/base/core/tests/coretests/src/android/app/
DApplicationPackageManagerTest.java19 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/
DVolumeInfo.java68 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 …]
DStorageManager.java328 mCallback.onVolumeStateChanged((VolumeInfo) args.arg1, args.argi2, args.argi3); in handleMessage()
367 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in onVolumeStateChanged()
738 public @Nullable VolumeInfo findVolumeById(String id) { in findVolumeById()
741 for (VolumeInfo vol : getVolumes()) { in findVolumeById()
751 public @Nullable VolumeInfo findVolumeByUuid(String fsUuid) { in findVolumeByUuid()
754 for (VolumeInfo vol : getVolumes()) { in findVolumeByUuid()
775 public @Nullable VolumeInfo findPrivateForEmulated(VolumeInfo emulatedVol) { in findPrivateForEmulated()
785 public @Nullable VolumeInfo findEmulatedForPrivate(VolumeInfo privateVol) { in findEmulatedForPrivate()
794 public @Nullable VolumeInfo findVolumeByQualifiedUuid(String volumeUuid) { in findVolumeByQualifiedUuid()
796 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.java46 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in onVolumeStateChanged()
/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/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()
156 || mVolume.getType() == VolumeInfo.TYPE_STUB) { in measureExactStorage()
204 if ((mVolume.getType() == VolumeInfo.TYPE_PRIVATE) && mVolume.isMountedReadable()) { in measureExactStorage()
/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;
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/
DStorageManagerService.java109 import android.os.storage.VolumeInfo;
331 private final ArrayMap<String, VolumeInfo> mVolumes = new ArrayMap<>();
359 private VolumeInfo findVolumeByIdOrThrow(String id) { in findVolumeByIdOrThrow()
361 final VolumeInfo vol = mVolumes.get(id); in findVolumeByIdOrThrow()
372 final VolumeInfo vol = mVolumes.valueAt(i); in findVolumeIdForPathOrThrow()
384 final VolumeInfo vol = mVolumes.valueAt(i); in findRecordForPath()
406 private @Nullable VolumeInfo findStorageForUuid(String volumeUuid) { in findStorageForUuid()
409 return storage.findVolumeById(VolumeInfo.ID_EMULATED_INTERNAL); in findStorageForUuid()
428 final VolumeInfo vol = mVolumes.valueAt(i); in shouldBenchmark()
645 final VolumeInfo vol = (VolumeInfo) msg.obj; in handleMessage()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DPackageHelperTests.java19 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/
DSm.java26 import android.os.storage.VolumeInfo;
125 filterType = VolumeInfo.TYPE_PUBLIC; in runListVolumes()
127 filterType = VolumeInfo.TYPE_PRIVATE; in runListVolumes()
129 filterType = VolumeInfo.TYPE_EMULATED; in runListVolumes()
131 filterType = VolumeInfo.TYPE_STUB; in runListVolumes()
136 final VolumeInfo[] vols = mSm.getVolumes(0); in runListVolumes()
137 for (VolumeInfo vol : vols) { in runListVolumes()
139 final String envState = VolumeInfo.getEnvironmentForState(vol.getState()); in runListVolumes()
/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.java35 import android.os.storage.VolumeInfo;
154 VolumeInfo primaryVolume = null; in updateVolumesLocked()
156 final List<VolumeInfo> volumes = mStorageManager.getVolumes(); in updateVolumesLocked()
157 for (VolumeInfo volume : volumes) { in updateVolumesLocked()
163 if (volume.getType() == VolumeInfo.TYPE_EMULATED) { in updateVolumesLocked()
169 if (VolumeInfo.ID_EMULATED_INTERNAL.equals(volume.getId())) { in updateVolumesLocked()
186 final VolumeInfo privateVol = mStorageManager.findPrivateForEmulated(volume); in updateVolumesLocked()
190 } else if ((volume.getType() == VolumeInfo.TYPE_PUBLIC in updateVolumesLocked()
191 || volume.getType() == VolumeInfo.TYPE_STUB) in updateVolumesLocked()
228 if (volume.getType() != VolumeInfo.TYPE_EMULATED) { in updateVolumesLocked()
[all …]
/frameworks/base/services/usage/java/com/android/server/usage/
DStorageStatsService.java49 import android.os.storage.VolumeInfo;
121 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in StorageStatsService()
123 case VolumeInfo.TYPE_PUBLIC: in StorageStatsService()
124 case VolumeInfo.TYPE_PRIVATE: in StorageStatsService()
125 case VolumeInfo.TYPE_EMULATED: in StorageStatsService()
126 if (newState == VolumeInfo.STATE_MOUNTED) { in StorageStatsService()
184 final VolumeInfo vol = mStorage.findVolumeByUuid(volumeUuid); in getTotalBytes()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserDataPreparerTest.java29 import android.os.storage.VolumeInfo;
91 VolumeInfo testVolume = new VolumeInfo("testuuid", VolumeInfo.TYPE_PRIVATE, null, null); in setup()
/frameworks/base/core/java/com/android/internal/content/
DPackageHelper.java19 import static android.os.storage.VolumeInfo.ID_PRIVATE_INTERNAL;
36 import android.os.storage.VolumeInfo;
184 VolumeInfo bestCandidate = null; in resolveInstallVolume()
186 for (VolumeInfo vol : storageManager.getVolumes()) { in resolveInstallVolume()
187 if (vol.type == VolumeInfo.TYPE_PRIVATE && vol.isMountedWritable()) { in resolveInstallVolume()
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/testutils/
DPackageManagerStub.java37 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/layoutlib/bridge/src/com/android/layoutlib/bridge/android/
DBridgePackageManager.java56 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/core/java/android/app/
DApplicationPackageManager.java84 import android.os.storage.VolumeInfo;
2098 public int movePackage(String packageName, VolumeInfo vol) { in movePackage()
2101 if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.id)) { in movePackage()
2117 public @Nullable VolumeInfo getPackageCurrentVolume(ApplicationInfo app) { in getPackageCurrentVolume()
2123 protected @Nullable VolumeInfo getPackageCurrentVolume(ApplicationInfo app, in getPackageCurrentVolume()
2126 return storage.findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL); in getPackageCurrentVolume()
2133 public @NonNull List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app) { in getPackageCandidateVolumes()
2139 protected @NonNull List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app, in getPackageCandidateVolumes()
2141 final VolumeInfo currentVol = getPackageCurrentVolume(app, storageManager); in getPackageCandidateVolumes()
2142 final List<VolumeInfo> vols = storageManager.getVolumes(); in getPackageCandidateVolumes()
[all …]

12