Home
last modified time | relevance | path

Searched refs:StorageManager (Results 1 – 25 of 111) sorted by relevance

12345

/frameworks/base/services/core/java/com/android/server/pm/
DUserDataPreparer.java25 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/
DSm.java25 import android.os.storage.StorageManager;
150 System.out.println(StorageManager.hasAdoptable()); in runHasAdoptable()
158 final int mask = StorageManager.DEBUG_ADOPTABLE_FORCE_ON in runSetForceAdoptable()
159 | StorageManager.DEBUG_ADOPTABLE_FORCE_OFF; in runSetForceAdoptable()
163 mSm.setDebugFlags(StorageManager.DEBUG_ADOPTABLE_FORCE_ON, mask); in runSetForceAdoptable()
166 mSm.setDebugFlags(StorageManager.DEBUG_ADOPTABLE_FORCE_OFF, mask); in runSetForceAdoptable()
176 final int mask = StorageManager.DEBUG_SDCARDFS_FORCE_ON in runSetSdcardfs()
177 | StorageManager.DEBUG_SDCARDFS_FORCE_OFF; in runSetSdcardfs()
180 mSm.setDebugFlags(StorageManager.DEBUG_SDCARDFS_FORCE_ON, mask); in runSetSdcardfs()
183 mSm.setDebugFlags(StorageManager.DEBUG_SDCARDFS_FORCE_OFF, mask); in runSetSdcardfs()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserDataPreparerTest.java28 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/core/java/com/android/internal/content/
DPackageHelper.java34 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()
169 private static boolean checkFitOnVolume(StorageManager storageManager, String volumePath, in checkFitOnVolume()
177 installFlags | StorageManager.FLAG_ALLOCATE_NON_CACHE_ONLY); in checkFitOnVolume()
182 installFlags | StorageManager.FLAG_ALLOCATE_CACHE_ONLY); in checkFitOnVolume()
189 final StorageManager storageManager = testInterface.getStorageManager(context); in resolveInstallVolume()
215 return StorageManager.UUID_PRIVATE_INTERNAL; in resolveInstallVolume()
227 StorageManager.UUID_PRIVATE_INTERNAL)) { in resolveInstallVolume()
[all …]
/frameworks/base/cmds/statsd/tests/storage/
DStorageManager_test.cpp43 result = StorageManager::writeTrainInfo(trainInfo); in TEST()
48 result = StorageManager::readTrainInfo(trainInfo.trainName, trainInfoResult); in TEST()
69 result = StorageManager::writeTrainInfo(trainInfo); in TEST()
74 result = StorageManager::readTrainInfo(trainInfo.trainName, trainInfoResult); in TEST()
86 vector<StorageManager::FileInfo> list; in TEST()
93 StorageManager::sortFiles(&list); in TEST()
143 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, false /*erase?*/, in TEST()
158 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, true /*erase?*/, in TEST()
173 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, false /*erase?*/, in TEST()
188 StorageManager::appendConfigMetricsReport(ConfigKey(1066, 1), &out, true /*erase?*/, in TEST()
/frameworks/base/cmds/statsd/src/storage/
DStorageManager.cpp52 std::mutex StorageManager::sTrainInfoMutex;
68 string StorageManager::getDataFileName(long wallClockSec, int uid, int64_t id) { in getDataFileName()
73 string StorageManager::getDataHistoryFileName(long wallClockSec, int uid, int64_t id) { in getDataHistoryFileName()
126 void StorageManager::writeFile(const char* file, const void* buffer, int numBytes) { in writeFile()
149 bool StorageManager::writeTrainInfo(const InstallTrainInfo& trainInfo) { in writeTrainInfo()
263 bool StorageManager::readTrainInfo(const std::string& trainName, InstallTrainInfo& trainInfo) { in readTrainInfo()
268 bool StorageManager::readTrainInfoLocked(const std::string& trainName, InstallTrainInfo& trainInfo)… in readTrainInfoLocked()
389 vector<InstallTrainInfo> StorageManager::readAllTrainInfo() { in readAllTrainInfo()
406 bool readSuccess = StorageManager::readTrainInfoLocked(name, trainInfo); in readAllTrainInfo()
415 void StorageManager::deleteFile(const char* file) { in deleteFile()
[all …]
/frameworks/base/services/core/java/com/android/server/storage/
DDeviceStorageMonitorService.java38 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)
428 final StorageManager storage = getContext().getSystemService(StorageManager.class); in dumpImpl()
434 if (StorageManager.UUID_DEFAULT.equals(uuid)) { in dumpImpl()
445 final UUID innerUuid = StorageManager.convert(vol.getFsUuid()); in dumpImpl()
474 final UUID uuid = StorageManager.convert(vol.getFsUuid()); in updateNotifications()
477 Intent lowMemIntent = new Intent(StorageManager.ACTION_MANAGE_STORAGE); in updateNotifications()
[all …]
DFileCollector.java25 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/packages/SettingsLib/src/com/android/settingslib/deviceinfo/
DStorageManagerVolumeProvider.java20 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/
DPackageHelperTests.java22 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/core/tests/coretests/src/android/app/
DApplicationPackageManagerTest.java26 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/core/java/com/android/internal/widget/
DLockscreenCredential.java29 import android.os.storage.StorageManager;
181 return StorageManager.CRYPT_TYPE_DEFAULT; in getStorageCryptType()
184 return StorageManager.CRYPT_TYPE_PATTERN; in getStorageCryptType()
187 return StorageManager.CRYPT_TYPE_PIN; in getStorageCryptType()
190 return StorageManager.CRYPT_TYPE_PASSWORD; in getStorageCryptType()
/frameworks/base/services/core/java/com/android/server/
DStorageManagerService.java45 import static android.os.storage.StorageManager.PROP_FORCED_SCOPED_STORAGE_WHITELIST;
46 import static android.os.storage.StorageManager.PROP_FUSE;
47 import static android.os.storage.StorageManager.PROP_SETTINGS_FUSE;
117 import android.os.storage.StorageManager;
220 private static final boolean ENABLE_ISOLATED_STORAGE = StorageManager.hasIsolatedStorage();
515 final StorageManager storage = mContext.getSystemService(StorageManager.class); in findStorageForUuid()
516 if (Objects.equals(StorageManager.UUID_PRIVATE_INTERNAL, volumeUuid)) { in findStorageForUuid()
518 } else if (Objects.equals(StorageManager.UUID_PRIMARY_PHYSICAL, volumeUuid)) { in findStorageForUuid()
992 SystemProperties.set(StorageManager.PROP_ISOLATED_STORAGE, Boolean.toString(res)); in refreshIsolatedStorageSettings()
1065 && !StorageManager.isFileEncryptedNativeOnly()) { in initIfBootedAndConnected()
[all …]
DMasterClearReceiver.java26 import android.os.storage.StorageManager;
122 StorageManager sm = (StorageManager) mContext.getSystemService( in doInBackground()
DDynamicSystemService.java32 import android.os.storage.StorageManager;
92 StorageManager.getVolumeList(userId, StorageManager.FLAG_FOR_WRITE); in startInstallation()
/frameworks/base/cmds/statsd/src/
DStatsLogProcessor.cpp246 readTrainInfoSuccess = StorageManager::readTrainInfo(trainInfo->trainName, trainInfoOnDisk); in getAndUpdateTrainInfoOnDisk()
301 StorageManager::writeTrainInfo(*trainInfo); in getAndUpdateTrainInfoOnDisk()
341 readTrainInfoSuccess = StorageManager::readTrainInfo(packageNameIn, trainInfoOnDisk); in processWatchdogRollbackOccurred()
358 StorageManager::writeTrainInfo(trainInfoOnDisk); in processWatchdogRollbackOccurred()
364 StorageManager::writeTrainInfo(trainInfoOnDisk); in processWatchdogRollbackOccurred()
588 StorageManager::appendConfigMetricsReport( in onDumpReport()
685 string file_name = StorageManager::getDataHistoryFileName((long)getWallClockSec(), in onConfigMetricsReportLocked()
687 StorageManager::writeFile(file_name.c_str(), buffer->data(), buffer->size()); in onConfigMetricsReportLocked()
695 if (StorageManager::readConfigFromDisk(key, &config)) { in resetConfigsLocked()
810 StorageManager::getDataFileName((long)getWallClockSec(), key.GetUid(), key.GetId()); in WriteDataToDiskLocked()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DMockLockSettingsContext.java29 import android.os.storage.StorageManager;
36 private StorageManager mStorageManager;
45 StorageManager storageManager, TrustManager trustManager, in MockLockSettingsContext()
/frameworks/base/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/
DSharedStorageAgent.java9 import android.os.storage.StorageManager;
25 StorageManager mgr = (StorageManager) getSystemService(Context.STORAGE_SERVICE); in onCreate()
/frameworks/base/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/
DBackgroundDexOptServiceIntegrationTests.java24 import android.os.storage.StorageManager;
230 StorageManager storageManager = (StorageManager) getContext().getSystemService( in getStorageLowBytes()
/frameworks/base/core/java/android/os/
DRevocableFileDescriptor.java20 import android.os.storage.StorageManager;
79 mOuter = context.getSystemService(StorageManager.class) in init()
DEnvironment.java33 import android.os.storage.StorageManager;
160 final StorageVolume[] volumes = StorageManager.getVolumeList(mUserId, in getExternalDirs()
161 StorageManager.FLAG_FOR_WRITE); in getExternalDirs()
1166 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in getExternalStorageState()
1198 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in isExternalStorageRemovable()
1241 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in isExternalStorageEmulated()
1432 return StorageManager.maybeTranslateEmulatedPathToInternal(path); in maybeTranslateEmulatedPathToInternal()
/frameworks/base/services/core/java/com/android/server/rollback/
DAppDataRollbackHelper.java22 import android.os.storage.StorageManager;
289 return StorageManager.isFileEncryptedNativeOrEmulated() in isUserCredentialLocked()
290 && !StorageManager.isUserKeyUnlocked(userId); in isUserCredentialLocked()
/frameworks/base/services/usage/java/com/android/server/usage/
DStorageStatsService.java59 import android.os.storage.StorageManager;
117 private final StorageManager mStorage;
131 mStorage = Preconditions.checkNotNull(context.getSystemService(StorageManager.class)); in StorageStatsService()
208 if (volumeUuid == StorageManager.UUID_PRIVATE_INTERNAL) { in isReservedSupported()
209 return SystemProperties.getBoolean(StorageManager.PROP_HAS_RESERVED, false) in isReservedSupported()
220 if (volumeUuid == StorageManager.UUID_PRIVATE_INTERNAL) { in getTotalBytes()
337 if (volumeUuid == StorageManager.UUID_PRIVATE_INTERNAL) { in queryStatsForPackage()
402 if (volumeUuid == StorageManager.UUID_PRIVATE_INTERNAL) { in queryStatsForUid()
/frameworks/base/services/core/java/com/android/server/pm/dex/
DDynamicCodeLogger.java28 import android.os.storage.StorageManager;
127 storageFlags = StorageManager.FLAG_STORAGE_CE; in logDynamicCodeLoading()
129 storageFlags = StorageManager.FLAG_STORAGE_DE; in logDynamicCodeLoading()
/frameworks/base/cmds/statsd/src/config/
DConfigManager.cpp124 StorageManager::readConfigFromDisk(configsFromDisk); in Startup()
161 StorageManager::hasIdenticalConfig(key, buffer)) { in UpdateConfig()
244 StorageManager::deleteSuffixedFiles(STATS_SERVICE_DIR, suffix.c_str()); in remove_saved_configs()
370 StorageManager::writeFile(file_name.c_str(), &buffer[0], numBytes); in update_saved_configs_locked()

12345