Home
last modified time | relevance | path

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

/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.java121 long privateUsedBytes = mStorageInfo.totalBytes - mStorageInfo.freeBytes; in onReceivedSizes()
122 mSummaryController.updateBytes(privateUsedBytes, mStorageInfo.totalBytes); in onReceivedSizes()
125 mPreferenceController.setTotalSize(mStorageInfo.totalBytes); in onReceivedSizes()
130 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/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/Settings/src/com/android/settings/deviceinfo/storage/
DStorageSummaryDonutPreference.java62 public void setPercent(long usedBytes, long totalBytes) { in setPercent() argument
63 if (totalBytes == 0) { in setPercent()
67 mPercent = MathUtils.constrain((int) ((usedBytes * 100) / totalBytes), in setPercent()
DStorageItemPreferenceController.java257 data.externalStats.totalBytes in onLoadFinished()
274 attributedSize += otherData.externalStats.totalBytes in onLoadFinished()
DUserProfileController.java100 result.externalStats.totalBytes in handleResult()
DSecondaryUserController.java162 setSize(result.externalStats.totalBytes); in handleResult()
/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/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/src/com/android/settings/datausage/
DAppDataUsage.java306 final long totalBytes = backgroundBytes + foregroundBytes; in bindData() local
309 mTotalUsage.setSummary(Formatter.formatFileSize(context, totalBytes)); in bindData()
DDataUsageList.java307 final long totalBytes = entry != null ? entry.rxBytes + entry.txBytes : 0; in updateDetailData() local
308 final String totalPhrase = Formatter.formatFileSize(context, totalBytes); in updateDetailData()
/packages/apps/TV/src/com/android/tv/tuner/tvinput/
DTunerRecordingSessionWorker.java531 long totalBytes, long startTime, long endTime) { in insertRecordedProgram() argument
538 .setDataBytes(totalBytes) in insertRecordedProgram()
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/storage/
DVolumeSizesLoaderTest.java28 assertThat(storageInfo.totalBytes).isEqualTo(10000L); in getVolumeSize_getsValidSizes()
/packages/apps/StorageManager/src/com/android/storagemanager/automatic/
DAutomaticStorageManagementJobService.java113 long lowStorageThreshold = (info.totalBytes * DEFAULT_LOW_FREE_PERCENT) / 100; in volumeNeedsManagement()
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/
DStorageProfileFragmentTest.java72 assertThat(extractedResult.externalStats.totalBytes).isEqualTo(6); in verifyAppSizesAreNotZeroedOut()
/packages/apps/Settings/src/com/android/settings/applications/
DInstalledAppDetails.java789 long totalBytes = mChartData.detail.getTotalBytes(); in getDataSummary() local
790 if (totalBytes == 0) { in getDataSummary()
795 Formatter.formatFileSize(context, totalBytes), in getDataSummary()