Home
last modified time | relevance | path

Searched refs:StorageManager (Results 1 – 25 of 110) 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/cmds/statsd/tests/storage/
DStorageManager_test.cpp42 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/
DMountServiceTests.java24 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/
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()
103 void StorageManager::writeFile(const char* file, const void* buffer, int numBytes) { in writeFile()
126 bool StorageManager::writeTrainInfo(int64_t trainVersionCode, const std::string& trainName, in writeTrainInfo()
219 bool StorageManager::readTrainInfo(InstallTrainInfo& trainInfo) { in readTrainInfo()
314 void StorageManager::deleteFile(const char* file) { in deleteFile()
322 void StorageManager::deleteAllFiles(const char* path) { in deleteAllFiles()
337 void StorageManager::deleteSuffixedFiles(const char* path, const char* suffix) { in deleteSuffixedFiles()
358 void StorageManager::sendBroadcast(const char* path, in sendBroadcast()
[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()
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/
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/services/core/java/com/android/server/
DStorageManagerService.java106 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 …]
DMasterClearReceiver.java26 import android.os.storage.StorageManager;
116 StorageManager sm = (StorageManager) mContext.getSystemService( in doInBackground()
DDynamicSystemService.java31 import android.os.storage.StorageManager;
92 StorageManager.getVolumeList(userId, StorageManager.FLAG_FOR_WRITE); in startInstallation()
/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/services/tests/servicestests/src/com/android/server/locksettings/
DMockLockSettingsContext.java27 import android.os.storage.StorageManager;
34 private StorageManager mStorageManager;
40 StorageManager storageManager, TrustManager trustManager, in MockLockSettingsContext()
/frameworks/base/services/core/java/com/android/server/storage/
DDeviceStorageMonitorService.java38 import android.os.storage.StorageManager;
174 final StorageManager storage = getContext().getSystemService(StorageManager.class); in check()
198 final UUID uuid = StorageManager.convert(vol.getFsUuid()); in check()
214 } else if (StorageManager.UUID_DEFAULT.equals(uuid) in check()
304 return getContext().getSystemService(StorageManager.class)
421 if (StorageManager.UUID_DEFAULT.equals(uuid)) { in dumpImpl()
448 final UUID uuid = StorageManager.convert(vol.getFsUuid()); in updateNotifications()
451 Intent lowMemIntent = new Intent(StorageManager.ACTION_MANAGE_STORAGE); in updateNotifications()
452 lowMemIntent.putExtra(StorageManager.EXTRA_UUID, uuid); in updateNotifications()
495 if (!Objects.equals(StorageManager.UUID_PRIVATE_INTERNAL, vol.getFsUuid())) { in updateBroadcasts()
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/SharedStorageBackup/src/com/android/sharedstoragebackup/
DSharedStorageAgent.java9 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/
DAppFusePerfTest.java24 import android.os.storage.StorageManager;
44 final StorageManager storageManager = context.getSystemService(StorageManager.class); in testReadWriteFile()
/frameworks/base/cmds/statsd/src/
DStatsLogProcessor.cpp377 StorageManager::appendConfigMetricsReport( in onDumpReport()
474 string file_name = StorageManager::getDataHistoryFileName((long)getWallClockSec(), in onConfigMetricsReportLocked()
476 StorageManager::writeFile(file_name.c_str(), buffer->data(), buffer->size()); in onConfigMetricsReportLocked()
484 if (StorageManager::readConfigFromDisk(key, &config)) { in resetConfigsLocked()
597 StorageManager::getDataFileName((long)getWallClockSec(), key.GetUid(), key.GetId()); in WriteDataToDiskLocked()
598 StorageManager::writeFile(file_name.c_str(), buffer.data(), buffer.size()); in WriteDataToDiskLocked()
620 StorageManager::deleteFile(file_name.c_str()); in SaveActiveConfigsToDisk()
652 StorageManager::deleteFile(file_name.c_str()); in LoadActiveConfigsFromDisk()
659 StorageManager::deleteFile(file_name.c_str()); in LoadActiveConfigsFromDisk()
668 StorageManager::deleteFile(file_name.c_str()); in LoadActiveConfigsFromDisk()
[all …]
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/handheld/
DUninstallAlertDialogFragment.java19 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/
DEnvironment.java30 import android.os.storage.StorageManager;
112 final StorageVolume[] volumes = StorageManager.getVolumeList(mUserId, in getExternalDirs()
113 StorageManager.FLAG_FOR_WRITE); in getExternalDirs()
1078 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in getExternalStorageState()
1110 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in isExternalStorageRemovable()
1153 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in isExternalStorageEmulated()
1290 return StorageManager.maybeTranslateEmulatedPathToInternal(path); in maybeTranslateEmulatedPathToInternal()
DRevocableFileDescriptor.java20 import android.os.storage.StorageManager;
77 mOuter = context.getSystemService(StorageManager.class) in init()
/frameworks/base/cmds/statsd/src/config/
DConfigManager.cpp53 StorageManager::readConfigFromDisk(configsFromDisk); in Startup()
90 StorageManager::hasIdenticalConfig(key, buffer)) { in UpdateConfig()
180 StorageManager::deleteSuffixedFiles(STATS_SERVICE_DIR, suffix.c_str()); in remove_saved_configs()
313 StorageManager::writeFile(file_name.c_str(), &buffer[0], numBytes); in update_saved_configs_locked()
/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/services/usage/java/com/android/server/usage/
DStorageStatsService.java48 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()

12345