Home
last modified time | relevance | path

Searched refs:volumeInfo (Results 1 – 19 of 19) sorted by relevance

/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/storage/
DStorageUtilsTest.java51 VolumeInfo volumeInfo = new VolumeInfo("id", VolumeInfo.TYPE_PRIVATE, null, "id"); in maybeInitializeVolume_mounted_shouldReturnVolumeInfo() local
52 volumeInfo.state = STATE_MOUNTED; in maybeInitializeVolume_mounted_shouldReturnVolumeInfo()
54 when(mStorageManager.findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL)).thenReturn(volumeInfo); in maybeInitializeVolume_mounted_shouldReturnVolumeInfo()
58 assertThat(expected).isEqualTo(volumeInfo); in maybeInitializeVolume_mounted_shouldReturnVolumeInfo()
63 VolumeInfo volumeInfo = new VolumeInfo("id", VolumeInfo.TYPE_PRIVATE, null, "id"); in maybeInitializeVolume_notMounted_shouldNotReturnVolumeInfo() local
65 when(mStorageManager.findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL)).thenReturn(volumeInfo); in maybeInitializeVolume_notMounted_shouldNotReturnVolumeInfo()
74 VolumeInfo volumeInfo = new VolumeInfo("id", VolumeInfo.TYPE_EMULATED, null, "id"); in maybeInitializeVolume_differentType_shouldNotReturnVolumeInfo() local
76 when(mStorageManager.findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL)).thenReturn(volumeInfo); in maybeInitializeVolume_differentType_shouldNotReturnVolumeInfo()
85 VolumeInfo volumeInfo = new VolumeInfo("id", VolumeInfo.TYPE_EMULATED, null, "id"); in maybeInitializeVolume_defaultId_notMounted_returnsNull() local
87 when(mStorageManager.findVolumeById(VolumeInfo.ID_PRIVATE_INTERNAL)).thenReturn(volumeInfo); in maybeInitializeVolume_defaultId_notMounted_returnsNull()
[all …]
DStorageFileCategoryPreferenceControllerTest.java95 VolumeInfo volumeInfo = new VolumeInfo("id", VolumeInfo.TYPE_EMULATED, null, "id"); in handlePreferenceClicked_currentUserAndNoActivityToHandleIntent_doesNotThrow() local
96 volumeInfo.mountFlags = MOUNT_FLAG_PRIMARY; in handlePreferenceClicked_currentUserAndNoActivityToHandleIntent_doesNotThrow()
97 ShadowStorageManagerVolumeProvider.setVolumeInfo(volumeInfo); in handlePreferenceClicked_currentUserAndNoActivityToHandleIntent_doesNotThrow()
107 VolumeInfo volumeInfo = new VolumeInfo("id", VolumeInfo.TYPE_EMULATED, null, "id"); in handlePreferenceClicked_currentUserAndActivityToHandleIntent_startsNewActivity() local
108 volumeInfo.mountFlags = MOUNT_FLAG_PRIMARY; in handlePreferenceClicked_currentUserAndActivityToHandleIntent_startsNewActivity()
109 Intent browseIntent = volumeInfo.buildBrowseIntent(); in handlePreferenceClicked_currentUserAndActivityToHandleIntent_startsNewActivity()
110 ShadowStorageManagerVolumeProvider.setVolumeInfo(volumeInfo); in handlePreferenceClicked_currentUserAndActivityToHandleIntent_startsNewActivity()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/
DStorageSummaryFragment.java161 for (final VolumeInfo volumeInfo : privateVolumes) { in refresh()
162 final String key = StorageSummaryFragment.VolPreference.makeKey(volumeInfo); in refresh()
167 volPreference = new StorageSummaryFragment.VolPreference(themedContext, volumeInfo); in refresh()
169 volPreference.refresh(themedContext, mStorageManager, volumeInfo); in refresh()
201 for (final VolumeInfo volumeInfo : publicVolumes) { in refresh()
202 final String key = StorageSummaryFragment.VolPreference.makeKey(volumeInfo); in refresh()
207 volPreference = new StorageSummaryFragment.VolPreference(themedContext, volumeInfo); in refresh()
209 volPreference.refresh(themedContext, mStorageManager, volumeInfo); in refresh()
235 VolPreference(Context context, VolumeInfo volumeInfo) { in VolPreference() argument
237 setKey(makeKey(volumeInfo)); in VolPreference()
[all …]
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/storage/
DSettingsStorageServiceTest.java70 final VolumeInfo volumeInfo = mock(VolumeInfo.class); in testFormatAsPublic_success_fromPrivate() local
71 doReturn("asdf").when(volumeInfo).getDiskId(); in testFormatAsPublic_success_fromPrivate()
72 doReturn(VolumeInfo.TYPE_PRIVATE).when(volumeInfo).getType(); in testFormatAsPublic_success_fromPrivate()
73 doReturn("jkl;").when(volumeInfo).getFsUuid(); in testFormatAsPublic_success_fromPrivate()
76 volumeInfos.add(volumeInfo); in testFormatAsPublic_success_fromPrivate()
100 final VolumeInfo volumeInfo = mock(VolumeInfo.class); in testFormatAsPublic_success_fromNonPrivate() local
101 doReturn("asdf").when(volumeInfo).getDiskId(); in testFormatAsPublic_success_fromNonPrivate()
102 doReturn(VolumeInfo.TYPE_PUBLIC).when(volumeInfo).getType(); in testFormatAsPublic_success_fromNonPrivate()
103 doReturn("jkl;").when(volumeInfo).getFsUuid(); in testFormatAsPublic_success_fromNonPrivate()
106 volumeInfos.add(volumeInfo); in testFormatAsPublic_success_fromNonPrivate()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/
DStorageSettingsTest.java62 VolumeInfo volumeInfo = mock(VolumeInfo.class, RETURNS_DEEP_STUBS); in handlePublicVolumeClick_startsANonNullActivityWhenVolumeHasNoBrowse() local
63 when(volumeInfo.isMountedReadable()).thenReturn(true); in handlePublicVolumeClick_startsANonNullActivityWhenVolumeHasNoBrowse()
64 StorageSettings.handlePublicVolumeClick(mActivity, volumeInfo); in handlePublicVolumeClick_startsANonNullActivityWhenVolumeHasNoBrowse()
72 VolumeInfo volumeInfo = mock(VolumeInfo.class, RETURNS_DEEP_STUBS); in handleStubVolumeClick_startsANonNullActivityWhenVolumeHasNoBrowse() local
73 when(volumeInfo.isMountedReadable()).thenReturn(true); in handleStubVolumeClick_startsANonNullActivityWhenVolumeHasNoBrowse()
75 StorageSettings.handleStubVolumeClick(mActivity, volumeInfo); in handleStubVolumeClick_startsANonNullActivityWhenVolumeHasNoBrowse()
DTopLevelStoragePreferenceControllerTest.java71 final VolumeInfo volumeInfo = mVolumes.get(0); in updateSummary_shouldDisplayUsedPercentAndFreeSpace() local
72 when(volumeInfo.isMountedReadable()).thenReturn(true); in updateSummary_shouldDisplayUsedPercentAndFreeSpace()
73 when(volumeInfo.getType()).thenReturn(VolumeInfo.TYPE_PRIVATE); in updateSummary_shouldDisplayUsedPercentAndFreeSpace()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/storage/
DUnmountActivity.java76 final VolumeInfo volumeInfo = storageManager.findVolumeById(mUnmountVolumeId); in onCreate() local
78 if (volumeInfo == null) { in onCreate()
84 if (volumeInfo.getType() == VolumeInfo.TYPE_PRIVATE) { in onCreate()
120 final VolumeInfo volumeInfo = in onResume() local
123 if (volumeInfo == null) { in onResume()
DMigrateStorageActivity.java140 private void onChoose(VolumeInfo volumeInfo) { in onChoose() argument
141 mTargetVolumeInfo = volumeInfo; in onChoose()
287 final VolumeInfo volumeInfo = mCandidateVolumes.get((int) action.getId()); in onGuidedActionClicked() local
288 ((MigrateStorageActivity)getActivity()).onChoose(volumeInfo); in onGuidedActionClicked()
DSettingsStorageService.java188 final VolumeInfo volumeInfo = storageManager.findVolumeById(volumeId); in unmount() local
189 if (volumeInfo != null && volumeInfo.isMountedReadable()) { in unmount()
DBackupAppsStepFragment.java124 final VolumeInfo volumeInfo = mStorageManager.findVolumeById(mVolumeId); in onCreateGuidance() local
125 final String volumeDesc = mStorageManager.getBestVolumeDescription(volumeInfo); in onCreateGuidance()
128 if (TextUtils.equals(primaryStorageVolumeId, volumeInfo.getId())) { in onCreateGuidance()
DFormatActivity.java126 final VolumeInfo volumeInfo = findVolume(mFormatAsPrivateDiskId); in onResume() local
127 if (volumeInfo != null && volumeInfo.getType() == VolumeInfo.TYPE_PRIVATE) { in onResume()
DStorageFragment.java79 public static void prepareArgs(Bundle bundle, VolumeInfo volumeInfo) { in prepareArgs() argument
80 bundle.putString(VolumeInfo.EXTRA_VOLUME_ID, volumeInfo.getId()); in prepareArgs()
DNewStorageActivity.java249 for (VolumeInfo volumeInfo : volumeInfos) { in checkForUnmount()
250 if (TextUtils.equals(volumeInfo.getId(), mVolumeId)) { in checkForUnmount()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/
DAppStoragePreference.java44 final VolumeInfo volumeInfo = mPackageManager.getPackageCurrentVolume(applicationInfo); in refresh() local
48 (candidates.size() == 1 && !candidates.contains(volumeInfo))) { in refresh()
55 final String volumeDesc = mStorageManager.getBestVolumeDescription(volumeInfo); in refresh()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/
DShadowStorageManagerVolumeProvider.java42 public static void setVolumeInfo(VolumeInfo volumeInfo) { in setVolumeInfo() argument
43 sVolumeInfo = volumeInfo; in setVolumeInfo()
/packages/apps/Car/Settings/src/com/android/car/settings/storage/
DStorageUsageBasePreferenceController.java84 public void setVolumeInfo(VolumeInfo volumeInfo) { in setVolumeInfo() argument
85 mVolumeInfo = volumeInfo; in setVolumeInfo()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/
DPrivateVolumeOptionMenuController.java47 Context context, VolumeInfo volumeInfo, PackageManager packageManager) { in PrivateVolumeOptionMenuController() argument
49 mVolumeInfo = volumeInfo; in PrivateVolumeOptionMenuController()
/packages/apps/Settings/src/com/android/settings/deviceinfo/
DPrivateVolumeOptionMenuController.java47 Context context, VolumeInfo volumeInfo, PackageManager packageManager) { in PrivateVolumeOptionMenuController() argument
49 mVolumeInfo = volumeInfo; in PrivateVolumeOptionMenuController()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/
DApplicationListItemManager.java77 public ApplicationListItemManager(VolumeInfo volumeInfo, Lifecycle lifecycle, in ApplicationListItemManager() argument
80 mVolumeInfo = volumeInfo; in ApplicationListItemManager()