Home
last modified time | relevance | path

Searched refs:mStorageManager (Results 1 – 25 of 51) sorted by relevance

123

/aosp12/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/storage/
H A DStorageUtilsTest.java41 private StorageManager mStorageManager; field in StorageUtilsTest
53 when(mStorageManager.findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL)).thenReturn(volumeInfo); in maybeInitializeVolume_mounted_shouldReturnVolumeInfo()
55 VolumeInfo expected = StorageUtils.maybeInitializeVolume(mStorageManager, null); in maybeInitializeVolume_mounted_shouldReturnVolumeInfo()
64 when(mStorageManager.findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL)).thenReturn(volumeInfo); in maybeInitializeVolume_notMounted_shouldNotReturnVolumeInfo()
66 VolumeInfo expected = StorageUtils.maybeInitializeVolume(mStorageManager, null); in maybeInitializeVolume_notMounted_shouldNotReturnVolumeInfo()
75 when(mStorageManager.findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL)).thenReturn(volumeInfo); in maybeInitializeVolume_differentType_shouldNotReturnVolumeInfo()
77 VolumeInfo expected = StorageUtils.maybeInitializeVolume(mStorageManager, null); in maybeInitializeVolume_differentType_shouldNotReturnVolumeInfo()
88 VolumeInfo expected = StorageUtils.maybeInitializeVolume(mStorageManager, bundle); in maybeInitializeVolume_defaultId_notMounted_returnsNull()
100 VolumeInfo expected = StorageUtils.maybeInitializeVolume(mStorageManager, bundle); in maybeInitializeVolume_getDefaultIdFromBundle_mounted_shouldReturnVolumeInfo()
111 when(mStorageManager.findVolumeById(VolumeInfo.ID_EMULATED_INTERNAL)).thenReturn( in maybeInitializeVolume_getIdFromBundle_shouldReturnVolumeInfo()
[all …]
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/development/
H A DFileEncryptionPreferenceControllerTest.java53 private IStorageManager mStorageManager; field in FileEncryptionPreferenceControllerTest
76 ReflectionHelpers.setField(mController, "mStorageManager", mStorageManager); in isAvailable_notConvertibleToFBE_shouldBeFalse()
77 when(mStorageManager.isConvertibleToFBE()).thenReturn(false); in isAvailable_notConvertibleToFBE_shouldBeFalse()
84 ReflectionHelpers.setField(mController, "mStorageManager", mStorageManager); in isAvailable_convertibleToFBE_shouldBeTrue()
85 when(mStorageManager.isConvertibleToFBE()).thenReturn(true); in isAvailable_convertibleToFBE_shouldBeTrue()
92 ReflectionHelpers.setField(mController, "mStorageManager", mStorageManager); in updateState_settingIsNotFile_shouldDoNothing()
93 when(mStorageManager.isConvertibleToFBE()).thenReturn(true); in updateState_settingIsNotFile_shouldDoNothing()
106 ReflectionHelpers.setField(mController, "mStorageManager", mStorageManager); in updateState_settingIsFile_shouldSetSummaryAndDisablePreference()
107 when(mStorageManager.isConvertibleToFBE()).thenReturn(true); in updateState_settingIsFile_shouldSetSummaryAndDisablePreference()
/aosp12/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer/buffer/
H A DBufferManager.java69 private final StorageManager mStorageManager; field in BufferManager
355 mStorageManager = storageManager; in BufferManager()
414 mStorageManager.updateIndexFile( in createNewWriteFileIfNeeded()
446 mStorageManager.getBufferDir(), in loadTrackFromStorage()
506 || !mStorageManager.hasEnoughBuffer(pendingDelete)) { in maybeEvictChunk()
507 if (mStorageManager.isPersistent()) { in maybeEvictChunk()
572 trackFormatList.addAll(mStorageManager.readTrackInfoFiles(true)); in readTrackInfoFiles()
592 mStorageManager.writeTrackInfoFiles(audios, true); in writeMetaFiles()
603 mStorageManager.writeTrackInfoFiles(videos, false); in writeMetaFiles()
628 mStorageManager.writeTrackInfoFiles(audios, true); in writeMetaFilesOnly()
[all …]
/aosp12/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer2/buffer/
H A DBufferManager.java70 private final StorageManager mStorageManager; field in BufferManager
358 mStorageManager = storageManager; in BufferManager()
417 mStorageManager.updateIndexFile( in createNewWriteFileIfNeeded()
450 mStorageManager.getBufferDir(), in loadTrackFromStorage()
510 || !mStorageManager.hasEnoughBuffer(pendingDelete)) { in maybeEvictChunk()
511 if (mStorageManager.isPersistent()) { in maybeEvictChunk()
576 trackFormatList.addAll(mStorageManager.readTrackInfoFiles(true)); in readTrackInfoFiles()
596 mStorageManager.writeTrackInfoFiles(audios, true); in writeMetaFiles()
607 mStorageManager.writeTrackInfoFiles(videos, false); in writeMetaFiles()
632 mStorageManager.writeTrackInfoFiles(audios, true); in writeMetaFilesOnly()
[all …]
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/deviceinfo/
H A DStorageManagerVolumeProvider.java31 private StorageManager mStorageManager; field in StorageManagerVolumeProvider
34 mStorageManager = sm; in StorageManagerVolumeProvider()
39 return mStorageManager.getPrimaryStorageSize(); in getPrimaryStorageSize()
44 return mStorageManager.getVolumes(); in getVolumes()
49 return mStorageManager.findEmulatedForPrivate(privateVolume); in findEmulatedForPrivate()
/aosp12/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/storage/
H A DMissingStorageFragment.java38 private StorageManager mStorageManager; field in MissingStorageFragment
47 mStorageManager = getContext().getSystemService(StorageManager.class); in onCreate()
48 mStorageManager.registerListener(new StorageEventListener()); in onCreate()
55 if (mStorageManager.findRecordByUuid(mFsUuid) == null) { in onResume()
67 final VolumeRecord record = mStorageManager.findRecordByUuid(mFsUuid); in onCreatePreferences()
86 if (mStorageManager.findRecordByUuid(fsUuid) == null) { in onVolumeForgotten()
H A DDiskReceiver.java45 private StorageManager mStorageManager; field in DiskReceiver
65 mStorageManager = context.getSystemService(StorageManager.class); in onReceive()
85 final List<VolumeInfo> volumeInfos = mStorageManager.getVolumes(); in handleMount()
108 volumeRecord = mStorageManager.findRecordByUuid(fsUuid); in handleUnmount()
126 final List<DiskInfo> diskInfos = mStorageManager.getDisks(); in handleSetupComplete()
145 final List<VolumeInfo> volumeInfos = mStorageManager.getVolumes(); in handleSetupComplete()
152 final VolumeRecord record = mStorageManager.findRecordByUuid(uuid); in handleSetupComplete()
H A DStorageFragment.java61 private StorageManager mStorageManager; field in StorageFragment
88 mStorageManager = getContext().getSystemService(StorageManager.class); in onCreate()
91 mVolumeInfo = mStorageManager.findVolumeById( in onCreate()
100 mStorageManager.registerListener(mStorageEventListener); in onStart()
107 mVolumeInfo = mStorageManager.findVolumeById( in onResume()
119 mStorageManager.unregisterListener(mStorageEventListener); in onStop()
128 screen.setTitle(mStorageManager.getBestVolumeDescription(mVolumeInfo)); in onCreatePreferences()
177 final String description = mStorageManager.getBestVolumeDescription(mVolumeInfo); in refresh()
208 final VolumeInfo sharedVolume = mStorageManager.findEmulatedForPrivate(mVolumeInfo); in startMeasurement()
H A DFormatActivity.java72 private StorageManager mStorageManager; field in FormatActivity
93 mStorageManager = getSystemService(StorageManager.class); in onCreate()
142 final List<VolumeInfo> vols = mStorageManager.getVolumes(); in findVolume()
246 final List<VolumeInfo> volumes = mStorageManager.getVolumes(); in onRequestFormatAsPrivate()
251 mFormatDiskDesc = mStorageManager.getBestVolumeDescription(volume); in onRequestFormatAsPrivate()
255 final DiskInfo info = mStorageManager.findDiskById(diskId); in onRequestFormatAsPrivate()
290 final VolumeInfo info = mStorageManager.findVolumeById(volumeId); in onRequestFormatAsPublic()
292 mFormatDiskDesc = mStorageManager.getBestVolumeDescription(info); in onRequestFormatAsPublic()
296 final DiskInfo info = mStorageManager.findDiskById(diskId); in onRequestFormatAsPublic()
/aosp12/packages/apps/Settings/src/com/android/settings/deviceinfo/
H A DPublicVolumeSettings.java56 private StorageManager mStorageManager; field in PublicVolumeSettings
90 mStorageManager = context.getSystemService(StorageManager.class); in onCreate()
96 mVolume = mStorageManager.findVolumeByUuid(fsUuid); in onCreate()
100 mVolume = mStorageManager.findVolumeById(volId); in onCreate()
109 mDisk = mStorageManager.findDiskById(mVolume.getDiskId()); in onCreate()
150 getActivity().setTitle(mStorageManager.getBestVolumeDescription(mVolume)); in update()
202 mVolume = mStorageManager.findVolumeById(mVolumeId); in onResume()
208 mStorageManager.registerListener(mStorageListener); in onResume()
215 mStorageManager.unregisterListener(mStorageListener); in onPause()
250 mVolume = mStorageManager.findVolumeById(mVolumeId);
H A DTopLevelStoragePreferenceController.java37 private final StorageManager mStorageManager; field in TopLevelStoragePreferenceController
42 mStorageManager = mContext.getSystemService(StorageManager.class); in TopLevelStoragePreferenceController()
43 mStorageManagerVolumeProvider = new StorageManagerVolumeProvider(mStorageManager); in TopLevelStoragePreferenceController()
H A DStorageDashboardFragment.java98 private StorageManager mStorageManager; field in StorageDashboardFragment
159 if (StorageUtils.isVolumeRecordMissed(mStorageManager, volumeRecord)) {
172 mStorageManager.findVolumeByUuid(volumeRecord.getFsUuid());
267 mStorageManager = activity.getSystemService(StorageManager.class); in onCreate()
271 Utils.maybeInitializeVolume(mStorageManager, getArguments()); in onCreate()
337 mStorageEntries.addAll(StorageUtils.getAllStorageEntries(getContext(), mStorageManager)); in onResume() local
339 mStorageManager.registerListener(mStorageEventListener); in onResume()
345 mStorageManager.unregisterListener(mStorageEventListener); in onPause()
585 new StorageManagerVolumeProvider(mStorageManager); in onCreateLoader()
/aosp12/frameworks/base/core/java/android/os/storage/
H A DStorageManager.java318 private final IStorageManager mStorageManager; field in StorageManager
784 return mStorageManager.isObbMounted(rawPath); in isObbMounted()
1037 mStorageManager.mount(volId); in mount()
1047 mStorageManager.unmount(volId); in unmount()
1057 mStorageManager.format(volId); in format()
1089 mStorageManager.benchmark(volId, listener); in benchmark()
1099 mStorageManager.partitionPublic(diskId); in partitionPublic()
1108 mStorageManager.partitionPrivate(diskId); in partitionPrivate()
1179 mStorageManager.forgetVolume(fsUuid); in forgetVolume()
1524 mStorageManager.destroyUserKey(userId); in destroyUserKey()
[all …]
/aosp12/packages/apps/Car/SystemUpdater/src/com/android/car/systemupdater/
H A DDeviceListFragment.java59 private StorageManager mStorageManager; field in DeviceListFragment
88 mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE); in onCreate()
89 if (mStorageManager == null) { in onCreate()
119 if (mStorageManager != null) { in onResume()
120 mStorageManager.registerListener(mListener); in onResume()
127 if (mStorageManager != null) { in onPause()
128 mStorageManager.unregisterListener(mListener); in onPause()
134 if (mStorageManager == null) { in showMountedVolumes()
137 final List<VolumeInfo> vols = mStorageManager.getVolumes(); in showMountedVolumes()
/aosp12/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/storagelifetime/
H A DStorageLifetimeFragment.java68 private CarStorageMonitoringManager mStorageManager; field in StorageLifetimeFragment
89 final List<IoStatsEntry> totals = mStorageManager.getAggregateIoStats();
186 mStorageManager = in reloadInfo()
190 mStorageWearInfo.setText("Wear estimate: " + mStorageManager.getWearEstimate() in reloadInfo()
192 + preEolToString(mStorageManager.getPreEolIndicatorStatus())); in reloadInfo()
196 mStorageManager.getWearEstimateHistory().toArray())); in reloadInfo()
206 mStorageManager.registerListener(mIoListener); in registerListener()
210 mStorageManager.unregisterListener(mIoListener); in unregisterListener()
/aosp12/packages/apps/Settings/src/com/android/settings/deviceinfo/storage/
H A DStorageUtils.java131 private final StorageManager mStorageManager; field in StorageUtils.UnmountTask
137 mStorageManager = mContext.getSystemService(StorageManager.class); in UnmountTask()
139 mDescription = mStorageManager.getBestVolumeDescription(volume); in UnmountTask()
145 mStorageManager.unmount(mVolumeId); in doInBackground()
168 private final StorageManager mStorageManager; field in StorageUtils.MountTask
174 mStorageManager = mContext.getSystemService(StorageManager.class); in MountTask()
176 mDescription = mStorageManager.getBestVolumeDescription(volume); in MountTask()
182 mStorageManager.mount(mVolumeId); in doInBackground()
/aosp12/packages/apps/Settings/src/com/android/settings/dashboard/profileselector/
H A DProfileSelectStorageFragment.java65 private StorageManager mStorageManager; field in ProfileSelectStorageFragment
120 if (StorageUtils.isVolumeRecordMissed(mStorageManager, volumeRecord)) {
133 mStorageManager.findVolumeByUuid(volumeRecord.getFsUuid());
236 mStorageManager = activity.getSystemService(StorageManager.class); in onCreate()
240 Utils.maybeInitializeVolume(mStorageManager, getArguments()); in onCreate()
285 mStorageEntries.addAll(StorageUtils.getAllStorageEntries(getContext(), mStorageManager)); in onResume() local
287 mStorageManager.registerListener(mStorageEventListener); in onResume()
293 mStorageManager.unregisterListener(mStorageEventListener); in onPause()
/aosp12/packages/apps/Settings/src/com/android/settings/development/
H A DFileEncryptionPreferenceController.java38 private final IStorageManager mStorageManager; field in FileEncryptionPreferenceController
43 mStorageManager = getStorageManager(); in FileEncryptionPreferenceController()
48 if (mStorageManager == null) { in isAvailable()
53 return mStorageManager.isConvertibleToFBE(); in isAvailable()
/aosp12/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/
H A DStorageSummaryFragment.java64 private StorageManager mStorageManager; field in StorageSummaryFragment
82 mStorageManager = getContext().getSystemService(StorageManager.class); in onCreate()
108 mStorageManager.registerListener(mStorageEventListener); in onStart()
128 mStorageManager.unregisterListener(mStorageEventListener); in onStop()
137 final List<VolumeInfo> volumes = mStorageManager.getVolumes(); in refresh()
155 final List<VolumeRecord> volumeRecords = mStorageManager.getVolumeRecords(); in refresh()
160 && mStorageManager.findVolumeByUuid(record.getFsUuid()) == null) { in refresh()
166 final List<DiskInfo> disks = mStorageManager.getDisks(); in refresh()
188 volPreference.refresh(themedContext, mStorageManager, volumeInfo); in refresh()
228 volPreference.refresh(themedContext, mStorageManager, volumeInfo); in refresh()
/aosp12/packages/apps/Car/Settings/src/com/android/car/settings/storage/
H A DUnmountTask.java36 private final StorageManager mStorageManager; field in UnmountTask
42 mStorageManager = mContext.getSystemService(StorageManager.class); in UnmountTask()
44 mDescription = mStorageManager.getBestVolumeDescription(volume); in UnmountTask()
50 mStorageManager.unmount(mVolumeId); in doInBackground()
/aosp12/packages/apps/Settings/tests/unit/src/com/android/settings/deviceinfo/storage/
H A DStorageSelectionPreferenceControllerTest.java48 private StorageManager mStorageManager; field in StorageSelectionPreferenceControllerTest
57 mStorageManager = mContext.getSystemService(StorageManager.class); in setUp()
71 final List<StorageEntry> storageEntries = mStorageManager.getVolumes().stream() in setStorageEntries_fromStorageManager_correctAdapterItems()
89 mController.setStorageEntries(mStorageManager.getVolumes().stream() in setSelectedStorageEntry_primaryStorage_correctSelectedAdapterItem()
/aosp12/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/
H A DAppStoragePreference.java33 private final StorageManager mStorageManager; field in AppStoragePreference
38 mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE); in AppStoragePreference()
55 final String volumeDesc = mStorageManager.getBestVolumeDescription(volumeInfo); in refresh()
/aosp12/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/storagevolumes/
H A DStorageVolumesFragment.java48 private StorageManager mStorageManager; field in StorageVolumesFragment
52 mStorageManager = Objects.requireNonNull(getContext()) in onCreate()
85 final List<VolumeInfo> volumes = mStorageManager.getVolumes(); in refresh()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
H A DMockLockSettingsContext.java41 private StorageManager mStorageManager; field in MockLockSettingsContext
57 mStorageManager = storageManager; in MockLockSettingsContext()
74 return mStorageManager; in getSystemService()
/aosp12/frameworks/base/services/tests/mockingservicestests/src/com/android/server/pm/
H A DStagingManagerTest.java74 @Mock private IStorageManager mStorageManager; field in StagingManagerTest
93 when(mStorageManager.supportsCheckpoint()).thenReturn(true); in setUp()
94 when(mStorageManager.needsCheckpoint()).thenReturn(true); in setUp()
95 when(PackageHelper.getStorageManager()).thenReturn(mStorageManager); in setUp()
182 when(mStorageManager.supportsCheckpoint()).thenReturn(false); in restoreSessions_multipleSessions_deviceWithoutFsCheckpointSupport_throwISE()
253 verify(mStorageManager, never()).abortChanges(eq("abort-staged-install"), eq(false)); in restoreSessions_unknownApexSession_failsAllSessions()
309 verify(mStorageManager, never()).abortChanges(eq("abort-staged-install"), eq(false)); in restoreSessions_failedApexSessions_failsAllSessions()
357 verify(mStorageManager, never()).abortChanges(eq("abort-staged-install"), eq(false)); in restoreSessions_stagedApexSession_failsAllSessions()
423 verify(mStorageManager, times(1)).abortChanges(eq("abort-staged-install"), eq(false)); in restoreSessions_failedAndActivatedApexSessions_abortsCheckpoint()
451 verify(mStorageManager, never()).abortChanges(eq("abort-staged-install"), eq(false)); in restoreSessions_apexSessionInImpossibleState_failsAllSessions()

123