Home
last modified time | relevance | path

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

123456

/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/
DAppStateNotificationBridge.java85 NotificationsSentState stats = in loadAllExtraInfo() local
87 calculateAvgSentCounts(stats); in loadAllExtraInfo()
88 addBlockStatus(entry, stats); in loadAllExtraInfo()
89 entry.extraInfo = stats; in loadAllExtraInfo()
95 NotificationsSentState stats = getAggregatedUsageEvents( in updateExtraInfo() local
97 calculateAvgSentCounts(stats); in updateExtraInfo()
98 addBlockStatus(entry, stats); in updateExtraInfo()
99 entry.extraInfo = stats; in updateExtraInfo()
120 private void addBlockStatus(AppEntry entry, NotificationsSentState stats) { in addBlockStatus() argument
121 if (stats != null) { in addBlockStatus()
[all …]
/packages/apps/Settings/src/com/android/settings/applications/
DAppStateNotificationBridge.java85 NotificationsSentState stats = in loadAllExtraInfo() local
87 calculateAvgSentCounts(stats); in loadAllExtraInfo()
88 addBlockStatus(entry, stats); in loadAllExtraInfo()
89 entry.extraInfo = stats; in loadAllExtraInfo()
95 NotificationsSentState stats = getAggregatedUsageEvents( in updateExtraInfo() local
97 calculateAvgSentCounts(stats); in updateExtraInfo()
98 addBlockStatus(entry, stats); in updateExtraInfo()
99 entry.extraInfo = stats; in updateExtraInfo()
122 private void addBlockStatus(AppEntry entry, NotificationsSentState stats) { in addBlockStatus() argument
123 if (stats != null) { in addBlockStatus()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/storage/
DAppStorageSettingsDetailsFragmentTest.java166 StorageStats stats = new StorageStats(); in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache() local
167 stats.codeBytes = 100; in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
168 stats.dataBytes = 50; in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
169 stats.cacheBytes = 0; in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
171 new StorageStatsSource.AppStorageStatsImpl(stats); in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
189 StorageStats stats = new StorageStats(); in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache() local
190 stats.codeBytes = 100; in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
191 stats.dataBytes = 50; in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
192 stats.cacheBytes = 10; in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
194 new StorageStatsSource.AppStorageStatsImpl(stats); in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
[all …]
DAppsStorageStatsManagerTest.java83 StorageStats stats = new StorageStats(); in callback_onLoadFinished_listenerOnDataLoadedCalled() local
85 new StorageStatsSource.AppStorageStatsImpl(stats); in callback_onLoadFinished_listenerOnDataLoadedCalled()
98 StorageStats stats = new StorageStats(); in callback_unregisterListener_onlyOneListenerOnDataLoadedCalled() local
100 new StorageStatsSource.AppStorageStatsImpl(stats); in callback_unregisterListener_onlyOneListenerOnDataLoadedCalled()
113 StorageStats stats = new StorageStats(); in callback_notLoaded_listenerOnDataLoadedCalled() local
115 new StorageStatsSource.AppStorageStatsImpl(stats); in callback_notLoaded_listenerOnDataLoadedCalled()
130 StorageStats stats = new StorageStats(); in callback_cachedCleared_listenerOnDataLoadedCalled() local
132 new StorageStatsSource.AppStorageStatsImpl(stats); in callback_cachedCleared_listenerOnDataLoadedCalled()
147 StorageStats stats = new StorageStats(); in callback_userDataCleared_listenerOnDataLoadedCalled() local
149 new StorageStatsSource.AppStorageStatsImpl(stats); in callback_userDataCleared_listenerOnDataLoadedCalled()
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/
DAppStateUsageStatsBridgeTest.java103 UsageStatsState stats = (UsageStatsState) app.extraInfo; in test_appInstalledSameDayNeverUsed_isInvalid() local
106 assertThat(stats.daysSinceFirstInstall).isEqualTo(0); in test_appInstalledSameDayNeverUsed_isInvalid()
107 assertThat(stats.daysSinceLastUse).isEqualTo(AppStateUsageStatsBridge.NEVER_USED); in test_appInstalledSameDayNeverUsed_isInvalid()
117 UsageStatsState stats = (UsageStatsState) app.extraInfo; in test_noThresholdFilter_appInstalledSameDayNeverUsed_isValid() local
120 assertThat(stats.daysSinceFirstInstall).isEqualTo(0); in test_noThresholdFilter_appInstalledSameDayNeverUsed_isValid()
121 assertThat(stats.daysSinceLastUse).isEqualTo(AppStateUsageStatsBridge.NEVER_USED); in test_noThresholdFilter_appInstalledSameDayNeverUsed_isValid()
131 UsageStatsState stats = (UsageStatsState) app.extraInfo; in test_unusedApp_isValid() local
134 assertThat(stats.daysSinceFirstInstall).isEqualTo(90); in test_unusedApp_isValid()
135 assertThat(stats.daysSinceLastUse).isEqualTo(AppStateUsageStatsBridge.NEVER_USED); in test_unusedApp_isValid()
145 UsageStatsState stats = (UsageStatsState) app.extraInfo; in test_noThresholdFilter_unusedApp_isValid() local
[all …]
/packages/services/Car/car-lib/src/android/car/storagemonitoring/
DIoStats.java56 public IoStats(List<IoStatsEntry> stats, long timestamp) { in IoStats() argument
57 mStats = stats; in IoStats()
117 for (IoStatsEntry stats : getStats()) { in getUserIdStats()
118 if (stats.uid == uid) { in getUserIdStats()
119 return stats; in getUserIdStats()
133 for (IoStatsEntry stats : getStats()) { in getForegroundTotals()
134 bytesRead += stats.foreground.bytesRead; in getForegroundTotals()
135 bytesWritten += stats.foreground.bytesWritten; in getForegroundTotals()
136 bytesReadFromStorage += stats.foreground.bytesReadFromStorage; in getForegroundTotals()
137 bytesWrittenToStorage += stats.foreground.bytesWrittenToStorage; in getForegroundTotals()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DRecentAppStatsMixinTest.java94 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp() local
98 stats.add(stat1); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp()
105 .thenReturn(stats); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp()
115 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() local
121 stats.add(stat1); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
125 stats.add(stat2); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
129 stats.add(stat3); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
140 .thenReturn(stats); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
150 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() local
156 stats.add(stat1); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp()
[all …]
DFetchPackageStorageAsyncLoaderTest.java61 AppStorageStats stats = mock(AppStorageStats.class); in worksForValidPackageNameAndUid() local
62 when(stats.getCodeBytes()).thenReturn(1L); in worksForValidPackageNameAndUid()
63 when(stats.getDataBytes()).thenReturn(2L); in worksForValidPackageNameAndUid()
64 when(stats.getCacheBytes()).thenReturn(3L); in worksForValidPackageNameAndUid()
67 .thenReturn(stats); in worksForValidPackageNameAndUid()
73 assertThat(task.loadInBackground()).isEqualTo(stats); in worksForValidPackageNameAndUid()
DRecentAppsPreferenceControllerTest.java127 final List<UsageStats> stats = new ArrayList<>(); in onReloadDataCompleted_threeValidRecentOpenAppsSet_setAppEntityThreeTime() local
133 stats.add(stat1); in onReloadDataCompleted_threeValidRecentOpenAppsSet_setAppEntityThreeTime()
137 stats.add(stat2); in onReloadDataCompleted_threeValidRecentOpenAppsSet_setAppEntityThreeTime()
141 stats.add(stat3); in onReloadDataCompleted_threeValidRecentOpenAppsSet_setAppEntityThreeTime()
150 mController.onReloadDataCompleted(stats); in onReloadDataCompleted_threeValidRecentOpenAppsSet_setAppEntityThreeTime()
160 final List<UsageStats> stats = new ArrayList<>(); in onReloadDataCompleted_noRecentOpenAppsSet_shouldHideRecentAppPreference() local
162 mController.onReloadDataCompleted(stats); in onReloadDataCompleted_noRecentOpenAppsSet_shouldHideRecentAppPreference()
DAllAppsInfoPreferenceControllerTest.java70 final List<UsageStats> stats = new ArrayList<>(); in onReloadDataCompleted_recentAppsSet_hidePreference() local
74 stats.add(stat1); in onReloadDataCompleted_recentAppsSet_hidePreference()
76 mController.onReloadDataCompleted(stats); in onReloadDataCompleted_recentAppsSet_hidePreference()
83 final List<UsageStats> stats = new ArrayList<>(); in onReloadDataCompleted_noRecentAppSet_showPreference() local
85 mController.onReloadDataCompleted(stats); in onReloadDataCompleted_noRecentAppSet_showPreference()
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/apps/
DRecentAppsPreferenceControllerTest.java140 final List<UsageStats> stats = new ArrayList<>(); in display_showRecents() local
146 stats.add(stat1); in display_showRecents()
150 stats.add(stat2); in display_showRecents()
154 stats.add(stat3); in display_showRecents()
166 .thenReturn(stats); in display_showRecents()
179 final List<UsageStats> stats = new ArrayList<>(); in display_showRecentsWithInstantApp() local
183 stats.add(stat1); in display_showRecentsWithInstantApp()
189 stats.add(stat2); in display_showRecentsWithInstantApp()
204 .thenReturn(stats); in display_showRecentsWithInstantApp()
221 final List<UsageStats> stats = new ArrayList<>(); in display_showRecentsWithNullAppEntryOrInfo() local
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/
DBatteryInfo.java166 final BatteryStats stats; in getBatteryInfo() local
172 stats = localStatsHelper.getStats(); in getBatteryInfo()
174 stats = statsHelper.getStats(); in getBatteryInfo()
196 return BatteryInfo.getBatteryInfo(context, batteryBroadcast, stats, in getBatteryInfo()
201 ? stats.computeBatteryTimeRemaining(elapsedRealtimeUs) : 0; in getBatteryInfo()
207 return BatteryInfo.getBatteryInfo(context, batteryBroadcast, stats, in getBatteryInfo()
213 BatteryStats stats, long elapsedRealtimeUs, boolean shortString) { in getBatteryInfoOld() argument
215 PowerUtil.convertUsToMs(stats.computeBatteryTimeRemaining(elapsedRealtimeUs)), in getBatteryInfoOld()
218 return getBatteryInfo(context, batteryBroadcast, stats, estimate, elapsedRealtimeUs, in getBatteryInfoOld()
224 BatteryStats stats, Estimate estimate, long elapsedRealtimeUs, boolean shortString) { in getBatteryInfo() argument
[all …]
DBatteryAppListPreferenceController.java180 final BatteryStats stats = statsHelper.getStats(); in refreshAppListGroup() local
184 : stats != null ? stats.getDischargeAmount(STATS_TYPE) : 0; in refreshAppListGroup()
409 ArrayList<BatterySipper> stats = new ArrayList<>(); in getFakeStats() local
415 stats.add(new BatterySipper(type, null, use)); in getFakeStats()
419 stats.add(new BatterySipper(DrainType.APP, in getFakeStats()
422 stats.add(new BatterySipper(DrainType.APP, in getFakeStats()
429 stats.add(sipper); in getFakeStats()
434 stats.add(sipper); in getFakeStats()
438 stats.add(sipper); in getFakeStats()
440 return stats; in getFakeStats()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryInfo.java168 final BatteryStats stats; in getBatteryInfo() local
174 stats = localStatsHelper.getStats(); in getBatteryInfo()
176 stats = statsHelper.getStats(); in getBatteryInfo()
199 return BatteryInfo.getBatteryInfo(context, batteryBroadcast, stats, in getBatteryInfo()
204 ? stats.computeBatteryTimeRemaining(elapsedRealtimeUs) : 0; in getBatteryInfo()
210 return BatteryInfo.getBatteryInfo(context, batteryBroadcast, stats, in getBatteryInfo()
216 BatteryStats stats, long elapsedRealtimeUs, boolean shortString) { in getBatteryInfoOld() argument
218 PowerUtil.convertUsToMs(stats.computeBatteryTimeRemaining(elapsedRealtimeUs)), in getBatteryInfoOld()
221 return getBatteryInfo(context, batteryBroadcast, stats, estimate, elapsedRealtimeUs, in getBatteryInfoOld()
227 BatteryStats stats, Estimate estimate, long elapsedRealtimeUs, boolean shortString) { in getBatteryInfo() argument
[all …]
DBatteryAppListPreferenceController.java180 final BatteryStats stats = statsHelper.getStats(); in refreshAppListGroup() local
184 : stats != null ? stats.getDischargeAmount(STATS_TYPE) : 0; in refreshAppListGroup()
404 ArrayList<BatterySipper> stats = new ArrayList<>(); in getFakeStats() local
410 stats.add(new BatterySipper(type, null, use)); in getFakeStats()
414 stats.add(new BatterySipper(DrainType.APP, in getFakeStats()
417 stats.add(new BatterySipper(DrainType.APP, in getFakeStats()
424 stats.add(sipper); in getFakeStats()
429 stats.add(sipper); in getFakeStats()
433 stats.add(sipper); in getFakeStats()
435 return stats; in getFakeStats()
/packages/modules/ExtServices/tests/src/android/ext/services/notification/
DAssistantTest.java171 NotificationStats stats = new NotificationStats(); in dismissBadNotification() local
172 stats.setDismissalSurface(NotificationStats.DISMISSAL_SHADE); in dismissBadNotification()
173 stats.setSeen(); in dismissBadNotification()
175 sbn, mock(RankingMap.class), stats, NotificationListenerService.REASON_CANCEL); in dismissBadNotification()
222 NotificationStats stats = new NotificationStats(); in testGroupChildCanTriggerAdjustment() local
223 stats.setDismissalSurface(NotificationStats.DISMISSAL_SHADE); in testGroupChildCanTriggerAdjustment()
224 stats.setSeen(); in testGroupChildCanTriggerAdjustment()
227 sbn, mock(RankingMap.class), stats, NotificationListenerService.REASON_CANCEL); in testGroupChildCanTriggerAdjustment()
246 NotificationStats stats = new NotificationStats(); in testGroupSummaryCannotTriggerAdjustment() local
247 stats.setDismissalSurface(NotificationStats.DISMISSAL_SHADE); in testGroupSummaryCannotTriggerAdjustment()
[all …]
/packages/modules/NetworkStack/src/com/android/networkstack/metrics/
DDataStallStatsUtils.java58 public static void write(@NonNull final DataStallDetectionStats stats, in write() argument
62 Log.d(TAG, "write: " + stats + " with result: " + validationResult in write()
63 + ", dns: " + HexDump.toHexString(stats.mDns)); in write()
66 stats.mEvaluationType, in write()
68 stats.mNetworkType, in write()
69 stats.mWifiInfo, in write()
70 stats.mCellularInfo, in write()
71 stats.mDns); in write()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/
DNotificationBackend.java377 NotificationsSentState stats = appRow.sentByChannel.get(channelId); in recordAggregatedUsageEvents() local
378 if (stats == null) { in recordAggregatedUsageEvents()
379 stats = new NotificationsSentState(); in recordAggregatedUsageEvents()
380 appRow.sentByChannel.put(channelId, stats); in recordAggregatedUsageEvents()
382 if (event.getTimeStamp() > stats.lastSent) { in recordAggregatedUsageEvents()
383 stats.lastSent = event.getTimeStamp(); in recordAggregatedUsageEvents()
386 stats.sentCount++; in recordAggregatedUsageEvents()
388 calculateAvgSentCounts(stats); in recordAggregatedUsageEvents()
416 private void calculateAvgSentCounts(NotificationsSentState stats) { in calculateAvgSentCounts() argument
417 if (stats != null) { in calculateAvgSentCounts()
[all …]
/packages/apps/Settings/src/com/android/settings/notification/
DNotificationBackend.java394 NotificationsSentState stats = appRow.sentByChannel.get(channelId); in recordAggregatedUsageEvents() local
395 if (stats == null) { in recordAggregatedUsageEvents()
396 stats = new NotificationsSentState(); in recordAggregatedUsageEvents()
397 appRow.sentByChannel.put(channelId, stats); in recordAggregatedUsageEvents()
399 if (event.getTimeStamp() > stats.lastSent) { in recordAggregatedUsageEvents()
400 stats.lastSent = event.getTimeStamp(); in recordAggregatedUsageEvents()
403 stats.sentCount++; in recordAggregatedUsageEvents()
405 calculateAvgSentCounts(stats); in recordAggregatedUsageEvents()
435 private void calculateAvgSentCounts(NotificationsSentState stats) { in calculateAvgSentCounts() argument
436 if (stats != null) { in calculateAvgSentCounts()
[all …]
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/logging/
DStatsLogCompatManager.java21 import android.stats.launcher.nano.LauncherExtension;
22 import android.stats.launcher.nano.LauncherTarget;
24 import static android.stats.launcher.nano.Launcher.ALLAPPS;
25 import static android.stats.launcher.nano.Launcher.HOME;
26 import static android.stats.launcher.nano.Launcher.LAUNCH_APP;
27 import static android.stats.launcher.nano.Launcher.LAUNCH_TASK;
28 import static android.stats.launcher.nano.Launcher.BACKGROUND;
29 import static android.stats.launcher.nano.Launcher.OVERVIEW;
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DAppStoragePreferenceControllerTest.java104 final StorageStatsSource.AppStorageStats stats = in getStorageSummary_shouldWorkForExternal() local
106 when(stats.getTotalBytes()).thenReturn(1L); in getStorageSummary_shouldWorkForExternal()
108 assertThat(mController.getStorageSummary(stats, true)) in getStorageSummary_shouldWorkForExternal()
114 final StorageStatsSource.AppStorageStats stats = in getStorageSummary_shouldWorkForInternal() local
116 when(stats.getTotalBytes()).thenReturn(1L); in getStorageSummary_shouldWorkForInternal()
118 assertThat(mController.getStorageSummary(stats, false)) in getStorageSummary_shouldWorkForInternal()
/packages/apps/Settings/src/com/android/settings/deviceinfo/storage/
DVolumeSizesLoader.java39 StorageStatsManager stats, in VolumeSizesLoader() argument
43 mStats = stats; in VolumeSizesLoader()
63 StorageVolumeProvider storageVolumeProvider, StorageStatsManager stats, VolumeInfo info) in getVolumeSize() argument
65 long privateTotalBytes = storageVolumeProvider.getTotalBytes(stats, info); in getVolumeSize()
66 long privateFreeBytes = storageVolumeProvider.getFreeBytes(stats, info); in getVolumeSize()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/storage/
DVolumeSizesLoader.java39 StorageStatsManager stats, in VolumeSizesLoader() argument
43 mStats = stats; in VolumeSizesLoader()
63 StorageVolumeProvider storageVolumeProvider, StorageStatsManager stats, VolumeInfo info) in getVolumeSize() argument
65 long privateTotalBytes = storageVolumeProvider.getTotalBytes(stats, info); in getVolumeSize()
66 long privateFreeBytes = storageVolumeProvider.getFreeBytes(stats, info); in getVolumeSize()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/storagelifetime/
DStorageLifetimeFragment.java92 .mapToLong(stats -> stats.foreground.bytesWrittenToStorage +
93 stats.background.bytesWrittenToStorage)
96 .mapToLong(stats -> stats.foreground.fsyncCalls +
97 stats.background.fsyncCalls)
/packages/apps/Car/Launcher/src/com/android/car/carlauncher/
DAppGridActivity.java215 List<UsageStats> stats = in getMostRecentApps() local
221 if (stats == null || stats.size() == 0) { in getMostRecentApps()
225 stats.sort(new LastTimeUsedComparator()); in getMostRecentApps()
229 int statsSize = stats.size(); in getMostRecentApps()
232 UsageStats usageStats = stats.get(currentIndex); in getMostRecentApps()

123456