Home
last modified time | relevance | path

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

12

/packages/apps/Settings/src/com/android/settings/deviceinfo/
DStorageVolumePreference.java51 public StorageVolumePreference(Context context, VolumeInfo volume, int color, long totalBytes) { in StorageVolumePreference() argument
73 if (totalBytes <= 0) { in StorageVolumePreference()
74 totalBytes = path.getTotalSpace(); in StorageVolumePreference()
77 final long usedBytes = totalBytes - freeBytes; in StorageVolumePreference()
80 final String total = Formatter.formatFileSize(context, totalBytes); in StorageVolumePreference()
82 if (totalBytes > 0) { in StorageVolumePreference()
83 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.java127 long privateUsedBytes = mStorageInfo.totalBytes - mStorageInfo.freeBytes; in onReceivedSizes()
128 mSummaryController.updateBytes(privateUsedBytes, mStorageInfo.totalBytes); in onReceivedSizes()
131 mPreferenceController.setTotalSize(mStorageInfo.totalBytes); in onReceivedSizes()
136 userController.setTotalSize(mStorageInfo.totalBytes); in onReceivedSizes()
DStorageSummaryPreference.java40 public void setPercent(long usedBytes, long totalBytes) { in setPercent() argument
41 mPercent = MathUtils.constrain((int) ((usedBytes * 100) / totalBytes), in setPercent()
DStorageSettings.java535 double privateUsedBytes = info.totalBytes - info.freeBytes; in updateSummary()
537 percentageFormat.format(privateUsedBytes / info.totalBytes), in updateSummary()
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DAbstractPublicApiTest.java176 int totalBytes = 0; in runUntilProgress() local
185 totalBytes = cursor.getInt( in runUntilProgress()
191 numBytesReceivedSoFar + ", totalBytes: " + totalBytes); in runUntilProgress()
192 if (totalBytes == 0) { in runUntilProgress()
196 if (numBytesReceivedSoFar * 100 / totalBytes >= progress) { in runUntilProgress()
205 numBytesReceivedSoFar + ", totalBytes: " + totalBytes); in runUntilProgress()
/packages/apps/Settings/src/com/android/settings/deviceinfo/storage/
DCachedStorageValuesHelper.java72 final long totalBytes = mSharedPreferences.getLong(TOTAL_BYTES_KEY, -1); in getCachedPrivateStorageInfo() local
73 if (freeBytes < 0 || totalBytes < 0) { in getCachedPrivateStorageInfo()
77 return new PrivateStorageInfo(freeBytes, totalBytes); in getCachedPrivateStorageInfo()
138 .putLong(TOTAL_BYTES_KEY, storageInfo.totalBytes) in cacheResult()
145 .putLong(EXTERNAL_TOTAL_BYTES, result.externalStats.totalBytes) in cacheResult()
DStorageSummaryDonutPreference.java63 public void setPercent(long usedBytes, long totalBytes) { in setPercent() argument
64 if (totalBytes == 0) { in setPercent()
68 mPercent = usedBytes / (double) totalBytes; in setPercent()
DStorageItemPreferenceController.java264 data.externalStats.totalBytes in onLoadFinished()
283 attributedSize += otherData.externalStats.totalBytes in onLoadFinished()
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadInfo.java303 public int getRequiredNetworkType(long totalBytes) { in getRequiredNetworkType() argument
310 if (totalBytes > mSystemFacade.getMaxBytesOverMobile()) { in getRequiredNetworkType()
313 if (totalBytes > mSystemFacade.getRecommendedMaxBytesOverMobile() in getRequiredNetworkType()
371 public boolean isMeteredAllowed(long totalBytes) { in isMeteredAllowed() argument
372 return getRequiredNetworkType(totalBytes) != JobInfo.NETWORK_TYPE_UNMETERED; in isMeteredAllowed()
DDownloadNotifier.java298 final long totalBytes = cursor.getLong(UpdateQuery.TOTAL_BYTES); in updateWithLocked() local
300 if (totalBytes != -1) { in updateWithLocked()
302 total += totalBytes; in updateWithLocked()
/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.java102 long totalBytes = cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES)); in bindView() local
112 mContext, totalBytes)); in bindView()
115 mContext, totalBytes)); in bindView()
DBluetoothOppShareInfo.java73 long totalBytes, long currentBytes, long timestamp, boolean mediaScanned) { in BluetoothOppShareInfo() argument
84 mTotalBytes = totalBytes; in BluetoothOppShareInfo()
DBluetoothOppUtility.java273 public static String formatProgressText(long totalBytes, long currentBytes) { in formatProgressText() argument
274 if (totalBytes <= 0) { in formatProgressText()
277 long progress = currentBytes * 100 / totalBytes; in formatProgressText()
/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/services/Car/evs/sampleDriver/
DbufferCopy.cpp78 const unsigned totalBytes = sizeY + sizeColor; in fillNV21FromNV21() local
81 memcpy(tgt, imgData, totalBytes); in fillNV21FromNV21()
/packages/apps/Settings/tests/unit/src/com/android/settings/deviceinfo/storage/
DStorageAsyncLoaderTest.java148 assertThat(result.get(PRIMARY_USER_ID).externalStats.totalBytes).isEqualTo(9L); in testMultipleUsers()
149 assertThat(result.get(SECONDARY_USER_ID).externalStats.totalBytes).isEqualTo(10L); in testMultipleUsers()
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/storage/
DCachedStorageValuesHelperTest.java100 assertThat(info.totalBytes).isEqualTo(6000L); in getCachedPrivateStorageInfo_cachedValuesAreLoaded()
135 assertThat(primaryResult.externalStats.totalBytes).isEqualTo(222222L); in getCachedAppsStorageResult_cachedValuesAreLoaded()
DVolumeSizesLoaderTest.java28 assertThat(storageInfo.totalBytes).isEqualTo(10000L); in getVolumeSize_getsValidSizes()
/packages/apps/Settings/src/com/android/settings/datausage/
DAppDataUsage.java301 final long totalBytes = backgroundBytes + foregroundBytes; in bindData() local
304 mTotalUsage.setSummary(Formatter.formatFileSize(context, totalBytes)); in bindData()
DDataUsageList.java308 final long totalBytes = entry != null ? entry.rxBytes + entry.txBytes : 0; in updateDetailData() local
309 final String totalPhrase = Formatter.formatFileSize(context, totalBytes); in updateDetailData()
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/
DStorageProfileFragmentTest.java72 assertThat(extractedResult.externalStats.totalBytes).isEqualTo(6); in verifyAppSizesAreNotZeroedOut()
/packages/apps/TV/src/com/android/tv/tuner/tvinput/
DTunerRecordingSessionWorker.java589 long totalBytes, long startTime, long endTime) { in insertRecordedProgram() argument
596 .setDataBytes(totalBytes) in insertRecordedProgram()
/packages/apps/StorageManager/src/com/android/storagemanager/automatic/
DAutomaticStorageManagementJobService.java124 long lowStorageThreshold = (info.totalBytes * DEFAULT_LOW_FREE_PERCENT) / 100; in volumeNeedsManagement()

12