Home
last modified time | relevance | path

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

123

/frameworks/base/core/java/android/os/storage/
DVolumeInfo.java71 public class VolumeInfo implements Parcelable { class
111 private static final Comparator<VolumeInfo>
112 sDescriptionComparator = new Comparator<VolumeInfo>() {
114 public int compare(VolumeInfo lhs, VolumeInfo rhs) {
115 if (VolumeInfo.ID_PRIVATE_INTERNAL.equals(lhs.getId())) {
128 sStateToEnvironment.put(VolumeInfo.STATE_UNMOUNTED, Environment.MEDIA_UNMOUNTED); in sStateToEnvironment.put()
129 sStateToEnvironment.put(VolumeInfo.STATE_CHECKING, Environment.MEDIA_CHECKING); in sStateToEnvironment.put()
130 sStateToEnvironment.put(VolumeInfo.STATE_MOUNTED, Environment.MEDIA_MOUNTED); in sStateToEnvironment.put()
131 … sStateToEnvironment.put(VolumeInfo.STATE_MOUNTED_READ_ONLY, Environment.MEDIA_MOUNTED_READ_ONLY); in sStateToEnvironment.put()
132 sStateToEnvironment.put(VolumeInfo.STATE_FORMATTING, Environment.MEDIA_UNMOUNTED); in sStateToEnvironment.put()
[all …]
DIStorageEventListener.aidl20 import android.os.storage.VolumeInfo;
50 void onVolumeStateChanged(in VolumeInfo vol, int oldState, int newState) = 2; in onVolumeStateChanged()
/frameworks/base/services/tests/servicestests/src/com/android/server/audio/
DAudioDeviceVolumeManagerTest.java32 import android.media.VolumeInfo;
98 final VolumeInfo volMedia = new VolumeInfo.Builder(AudioManager.STREAM_MUSIC) in setDeviceVolume_checkIndex()
102 final VolumeInfo volMin = new VolumeInfo.Builder(volMedia).setVolumeIndex(minIndex).build(); in setDeviceVolume_checkIndex()
103 final VolumeInfo volMid = new VolumeInfo.Builder(volMedia).setVolumeIndex(midIndex).build(); in setDeviceVolume_checkIndex()
124 final VolumeInfo volMedia = new VolumeInfo.Builder(AudioManager.STREAM_MUSIC) in configurablePreScaleAbsoluteVolume_checkIndex()
144 final VolumeInfo volCur = new VolumeInfo.Builder(volMedia) in configurablePreScaleAbsoluteVolume_checkIndex()
157 final VolumeInfo volIndex4 = new VolumeInfo.Builder(volMedia) in configurablePreScaleAbsoluteVolume_checkIndex()
173 final VolumeInfo volMedia = new VolumeInfo.Builder(AudioManager.STREAM_MUSIC) in disablePreScaleAbsoluteVolume_checkIndex()
182 final VolumeInfo volCur = new VolumeInfo.Builder(volMedia) in disablePreScaleAbsoluteVolume_checkIndex()
195 final VolumeInfo volIndex4 = new VolumeInfo.Builder(volMedia) in disablePreScaleAbsoluteVolume_checkIndex()
DAbsoluteVolumeBehaviorTest.java40 import android.media.VolumeInfo;
116 List<VolumeInfo> volumes = Collections.singletonList( in registerDispatcher_setsVolumeBehaviorToAbsolute()
117 new VolumeInfo.Builder(AudioManager.STREAM_MUSIC).build()); in registerDispatcher_setsVolumeBehaviorToAbsolute()
134 List<VolumeInfo> volumes = Collections.singletonList( in registerDispatcherAfterSetDeviceVolumeBehavior_setsVolumeBehaviorToAbsolute()
135 new VolumeInfo.Builder(AudioManager.STREAM_MUSIC).build()); in registerDispatcherAfterSetDeviceVolumeBehavior_setsVolumeBehaviorToAbsolute()
152 List<VolumeInfo> volumes = Collections.singletonList( in registerDispatcher_setsVolume()
153 new VolumeInfo.Builder(AudioManager.STREAM_MUSIC) in registerDispatcher_setsVolume()
172 List<VolumeInfo> volumes = Collections.singletonList( in unregisterDispatcher_deviceBecomesVariableVolume_listenerNoLongerTriggered()
173 new VolumeInfo.Builder(AudioManager.STREAM_MUSIC).build()); in unregisterDispatcher_deviceBecomesVariableVolume_listenerNoLongerTriggered()
199 List<VolumeInfo> volumes = Collections.singletonList( in setDeviceVolumeBehavior_unregistersDispatcher()
[all …]
DVolumeHelperTest.java79 import android.media.VolumeInfo;
535 final VolumeInfo volMedia = new VolumeInfo.Builder(STREAM_MUSIC) in setDeviceVolume_checkIndex()
539 final VolumeInfo volMin = new VolumeInfo.Builder(volMedia).setVolumeIndex(minIndex).build(); in setDeviceVolume_checkIndex()
540 final VolumeInfo volMid = new VolumeInfo.Builder(volMedia).setVolumeIndex(midIndex).build(); in setDeviceVolume_checkIndex()
565 final VolumeInfo volMedia = new VolumeInfo.Builder(STREAM_MUSIC) in configurablePreScaleAbsoluteVolume_checkIndex()
585 final VolumeInfo volCur = new VolumeInfo.Builder(volMedia) in configurablePreScaleAbsoluteVolume_checkIndex()
601 final VolumeInfo volIndex4 = new VolumeInfo.Builder(volMedia) in configurablePreScaleAbsoluteVolume_checkIndex()
620 final VolumeInfo volMedia = new VolumeInfo.Builder(STREAM_MUSIC) in disablePreScaleAbsoluteVolume_checkIndex()
629 final VolumeInfo volCur = new VolumeInfo.Builder(volMedia) in disablePreScaleAbsoluteVolume_checkIndex()
642 final VolumeInfo volIndex4 = new VolumeInfo.Builder(volMedia) in disablePreScaleAbsoluteVolume_checkIndex()
/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/media/java/android/media/
DVolumeInfo.java43 public final class VolumeInfo implements Parcelable { class
56 private static VolumeInfo sDefaultVolumeInfo;
58 private VolumeInfo(boolean usesStreamType, boolean hasMuteCommand, boolean isMuted, in VolumeInfo() method in VolumeInfo
171 public static @NonNull VolumeInfo getDefaultVolumeInfo() { in getDefaultVolumeInfo()
182 return new VolumeInfo.Builder(AudioManager.STREAM_MUSIC).build(); in getDefaultVolumeInfo()
227 public Builder(@NonNull VolumeInfo info) { in Builder()
293 public @NonNull VolumeInfo build() { in build()
309 return new VolumeInfo(mUsesStreamType, mHasMuteCommand, mIsMuted, in build()
328 VolumeInfo that = (VolumeInfo) o; in equals()
369 private VolumeInfo(@NonNull Parcel in) { in VolumeInfo() method in VolumeInfo
[all …]
DAudioDeviceVolumeManager.java99 @NonNull VolumeInfo vol); in onAudioDeviceVolumeChanged()
110 @NonNull VolumeInfo vol, in onAudioDeviceVolumeAdjusted()
152 @NonNull List<VolumeInfo> volumes, boolean handlesVolumeAdjustment, in register()
166 @NonNull AudioDeviceAttributes device, @NonNull VolumeInfo vol) { in dispatchDeviceVolumeChanged()
181 @NonNull AudioDeviceAttributes device, @NonNull VolumeInfo vol, int direction, in dispatchDeviceVolumeAdjusted()
210 @NonNull VolumeInfo volume, in setDeviceAbsoluteVolumeBehavior()
214 final ArrayList<VolumeInfo> volumes = new ArrayList<>(1); in setDeviceAbsoluteVolumeBehavior()
236 @NonNull List<VolumeInfo> volumes, in setDeviceAbsoluteMultiVolumeBehavior()
261 @NonNull VolumeInfo volume, in setDeviceAbsoluteVolumeAdjustOnlyBehavior()
265 final ArrayList<VolumeInfo> volumes = new ArrayList<>(1); in setDeviceAbsoluteVolumeAdjustOnlyBehavior()
[all …]
DIAudioDeviceVolumeDispatcher.aidl20 import android.media.VolumeInfo;
29 void dispatchDeviceVolumeChanged(in AudioDeviceAttributes device, in VolumeInfo vol); in dispatchDeviceVolumeChanged()
30 void dispatchDeviceVolumeAdjusted(in AudioDeviceAttributes device, in VolumeInfo vol, in dispatchDeviceVolumeAdjusted()
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/
DStorageNotification.java37 import android.os.storage.VolumeInfo;
97 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) {
106 final VolumeInfo vol = mStorageManager.findVolumeByUuid(rec.getFsUuid());
204 final List<VolumeInfo> vols = mStorageManager.getVolumes(); in start()
205 for (VolumeInfo vol : vols) { in start()
223 if (rec.getType() != VolumeInfo.TYPE_PRIVATE) continue; in updateMissingPrivateVolumes()
226 final VolumeInfo info = mStorageManager.findVolumeByUuid(fsUuid); in updateMissingPrivateVolumes()
272 .setSmallIcon(getSmallIcon(disk, VolumeInfo.STATE_UNMOUNTABLE)) in onDiskScannedInternal()
304 private void onVolumeStateChangedInternal(VolumeInfo vol) { in onVolumeStateChangedInternal()
306 case VolumeInfo.TYPE_PRIVATE: in onVolumeStateChangedInternal()
[all …]
/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;
37 import android.os.storage.VolumeInfo;
68 private static final VolumeInfo sInternalVol = new VolumeInfo("private",
69 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/);
71 private static final VolumeInfo sAdoptedVol = new VolumeInfo("adopted",
72 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/);
74 private static final VolumeInfo sPublicVol = new VolumeInfo("public",
75 VolumeInfo.TYPE_PUBLIC, null /*DiskInfo*/, null /*partGuid*/);
77 private static final VolumeInfo sPrivateUnmountedVol = new VolumeInfo("private2",
[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()
/frameworks/base/services/core/java/com/android/server/storage/
DStorageSessionController.java41 import android.os.storage.VolumeInfo;
82 public int getConnectionUserIdForVolume(VolumeInfo vol) { in getConnectionUserIdForVolume()
111 public void onVolumeMount(ParcelFileDescriptor deviceFd, VolumeInfo vol) in onVolumeMount()
147 public void notifyVolumeStateChanged(VolumeInfo vol) throws ExternalStorageServiceException { in notifyVolumeStateChanged()
217 public StorageUserConnection onVolumeRemove(VolumeInfo vol) { in onVolumeRemove()
249 public void onVolumeUnmount(VolumeInfo vol) { in onVolumeUnmount()
460 public static boolean isEmulatedOrPublic(VolumeInfo vol) { in isEmulatedOrPublic()
461 return vol.type == VolumeInfo.TYPE_EMULATED in isEmulatedOrPublic()
462 || (vol.type == VolumeInfo.TYPE_PUBLIC && vol.isVisible()); in isEmulatedOrPublic()
480 private static boolean isSupportedVolume(VolumeInfo vol) { in isSupportedVolume()
[all …]
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()
/frameworks/base/services/core/java/com/android/server/
DStorageManagerService.java119 import android.os.storage.VolumeInfo;
447 private final ArrayMap<String, VolumeInfo> mVolumes = new ArrayMap<>();
498 private VolumeInfo findVolumeByIdOrThrow(String id) { in findVolumeByIdOrThrow()
500 final VolumeInfo vol = mVolumes.get(id); in findVolumeByIdOrThrow()
511 final VolumeInfo vol = mVolumes.valueAt(i); in findRecordForPath()
533 private @Nullable VolumeInfo findStorageForUuidAsUser(String volumeUuid, in findStorageForUuidAsUser()
537 return storage.findVolumeById(VolumeInfo.ID_EMULATED_INTERNAL + ";" + userId); in findStorageForUuidAsUser()
541 VolumeInfo info = storage.findVolumeByUuid(volumeUuid); in findStorageForUuidAsUser()
759 final VolumeInfo vol = (VolumeInfo) msg.obj; in handleMessage()
769 final VolumeInfo vol = (VolumeInfo) msg.obj; in handleMessage()
[all …]
/frameworks/base/services/core/java/com/android/server/hdmi/
DAudioDeviceVolumeManagerWrapper.java26 import android.media.VolumeInfo;
60 @NonNull VolumeInfo volume, in setDeviceAbsoluteVolumeBehavior()
71 @NonNull VolumeInfo volume, in setDeviceAbsoluteVolumeAdjustOnlyBehavior()
DDefaultAudioDeviceVolumeManagerWrapper.java24 import android.media.VolumeInfo;
63 @NonNull VolumeInfo volume, in setDeviceAbsoluteVolumeBehavior()
74 @NonNull VolumeInfo volume, in setDeviceAbsoluteVolumeAdjustOnlyBehavior()
/frameworks/base/core/tests/coretests/src/android/content/pm/
DInstallLocationUtilsTests.java19 import static android.os.storage.VolumeInfo.STATE_MOUNTED;
23 import android.os.storage.VolumeInfo;
58 VolumeInfo internalVol = new VolumeInfo("private", in createStorageManagerMock()
59 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/); in createStorageManagerMock()
64 VolumeInfo adoptedVol = new VolumeInfo("adopted", in createStorageManagerMock()
65 VolumeInfo.TYPE_PRIVATE, null /*DiskInfo*/, null /*partGuid*/); in createStorageManagerMock()
70 VolumeInfo publicVol = new VolumeInfo("public", in createStorageManagerMock()
71 VolumeInfo.TYPE_PUBLIC, null /*DiskInfo*/, null /*partGuid*/); in createStorageManagerMock()
76 List<VolumeInfo> volumes = new ArrayList<>(); in createStorageManagerMock()
/frameworks/base/cmds/sm/src/com/android/commands/sm/
DSm.java27 import android.os.storage.VolumeInfo;
130 filterType = VolumeInfo.TYPE_PUBLIC; in runListVolumes()
132 filterType = VolumeInfo.TYPE_PRIVATE; in runListVolumes()
134 filterType = VolumeInfo.TYPE_EMULATED; in runListVolumes()
136 filterType = VolumeInfo.TYPE_STUB; in runListVolumes()
141 final VolumeInfo[] vols = mSm.getVolumes(0); in runListVolumes()
142 for (VolumeInfo vol : vols) { in runListVolumes()
144 final String envState = VolumeInfo.getEnvironmentForState(vol.getState()); in runListVolumes()
/frameworks/base/services/core/java/com/android/server/pm/
DStorageEventHelper.java42 import android.os.storage.VolumeInfo;
81 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in onVolumeStateChanged()
82 if (vol.type == VolumeInfo.TYPE_PRIVATE) { in onVolumeStateChanged()
83 if (vol.state == VolumeInfo.STATE_MOUNTED) { in onVolumeStateChanged()
97 } else if (vol.state == VolumeInfo.STATE_EJECTING) { in onVolumeStateChanged()
132 private void loadPrivatePackages(final VolumeInfo vol) { in loadPrivatePackages()
136 private void loadPrivatePackagesInner(VolumeInfo vol) { in loadPrivatePackagesInner()
237 private void unloadPrivatePackages(final VolumeInfo vol) { in unloadPrivatePackages()
241 private void unloadPrivatePackagesInner(VolumeInfo vol) { in unloadPrivatePackagesInner()
/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/
DBaseTvToAudioSystemAvbTest.java36 import android.media.VolumeInfo;
108 eq(new VolumeInfo.Builder(AudioManager.STREAM_MUSIC) in savlNotSupported_systemAudioDeviceSendsReportAudioStatus_adjustOnlyAvbEnabled()
131 eq(new VolumeInfo.Builder(AudioManager.STREAM_MUSIC) in avbEnabled_savlNotSupported_receiveReportAudioStatus_switchToAdjustOnlyAvb()
156 eq(new VolumeInfo.Builder(AudioManager.STREAM_MUSIC) in avbEnabled_savlFeatureAborted_receiveReportAudioStatus_switchToAdjustOnlyAvb()
217 new VolumeInfo.Builder(AudioManager.STREAM_MUSIC) in adjustOnlyAvbEnabled_audioDeviceVolumeAdjusted_sendsUcpAndGiveAudioStatus()
245 new VolumeInfo.Builder(AudioManager.STREAM_MUSIC) in adjustOnlyAvbEnabled_audioDeviceVolumeChanged_requestsAndUpdatesAudioStatus()
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/
DExternalStorageProvider.java39 import android.os.storage.VolumeInfo;
147 public void onVolumeStateChanged(VolumeInfo vol, int oldState, int newState) { in onCreate()
188 final List<VolumeInfo> volumes = mStorageManager.getVolumes(); in updateVolumesLocked()
189 for (VolumeInfo volume : volumes) { in updateVolumesLocked()
195 if (volume.getType() == VolumeInfo.TYPE_EMULATED) { in updateVolumesLocked()
218 final VolumeInfo privateVol = mStorageManager.findPrivateForEmulated(volume); in updateVolumesLocked()
222 } else if (volume.getType() == VolumeInfo.TYPE_PUBLIC in updateVolumesLocked()
223 || volume.getType() == VolumeInfo.TYPE_STUB) { in updateVolumesLocked()
259 if (volume.getType() != VolumeInfo.TYPE_EMULATED in updateVolumesLocked()
260 && volume.getType() != VolumeInfo.TYPE_STUB) { in updateVolumesLocked()
[all …]

123