/frameworks/base/services/core/java/com/android/server/pm/ |
D | UserDataPreparer.java | 25 import android.os.storage.StorageManager; 71 final StorageManager storage = mContext.getSystemService(StorageManager.class); in prepareUserData() 83 final StorageManager storage = mContext.getSystemService(StorageManager.class); in prepareUserDataLI() 87 if ((flags & StorageManager.FLAG_STORAGE_DE) != 0 && !mOnlyCore) { in prepareUserDataLI() 89 if (Objects.equals(volumeUuid, StorageManager.UUID_PRIVATE_INTERNAL)) { in prepareUserDataLI() 93 if ((flags & StorageManager.FLAG_STORAGE_CE) != 0 && !mOnlyCore) { in prepareUserDataLI() 95 if (Objects.equals(volumeUuid, StorageManager.UUID_PRIVATE_INTERNAL)) { in prepareUserDataLI() 103 if ((flags & StorageManager.FLAG_STORAGE_CE) != 0 && in prepareUserDataLI() 117 flags | StorageManager.FLAG_STORAGE_DE, false); in prepareUserDataLI() 127 final StorageManager storage = mContext.getSystemService(StorageManager.class); in destroyUserData() [all …]
|
/frameworks/base/cmds/sm/src/com/android/commands/sm/ |
D | Sm.java | 25 import android.os.storage.StorageManager; 146 System.out.println(StorageManager.hasAdoptable()); in runHasAdoptable() 154 final int mask = StorageManager.DEBUG_ADOPTABLE_FORCE_ON in runSetForceAdoptable() 155 | StorageManager.DEBUG_ADOPTABLE_FORCE_OFF; in runSetForceAdoptable() 159 mSm.setDebugFlags(StorageManager.DEBUG_ADOPTABLE_FORCE_ON, mask); in runSetForceAdoptable() 162 mSm.setDebugFlags(StorageManager.DEBUG_ADOPTABLE_FORCE_OFF, mask); in runSetForceAdoptable() 172 final int mask = StorageManager.DEBUG_SDCARDFS_FORCE_ON in runSetSdcardfs() 173 | StorageManager.DEBUG_SDCARDFS_FORCE_OFF; in runSetSdcardfs() 176 mSm.setDebugFlags(StorageManager.DEBUG_SDCARDFS_FORCE_ON, mask); in runSetSdcardfs() 179 mSm.setDebugFlags(StorageManager.DEBUG_SDCARDFS_FORCE_OFF, mask); in runSetSdcardfs() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | UserDataPreparerTest.java | 28 import android.os.storage.StorageManager; 69 private StorageManager mStorageManagerMock; 87 when(mContextMock.getSystemServiceName(StorageManager.class)) in setup() 102 .prepareUserData(TEST_USER_ID, TEST_USER_SERIAL, StorageManager.FLAG_STORAGE_DE); in testPrepareUserData_De() 104 eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_DE)); in testPrepareUserData_De() 106 eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_DE)); in testPrepareUserData_De() 120 .prepareUserData(TEST_USER_ID, TEST_USER_SERIAL, StorageManager.FLAG_STORAGE_CE); in testPrepareUserData_Ce() 122 eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_CE)); in testPrepareUserData_Ce() 124 eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_CE)); in testPrepareUserData_Ce() 159 mUserDataPreparer.destroyUserData(TEST_USER_ID, StorageManager.FLAG_STORAGE_DE); in testDestroyUserData_De() [all …]
|
/frameworks/base/cmds/statsd/tests/storage/ |
D | StorageManager_test.cpp | 42 result = StorageManager::writeTrainInfo(trainInfo.trainVersionCode, trainInfo.trainName, in TEST() 48 result = StorageManager::readTrainInfo(trainInfoResult); in TEST() 69 result = StorageManager::writeTrainInfo(trainInfo.trainVersionCode, trainInfo.trainName, in TEST() 75 result = StorageManager::readTrainInfo(trainInfoResult); in TEST() 96 result = StorageManager::writeTrainInfo(trainInfo.trainVersionCode, trainInfo.trainName, in TEST() 102 result = StorageManager::readTrainInfo(trainInfoResult); in TEST() 114 vector<StorageManager::FileInfo> list; in TEST() 121 StorageManager::sortFiles(&list); in TEST() 171 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, false /*erase?*/, in TEST() 186 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, true /*erase?*/, in TEST() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/ |
D | MountServiceTests.java | 24 import android.os.storage.StorageManager; 124 private StorageManager getStorageManager() { in getStorageManager() 125 return (StorageManager) getContext().getSystemService(Context.STORAGE_SERVICE); in getStorageManager() 128 private void mountObb(StorageManager sm, final int resource, final File file, in mountObb() 149 private ObbObserver mountObbWithoutWait(final StorageManager sm, final int resource, in mountObbWithoutWait() 160 private void waitForObbActionCompletion(final StorageManager sm, final File file, in waitForObbActionCompletion() 174 private String checkMountedPath(final StorageManager sm, final File file) { in checkMountedPath() 182 private void unmountObb(final StorageManager sm, final File file, int expectedState) { in unmountObb() 200 StorageManager sm = getStorageManager(); in testMountAndUnmountObbNormal() 219 StorageManager sm = getStorageManager(); in testAttemptMountNonObb() [all …]
|
/frameworks/base/cmds/statsd/src/storage/ |
D | StorageManager.cpp | 54 std::mutex StorageManager::sTrainInfoMutex; 70 string StorageManager::getDataFileName(long wallClockSec, int uid, int64_t id) { in getDataFileName() 75 string StorageManager::getDataHistoryFileName(long wallClockSec, int uid, int64_t id) { in getDataHistoryFileName() 105 void StorageManager::writeFile(const char* file, const void* buffer, int numBytes) { in writeFile() 128 bool StorageManager::writeTrainInfo(int64_t trainVersionCode, const std::string& trainName, in writeTrainInfo() 221 bool StorageManager::readTrainInfo(InstallTrainInfo& trainInfo) { in readTrainInfo() 316 void StorageManager::deleteFile(const char* file) { in deleteFile() 324 void StorageManager::deleteAllFiles(const char* path) { in deleteAllFiles() 339 void StorageManager::deleteSuffixedFiles(const char* path, const char* suffix) { in deleteSuffixedFiles() 360 void StorageManager::sendBroadcast(const char* path, in sendBroadcast() [all …]
|
/frameworks/base/core/java/com/android/internal/content/ |
D | PackageHelper.java | 34 import android.os.storage.StorageManager; 94 abstract public StorageManager getStorageManager(Context context); in getStorageManager() 105 public StorageManager getStorageManager(Context context) { in getDefaultTestableInterface() 106 return context.getSystemService(StorageManager.class); in getDefaultTestableInterface() 172 final StorageManager storageManager = testInterface.getStorageManager(context); in resolveInstallVolume() 210 return StorageManager.UUID_PRIVATE_INTERNAL; in resolveInstallVolume() 222 StorageManager.UUID_PRIVATE_INTERNAL)) { in resolveInstallVolume() 232 return StorageManager.UUID_PRIVATE_INTERNAL; in resolveInstallVolume() 240 if (Objects.equals(existingInfo.volumeUuid, StorageManager.UUID_PRIVATE_INTERNAL) in resolveInstallVolume() 242 return StorageManager.UUID_PRIVATE_INTERNAL; in resolveInstallVolume() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/deviceinfo/ |
D | StorageManagerVolumeProvider.java | 20 import android.os.storage.StorageManager; 31 private StorageManager mStorageManager; 33 public StorageManagerVolumeProvider(StorageManager sm) { in StorageManagerVolumeProvider()
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | PackageHelperTests.java | 22 import android.os.storage.StorageManager; 46 private static final String sInternalVolUuid = StorageManager.UUID_PRIVATE_INTERNAL; 54 private static StorageManager sStorageManager; 56 private static StorageManager createStorageManagerMock() throws Exception { in createStorageManagerMock() 80 StorageManager storageManager = Mockito.mock(StorageManager.class); in createStorageManagerMock() 117 public StorageManager getStorageManager(Context context) { in getStorageManager() 167 assertEquals(StorageManager.UUID_PRIVATE_INTERNAL, volume); in testResolveInstallVolumeInternal_SystemApp() 173 assertEquals(StorageManager.UUID_PRIVATE_INTERNAL, volume); in testResolveInstallVolumeInternal_SystemApp() 179 assertEquals(StorageManager.UUID_PRIVATE_INTERNAL, volume); in testResolveInstallVolumeInternal_SystemApp() 185 assertEquals(StorageManager.UUID_PRIVATE_INTERNAL, volume); in testResolveInstallVolumeInternal_SystemApp()
|
/frameworks/base/services/core/java/com/android/server/ |
D | StorageManagerService.java | 106 import android.os.storage.StorageManager; 198 private static final boolean ENABLE_ISOLATED_STORAGE = StorageManager.hasIsolatedStorage(); 407 final StorageManager storage = mContext.getSystemService(StorageManager.class); in findStorageForUuid() 408 if (Objects.equals(StorageManager.UUID_PRIVATE_INTERNAL, volumeUuid)) { in findStorageForUuid() 410 } else if (Objects.equals(StorageManager.UUID_PRIMARY_PHYSICAL, volumeUuid)) { in findStorageForUuid() 862 SystemProperties.set(StorageManager.PROP_ISOLATED_STORAGE, Boolean.toString(res)); in refreshIsolatedStorageSettings() 914 && !StorageManager.isFileEncryptedNativeOnly()) { in initIfBootedAndConnected() 918 final boolean initLocked = StorageManager.isFileEncryptedEmulatedOnly(); in initIfBootedAndConnected() 1086 systemLocale = getField(StorageManager.SYSTEM_LOCALE_KEY); in copyLocaleFromMountService() 1113 final String value = SystemProperties.get(StorageManager.PROP_ADOPTABLE); [all …]
|
D | MasterClearReceiver.java | 26 import android.os.storage.StorageManager; 116 StorageManager sm = (StorageManager) mContext.getSystemService( in doInBackground()
|
D | DynamicSystemService.java | 32 import android.os.storage.StorageManager; 120 StorageManager.getVolumeList(userId, StorageManager.FLAG_FOR_WRITE); in startInstallation()
|
/frameworks/base/core/tests/coretests/src/android/app/ |
D | ApplicationPackageManagerTest.java | 26 import android.os.storage.StorageManager; 115 private StorageManager getMockedStorageManager() { in getMockedStorageManager() 116 StorageManager storageManager = Mockito.mock(StorageManager.class); in getMockedStorageManager() 152 StorageManager storageManager = getMockedStorageManager(); in testGetCandidateVolumes_systemApp() 181 StorageManager storageManager = getMockedStorageManager(); in testGetCandidateVolumes_3rdParty_internalOnly() 210 StorageManager storageManager = getMockedStorageManager(); in testGetCandidateVolumes_3rdParty_auto()
|
/frameworks/base/services/core/java/com/android/server/storage/ |
D | DeviceStorageMonitorService.java | 38 import android.os.storage.StorageManager; 177 final StorageManager storage = getContext().getSystemService(StorageManager.class); in check() 201 final UUID uuid = StorageManager.convert(vol.getFsUuid()); in check() 217 } else if (StorageManager.UUID_DEFAULT.equals(uuid) && !isBootImageOnDisk() in check() 316 return getContext().getSystemService(StorageManager.class) 433 if (StorageManager.UUID_DEFAULT.equals(uuid)) { in dumpImpl() 460 final UUID uuid = StorageManager.convert(vol.getFsUuid()); in updateNotifications() 463 Intent lowMemIntent = new Intent(StorageManager.ACTION_MANAGE_STORAGE); in updateNotifications() 464 lowMemIntent.putExtra(StorageManager.EXTRA_UUID, uuid); in updateNotifications() 471 if (StorageManager.UUID_DEFAULT.equals(uuid)) { in updateNotifications() [all …]
|
D | FileCollector.java | 25 import android.os.storage.StorageManager; 156 return collectFiles(StorageManager.maybeTranslateEmulatedPathToInternal(path), in getMeasurementResult() 173 StorageManager.UUID_PRIVATE_INTERNAL, in getMeasurementResult() 200 StorageManager sm = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE); in getSystemSize()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/ |
D | MockLockSettingsContext.java | 27 import android.os.storage.StorageManager; 34 private StorageManager mStorageManager; 40 StorageManager storageManager, TrustManager trustManager, in MockLockSettingsContext()
|
/frameworks/base/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/ |
D | SharedStorageAgent.java | 9 import android.os.storage.StorageManager; 25 StorageManager mgr = (StorageManager) getSystemService(Context.STORAGE_SERVICE); in onCreate()
|
/frameworks/base/packages/MtpDocumentsProvider/perf_tests/src/com/android/mtp/ |
D | AppFusePerfTest.java | 24 import android.os.storage.StorageManager; 44 final StorageManager storageManager = context.getSystemService(StorageManager.class); in testReadWriteFile()
|
/frameworks/base/cmds/statsd/src/ |
D | StatsLogProcessor.cpp | 386 StorageManager::appendConfigMetricsReport( in onDumpReport() 483 string file_name = StorageManager::getDataHistoryFileName((long)getWallClockSec(), in onConfigMetricsReportLocked() 485 StorageManager::writeFile(file_name.c_str(), buffer->data(), buffer->size()); in onConfigMetricsReportLocked() 493 if (StorageManager::readConfigFromDisk(key, &config)) { in resetConfigsLocked() 606 StorageManager::getDataFileName((long)getWallClockSec(), key.GetUid(), key.GetId()); in WriteDataToDiskLocked() 607 StorageManager::writeFile(file_name.c_str(), buffer.data(), buffer.size()); in WriteDataToDiskLocked() 629 StorageManager::deleteFile(file_name.c_str()); in SaveActiveConfigsToDisk() 661 StorageManager::deleteFile(file_name.c_str()); in LoadActiveConfigsFromDisk() 668 StorageManager::deleteFile(file_name.c_str()); in LoadActiveConfigsFromDisk() 677 StorageManager::deleteFile(file_name.c_str()); in LoadActiveConfigsFromDisk() [all …]
|
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/handheld/ |
D | UninstallAlertDialogFragment.java | 19 import static android.os.storage.StorageManager.convert; 37 import android.os.storage.StorageManager; 67 StorageManager storageManager = getContext().getSystemService(StorageManager.class); in getAppDataSizeForUser()
|
/frameworks/base/core/java/android/os/ |
D | Environment.java | 30 import android.os.storage.StorageManager; 109 final StorageVolume[] volumes = StorageManager.getVolumeList(mUserId, in getExternalDirs() 110 StorageManager.FLAG_FOR_WRITE); in getExternalDirs() 1049 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in getExternalStorageState() 1081 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in isExternalStorageRemovable() 1124 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in isExternalStorageEmulated() 1261 return StorageManager.maybeTranslateEmulatedPathToInternal(path); in maybeTranslateEmulatedPathToInternal()
|
D | RevocableFileDescriptor.java | 20 import android.os.storage.StorageManager; 77 mOuter = context.getSystemService(StorageManager.class) in init()
|
/frameworks/base/cmds/statsd/src/config/ |
D | ConfigManager.cpp | 57 StorageManager::readConfigFromDisk(configsFromDisk); in Startup() 94 StorageManager::hasIdenticalConfig(key, buffer)) { in UpdateConfig() 184 StorageManager::deleteSuffixedFiles(STATS_SERVICE_DIR, suffix.c_str()); in remove_saved_configs() 317 StorageManager::writeFile(file_name.c_str(), &buffer[0], numBytes); in update_saved_configs_locked()
|
/frameworks/base/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/ |
D | BackgroundDexOptServiceIntegrationTests.java | 24 import android.os.storage.StorageManager; 230 StorageManager storageManager = (StorageManager) getContext().getSystemService( in getStorageLowBytes()
|
/frameworks/base/services/usage/java/com/android/server/usage/ |
D | StorageStatsService.java | 48 import android.os.storage.StorageManager; 98 private final StorageManager mStorage; 109 mStorage = Preconditions.checkNotNull(context.getSystemService(StorageManager.class)); in StorageStatsService() 169 if (volumeUuid == StorageManager.UUID_PRIVATE_INTERNAL) { in isReservedSupported() 170 return SystemProperties.getBoolean(StorageManager.PROP_HAS_RESERVED, false) in isReservedSupported() 181 if (volumeUuid == StorageManager.UUID_PRIVATE_INTERNAL) { in getTotalBytes()
|