Home
last modified time | relevance | path

Searched refs:totalBytes (Results 1 – 25 of 52) sorted by relevance

123

/packages/apps/Settings/src/com/android/settings/deviceinfo/
DStorageVolumePreference.java57 public StorageVolumePreference(Context context, VolumeInfo volume, long totalBytes) { in StorageVolumePreference() argument
86 totalBytes = stats.getTotalBytes(volume.getFsUuid()); in StorageVolumePreference()
88 usedBytes = totalBytes - freeBytes; in StorageVolumePreference()
95 if (totalBytes <= 0) { in StorageVolumePreference()
96 totalBytes = path.getTotalSpace(); in StorageVolumePreference()
99 usedBytes = totalBytes - freeBytes; in StorageVolumePreference()
103 final String total = Formatter.formatFileSize(context, totalBytes); in StorageVolumePreference()
105 if (totalBytes > 0) { in StorageVolumePreference()
106 mUsedPercent = (int) ((usedBytes * 100) / totalBytes); in StorageVolumePreference()
DPublicVolumeSettings.java168 final long totalBytes = file.getTotalSpace(); in update() local
170 final long usedBytes = totalBytes - freeBytes; in update()
176 Formatter.formatFileSize(context, totalBytes))); in update()
177 mSummary.setPercent(usedBytes, totalBytes); in update()
DStorageDashboardFragment.java143 long privateUsedBytes = mStorageInfo.totalBytes - mStorageInfo.freeBytes; in onReceivedSizes()
144 mSummaryController.updateBytes(privateUsedBytes, mStorageInfo.totalBytes); in onReceivedSizes()
147 mPreferenceController.setTotalSize(mStorageInfo.totalBytes); in onReceivedSizes()
152 userController.setTotalSize(mStorageInfo.totalBytes); in onReceivedSizes()
DStorageSummaryPreference.java41 public void setPercent(long usedBytes, long totalBytes) { in setPercent() argument
42 mPercent = MathUtils.constrain((int) ((usedBytes * 100) / totalBytes), in setPercent()
DTopLevelStoragePreferenceController.java59 final double privateUsedBytes = info.totalBytes - info.freeBytes; in refreshSummary()
63 percentageFormat.format(privateUsedBytes / info.totalBytes), in refreshSummary()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/
DStorageVolumePreference.java57 public StorageVolumePreference(Context context, VolumeInfo volume, long totalBytes) { in StorageVolumePreference() argument
86 totalBytes = stats.getTotalBytes(volume.getFsUuid()); in StorageVolumePreference()
88 usedBytes = totalBytes - freeBytes; in StorageVolumePreference()
95 if (totalBytes <= 0) { in StorageVolumePreference()
96 totalBytes = path.getTotalSpace(); in StorageVolumePreference()
99 usedBytes = totalBytes - freeBytes; in StorageVolumePreference()
103 final String total = Formatter.formatFileSize(context, totalBytes); in StorageVolumePreference()
105 if (totalBytes > 0) { in StorageVolumePreference()
106 mUsedPercent = (int) ((usedBytes * 100) / totalBytes); in StorageVolumePreference()
DPublicVolumeSettings.java168 final long totalBytes = file.getTotalSpace(); in update() local
170 final long usedBytes = totalBytes - freeBytes; in update()
176 Formatter.formatFileSize(context, totalBytes))); in update()
177 mSummary.setPercent(usedBytes, totalBytes); in update()
DStorageDashboardFragment.java143 long privateUsedBytes = mStorageInfo.totalBytes - mStorageInfo.freeBytes; in onReceivedSizes()
144 mSummaryController.updateBytes(privateUsedBytes, mStorageInfo.totalBytes); in onReceivedSizes()
147 mPreferenceController.setTotalSize(mStorageInfo.totalBytes); in onReceivedSizes()
152 userController.setTotalSize(mStorageInfo.totalBytes); in onReceivedSizes()
DTopLevelStoragePreferenceController.java52 double privateUsedBytes = info.totalBytes - info.freeBytes; in getSummary()
54 percentageFormat.format(privateUsedBytes / info.totalBytes), in getSummary()
DStorageSummaryPreference.java41 public void setPercent(long usedBytes, long totalBytes) { in setPercent() argument
42 mPercent = MathUtils.constrain((int) ((usedBytes * 100) / totalBytes), in setPercent()
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DAbstractPublicApiTest.java177 int totalBytes = 0; in runUntilProgress() local
186 totalBytes = cursor.getInt( in runUntilProgress()
192 numBytesReceivedSoFar + ", totalBytes: " + totalBytes); in runUntilProgress()
193 if (totalBytes == 0) { in runUntilProgress()
197 if (numBytesReceivedSoFar * 100 / totalBytes >= progress) { in runUntilProgress()
206 numBytesReceivedSoFar + ", totalBytes: " + totalBytes); in runUntilProgress()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/storage/
DCachedStorageValuesHelper.java73 final long totalBytes = mSharedPreferences.getLong(TOTAL_BYTES_KEY, -1); in getCachedPrivateStorageInfo() local
74 if (freeBytes < 0 || totalBytes < 0) { in getCachedPrivateStorageInfo()
78 return new PrivateStorageInfo(freeBytes, totalBytes); in getCachedPrivateStorageInfo()
139 .putLong(TOTAL_BYTES_KEY, storageInfo.totalBytes) in cacheResult()
146 .putLong(EXTERNAL_TOTAL_BYTES, result.externalStats.totalBytes) in cacheResult()
DStorageSummaryDonutPreference.java55 public void setPercent(long usedBytes, long totalBytes) { in setPercent() argument
56 if (totalBytes == 0) { in setPercent()
60 mPercent = usedBytes / (double) totalBytes; in setPercent()
/packages/apps/Settings/src/com/android/settings/deviceinfo/storage/
DCachedStorageValuesHelper.java73 final long totalBytes = mSharedPreferences.getLong(TOTAL_BYTES_KEY, -1); in getCachedPrivateStorageInfo() local
74 if (freeBytes < 0 || totalBytes < 0) { in getCachedPrivateStorageInfo()
78 return new PrivateStorageInfo(freeBytes, totalBytes); in getCachedPrivateStorageInfo()
139 .putLong(TOTAL_BYTES_KEY, storageInfo.totalBytes) in cacheResult()
146 .putLong(EXTERNAL_TOTAL_BYTES, result.externalStats.totalBytes) in cacheResult()
DStorageSummaryDonutPreference.java55 public void setPercent(long usedBytes, long totalBytes) { in setPercent() argument
56 if (totalBytes == 0) { in setPercent()
60 mPercent = usedBytes / (double) totalBytes; in setPercent()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/appinfo/
DAppDataUsagePreferenceController.java117 long totalBytes = 0; in getDataSummary() local
120 totalBytes += data.getTotalUsage(); in getDataSummary()
126 if (totalBytes == 0) { in getDataSummary()
130 Formatter.formatFileSize(mContext, totalBytes), in getDataSummary()
/packages/apps/Settings/src/com/android/settings/applications/appinfo/
DAppDataUsagePreferenceController.java117 long totalBytes = 0; in getDataSummary() local
120 totalBytes += data.getTotalUsage(); in getDataSummary()
126 if (totalBytes == 0) { in getDataSummary()
130 Formatter.formatFileSize(mContext, totalBytes), in getDataSummary()
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/
DDumpDatabaseAction.java65 int totalBytes = 0; in executeAction() local
74 totalBytes += bytesRead; in executeAction()
97 ", copy size: " + totalBytes); in executeAction()
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppTransferAdapter.java101 long totalBytes = cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES)); in bindView() local
111 Formatter.formatFileSize(mContext, totalBytes)); in bindView()
114 Formatter.formatFileSize(mContext, totalBytes)); in bindView()
DBluetoothOppShareInfo.java73 long totalBytes, long currentBytes, long timestamp, boolean mediaScanned) { in BluetoothOppShareInfo() argument
84 mTotalBytes = totalBytes; in BluetoothOppShareInfo()
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadInfo.java308 public int getRequiredNetworkType(long totalBytes) { in getRequiredNetworkType() argument
315 if (totalBytes > mSystemFacade.getMaxBytesOverMobile()) { in getRequiredNetworkType()
318 if (totalBytes > mSystemFacade.getRecommendedMaxBytesOverMobile() in getRequiredNetworkType()
376 public boolean isMeteredAllowed(long totalBytes) { in isMeteredAllowed() argument
377 return getRequiredNetworkType(totalBytes) != JobInfo.NETWORK_TYPE_UNMETERED; in isMeteredAllowed()
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DManageCachePage.java368 long totalBytes = mCacheStorageInfo.getTotalBytes(); in refreshCacheStorageInfo() local
374 if (totalBytes == 0) { in refreshCacheStorageInfo()
382 progressBar.setProgress((int) (usedBytes * PROGRESS_BAR_MAX / totalBytes)); in refreshCacheStorageInfo()
384 (int) (expectedBytes * PROGRESS_BAR_MAX / totalBytes)); in refreshCacheStorageInfo()
/packages/apps/Car/Settings/src/com/android/car/settings/storage/
DStorageSettingsManager.java98 long privateUsedBytes = mPrivateStorageInfo.totalBytes - mPrivateStorageInfo.freeBytes; in onReceivedSizes()
101 mPrivateStorageInfo.totalBytes); in onReceivedSizes()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/deviceinfo/
DStorageSlice.java101 final long usedBytes = info.totalBytes - info.freeBytes; in getStorageUsedText()
109 Formatter.formatShortFileSize(mContext, info.totalBytes)); in getStorageSummaryText()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/deviceinfo/
DStorageSlice.java101 final long usedBytes = info.totalBytes - info.freeBytes; in getStorageUsedText()
109 Formatter.formatShortFileSize(mContext, info.totalBytes)); in getStorageSummaryText()

123