Home
last modified time | relevance | path

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

1234

/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/services/tests/servicestests/src/com/android/server/pm/
DUserDataPreparerTest.java22 import android.os.storage.StorageManager;
68 private StorageManager mStorageManagerMock;
86 when(mContextMock.getSystemServiceName(StorageManager.class)) in setup()
101 .prepareUserData(TEST_USER_ID, TEST_USER_SERIAL, StorageManager.FLAG_STORAGE_DE); in testPrepareUserData_De()
103 eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_DE)); in testPrepareUserData_De()
105 eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_DE)); in testPrepareUserData_De()
119 .prepareUserData(TEST_USER_ID, TEST_USER_SERIAL, StorageManager.FLAG_STORAGE_CE); in testPrepareUserData_Ce()
121 eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_CE)); in testPrepareUserData_Ce()
123 eq(TEST_USER_SERIAL), eq(StorageManager.FLAG_STORAGE_CE)); in testPrepareUserData_Ce()
158 mUserDataPreparer.destroyUserData(TEST_USER_ID, StorageManager.FLAG_STORAGE_DE); in testDestroyUserData_De()
[all …]
/frameworks/base/cmds/sm/src/com/android/commands/sm/
DSm.java25 import android.os.storage.StorageManager;
142 System.out.println(StorageManager.hasAdoptable()); in runHasAdoptable()
150 final int mask = StorageManager.DEBUG_ADOPTABLE_FORCE_ON in runSetForceAdoptable()
151 | StorageManager.DEBUG_ADOPTABLE_FORCE_OFF; in runSetForceAdoptable()
155 mSm.setDebugFlags(StorageManager.DEBUG_ADOPTABLE_FORCE_ON, mask); in runSetForceAdoptable()
158 mSm.setDebugFlags(StorageManager.DEBUG_ADOPTABLE_FORCE_OFF, mask); in runSetForceAdoptable()
168 final int mask = StorageManager.DEBUG_SDCARDFS_FORCE_ON in runSetSdcardfs()
169 | StorageManager.DEBUG_SDCARDFS_FORCE_OFF; in runSetSdcardfs()
172 mSm.setDebugFlags(StorageManager.DEBUG_SDCARDFS_FORCE_ON, mask); in runSetSdcardfs()
175 mSm.setDebugFlags(StorageManager.DEBUG_SDCARDFS_FORCE_OFF, mask); in runSetSdcardfs()
[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.cpp71 void StorageManager::writeFile(const char* file, const void* buffer, int numBytes) { in writeFile()
95 void StorageManager::deleteFile(const char* file) { in deleteFile()
103 void StorageManager::deleteAllFiles(const char* path) { in deleteAllFiles()
118 void StorageManager::deleteSuffixedFiles(const char* path, const char* suffix) { in deleteSuffixedFiles()
139 void StorageManager::sendBroadcast(const char* path, in sendBroadcast()
163 bool StorageManager::hasConfigMetricsReport(const ConfigKey& key) { in hasConfigMetricsReport()
191 void StorageManager::appendConfigMetricsReport(const ConfigKey& key, ProtoOutputStream* proto) { in appendConfigMetricsReport()
233 bool StorageManager::readFileToString(const char* file, string* content) { in readFileToString()
247 void StorageManager::readConfigFromDisk(map<ConfigKey, StatsdConfig>& configsMap) { in readConfigFromDisk()
283 bool StorageManager::readConfigFromDisk(const ConfigKey& key, StatsdConfig* config) { in readConfigFromDisk()
[all …]
/frameworks/base/core/java/com/android/internal/content/
DPackageHelper.java34 import android.os.storage.StorageManager;
92 abstract public StorageManager getStorageManager(Context context); in getStorageManager()
103 public StorageManager getStorageManager(Context context) { in getDefaultTestableInterface()
104 return context.getSystemService(StorageManager.class); in getDefaultTestableInterface()
170 final StorageManager storageManager = testInterface.getStorageManager(context); in resolveInstallVolume()
208 return StorageManager.UUID_PRIVATE_INTERNAL; in resolveInstallVolume()
220 StorageManager.UUID_PRIVATE_INTERNAL)) { in resolveInstallVolume()
230 return StorageManager.UUID_PRIVATE_INTERNAL; in resolveInstallVolume()
238 if (Objects.equals(existingInfo.volumeUuid, StorageManager.UUID_PRIVATE_INTERNAL) in resolveInstallVolume()
240 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/core/tests/coretests/src/android/app/
DApplicationPackageManagerTest.java23 import android.os.storage.StorageManager;
114 private StorageManager getMockedStorageManager() { in getMockedStorageManager()
115 StorageManager storageManager = Mockito.mock(StorageManager.class); in getMockedStorageManager()
151 StorageManager storageManager = getMockedStorageManager(); in testGetCandidateVolumes_systemApp()
180 StorageManager storageManager = getMockedStorageManager(); in testGetCandidateVolumes_3rdParty_internalOnly()
209 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/
DStorageManagerService.java94 import android.os.storage.StorageManager;
356 final StorageManager storage = mContext.getSystemService(StorageManager.class); in findStorageForUuid()
357 if (Objects.equals(StorageManager.UUID_PRIVATE_INTERNAL, volumeUuid)) { in findStorageForUuid()
359 } else if (Objects.equals(StorageManager.UUID_PRIMARY_PHYSICAL, volumeUuid)) { in findStorageForUuid()
827 && !StorageManager.isFileEncryptedNativeOnly()) { in initIfReadyAndConnected()
831 final boolean initLocked = StorageManager.isFileEncryptedEmulatedOnly(); in initIfReadyAndConnected()
982 systemLocale = getField(StorageManager.SYSTEM_LOCALE_KEY); in copyLocaleFromMountService()
1009 final String value = SystemProperties.get(StorageManager.PROP_ADOPTABLE);
1153 final StorageManager storage = mContext.getSystemService(StorageManager.class); in onVolumeCreatedLocked()
1156 if (Objects.equals(StorageManager.UUID_PRIVATE_INTERNAL, mPrimaryStorageUuid) in onVolumeCreatedLocked()
[all …]
DMasterClearReceiver.java26 import android.os.storage.StorageManager;
116 StorageManager sm = (StorageManager) mContext.getSystemService( in doInBackground()
/frameworks/base/services/core/java/com/android/server/storage/
DDeviceStorageMonitorService.java39 import android.os.storage.StorageManager;
178 final StorageManager storage = getContext().getSystemService(StorageManager.class); in check()
202 final UUID uuid = StorageManager.convert(vol.getFsUuid()); in check()
218 } else if (StorageManager.UUID_DEFAULT.equals(uuid) && !isBootImageOnDisk() in check()
317 return getContext().getSystemService(StorageManager.class)
434 if (StorageManager.UUID_DEFAULT.equals(uuid)) { in dumpImpl()
461 final UUID uuid = StorageManager.convert(vol.getFsUuid()); in updateNotifications()
464 Intent lowMemIntent = new Intent(StorageManager.ACTION_MANAGE_STORAGE); in updateNotifications()
465 lowMemIntent.putExtra(StorageManager.EXTRA_UUID, uuid); in updateNotifications()
472 if (StorageManager.UUID_DEFAULT.equals(uuid)) { 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/ExtServices/src/android/ext/services/storage/
DCacheQuotaServiceImpl.java22 import android.os.storage.StorageManager;
122 StorageManager storageManager = getSystemService(StorageManager.class); in getReservedCacheSize()
124 if (uuid == StorageManager.UUID_PRIVATE_INTERNAL) { // regular equals because of null in getReservedCacheSize()
/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;
46 final StorageManager storageManager = context.getSystemService(StorageManager.class); in testReadWriteFile()
/frameworks/base/core/java/android/os/
DEnvironment.java22 import android.os.storage.StorageManager;
91 final StorageVolume[] volumes = StorageManager.getVolumeList(mUserId, in getExternalDirs()
92 StorageManager.FLAG_FOR_WRITE); in getExternalDirs()
919 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in getExternalStorageState()
951 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in isExternalStorageRemovable()
994 final StorageVolume volume = StorageManager.getStorageVolume(path, UserHandle.myUserId()); in isExternalStorageEmulated()
1064 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.cpp57 StorageManager::readConfigFromDisk(configsFromDisk); in Startup()
94 StorageManager::hasIdenticalConfig(key, buffer)) { in UpdateConfig()
163 StorageManager::deleteSuffixedFiles(STATS_SERVICE_DIR, suffix.c_str()); in remove_saved_configs()
279 StorageManager::writeFile(file_name.c_str(), &buffer[0], numBytes); in update_saved_configs_locked()
/frameworks/base/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/
DBackgroundDexOptServiceIntegrationTests.java23 import android.os.storage.StorageManager;
233 StorageManager storageManager = (StorageManager) getContext().getSystemService( in getStorageLowBytes()
/frameworks/base/services/usage/java/com/android/server/usage/
DStorageStatsService.java47 import android.os.storage.StorageManager;
97 private final StorageManager mStorage;
108 mStorage = Preconditions.checkNotNull(context.getSystemService(StorageManager.class)); in StorageStatsService()
171 if (volumeUuid == StorageManager.UUID_PRIVATE_INTERNAL) { in isReservedSupported()
172 return SystemProperties.getBoolean(StorageManager.PROP_HAS_RESERVED, false); in isReservedSupported()
182 if (volumeUuid == StorageManager.UUID_PRIVATE_INTERNAL) { in getTotalBytes()
/frameworks/base/core/java/com/android/internal/widget/
DLockPatternUtils.java49 import android.os.storage.StorageManager;
651 updateEncryptionPassword(StorageManager.CRYPT_TYPE_DEFAULT, null); in clearLock()
727 updateEncryptionPassword(StorageManager.CRYPT_TYPE_PATTERN, stringPattern); in saveLockPattern()
751 storageManager.setField(StorageManager.OWNER_INFO_KEY, ownerInfo); in updateCryptoUserInfo()
871 int type = numeric || numericComplex ? StorageManager.CRYPT_TYPE_PIN in updateEncryptionPasswordIfNeeded()
872 : StorageManager.CRYPT_TYPE_PASSWORD; in updateEncryptionPasswordIfNeeded()
925 return StorageManager.isEncrypted(); in isDeviceEncryptionEnabled()
933 return StorageManager.isFileEncryptedNativeOrEmulated(); in isFileEncryptionEnabled()
940 updateEncryptionPassword(StorageManager.CRYPT_TYPE_DEFAULT, null); in clearEncryptionPassword()
1260 storageManager.setField(StorageManager.PATTERN_VISIBLE_KEY, enabled ? "1" : "0"); in setVisiblePatternEnabled()
[all …]
/frameworks/base/packages/BackupRestoreConfirmation/src/com/android/backupconfirm/
DBackupRestoreConfirmation.java31 import android.os.storage.StorageManager;
318 != StorageManager.ENCRYPTION_STATE_NONE in deviceIsEncrypted()
320 != StorageManager.CRYPT_TYPE_DEFAULT; in deviceIsEncrypted()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DFrameworkFacade.java34 import android.os.storage.StorageManager;
189 return StorageManager.inCryptKeeperBounce(); in inStorageManagerCryptKeeperBounce()

1234