Home
last modified time | relevance | path

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

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/
DBatteryDiffEntryTest.java99 BatteryDiffEntry.clearCache(); in setUp()
104 final BatteryDiffEntry entry = in testSetTotalConsumePower_returnExpectedResult()
105 new BatteryDiffEntry( in testSetTotalConsumePower_returnExpectedResult()
131 final BatteryDiffEntry entry = in testSetTotalConsumePower_setZeroValue_returnsZeroValue()
132 new BatteryDiffEntry( in testSetTotalConsumePower_setZeroValue_returnsZeroValue()
158 final List<BatteryDiffEntry> entryList = new ArrayList<>(); in testComparator_sortCollectionsInDescOrder()
160 BatteryDiffEntry systemAppsBatteryDiffEntry = in testComparator_sortCollectionsInDescOrder()
161 new BatteryDiffEntry( in testComparator_sortCollectionsInDescOrder()
165 /* key= */ BatteryDiffEntry.SYSTEM_APPS_KEY, in testComparator_sortCollectionsInDescOrder()
169 /* legacyLabel= */ BatteryDiffEntry.SYSTEM_APPS_KEY, in testComparator_sortCollectionsInDescOrder()
[all …]
DBatteryDiffDataTest.java62 final BatteryDiffEntry hiddenDiffEntry = in needsCombineInSystemApp_isHidden_returnTrue()
74 final BatteryDiffEntry batteryDiffEntry = in needsCombineInSystemApp_isSystemApp_returnTrue()
92 final BatteryDiffEntry batteryDiffEntry = in needsCombineInSystemApp_notSystemApp_returnFalse()
107 List<BatteryDiffEntry> batteryDiffEntries = new ArrayList<>(); in processPercentsAndSort_sumLessThan100_adjustTo100()
127 List<BatteryDiffEntry> batteryDiffEntries = new ArrayList<>(); in processPercentsAndSort_sumGreaterThan100_adjustTo100()
147 List<BatteryDiffEntry> batteryDiffEntries = new ArrayList<>(); in processPercentsAndSort_uninstalledApps_sortAsExpected()
152 mContext, /* consumePower= */ 20, BatteryDiffEntry.UNINSTALLED_APPS_KEY)); in processPercentsAndSort_uninstalledApps_sortAsExpected()
157 mContext, /* consumePower= */ 28.5, BatteryDiffEntry.SYSTEM_APPS_KEY)); in processPercentsAndSort_uninstalledApps_sortAsExpected()
167 .isEqualTo(BatteryDiffEntry.UNINSTALLED_APPS_KEY); in processPercentsAndSort_uninstalledApps_sortAsExpected()
168 assertThat(batteryDiffEntries.get(4).getKey()).isEqualTo(BatteryDiffEntry.SYSTEM_APPS_KEY); in processPercentsAndSort_uninstalledApps_sortAsExpected()
[all …]
DBatteryUsageBreakdownControllerTest.java71 private BatteryDiffEntry mBatteryDiffEntry;
93 new BatteryDiffEntry( in setUp()
126 BatteryDiffEntry.clearCache(); in setUp()
128 BatteryDiffEntry.sResourceCache.put( in setUp()
275 final BatteryDiffEntry batteryDiffEntry = in setPreferencePercent_lessThanThreshold_expectedFormat()
297 final BatteryDiffEntry batteryDiffEntry = in setPreferencePercent_greaterThanThreshold_expectedFormat()
445 private BatteryDiffEntry createBatteryDiffEntry( in createBatteryDiffEntry()
460 return new BatteryDiffEntry( in createBatteryDiffEntry()
DBatteryUsageBroadcastReceiverTest.java240 BatteryDiffEntry.sValidForRestriction.put( in onReceive_clearCacheIntentInDebugMode_clearBatteryCacheData()
242 assertThat(BatteryDiffEntry.sValidForRestriction).isNotEmpty(); in onReceive_clearCacheIntentInDebugMode_clearBatteryCacheData()
248 assertThat(BatteryDiffEntry.sValidForRestriction).isEmpty(); in onReceive_clearCacheIntentInDebugMode_clearBatteryCacheData()
256 BatteryDiffEntry.sValidForRestriction.put( in onReceive_clearCacheIntentInNotDebugMode_notClearBatteryCacheData()
258 assertThat(BatteryDiffEntry.sValidForRestriction).isNotEmpty(); in onReceive_clearCacheIntentInNotDebugMode_notClearBatteryCacheData()
264 assertThat(BatteryDiffEntry.sValidForRestriction).isNotEmpty(); in onReceive_clearCacheIntentInNotDebugMode_notClearBatteryCacheData()
DBatteryChartPreferenceControllerTest.java116 BatteryDiffEntry.clearCache(); in setUp()
118 BatteryDiffEntry.sResourceCache.put( in setUp()
132 assertThat(BatteryDiffEntry.sResourceCache).hasSize(1); in onDestroy_activityIsChanging_clearBatteryEntryCache()
135 assertThat(BatteryDiffEntry.sResourceCache).isEmpty(); in onDestroy_activityIsChanging_clearBatteryEntryCache()
142 assertThat(BatteryDiffEntry.sResourceCache).hasSize(1); in onDestroy_activityIsNotChanging_notClearBatteryEntryCache()
145 assertThat(BatteryDiffEntry.sResourceCache).isNotEmpty(); in onDestroy_activityIsNotChanging_notClearBatteryEntryCache()
DBatteryTipsControllerTest.java161 eventWrapper.setRelatedBatteryDiffEntry(new BatteryDiffEntry(mContext, "", "Chrome", 0)); in handleBatteryTipsCardUpdated_appAnomaly_showAnomaly()
DBatteryTipsCardPreferenceTest.java69 @Mock private BatteryDiffEntry mFakeEntry;
DConvertUtilsTest.java365 final BatteryDiffEntry batteryDiffEntry = in convertToBatteryUsageDiff_returnsExpectedResult()
366 new BatteryDiffEntry( in convertToBatteryUsageDiff_returnsExpectedResult()
DDataProcessorTest.java1587 final BatteryDiffEntry resultEntry = resultDiffData.getAppDiffEntryList().get(0); in generateBatteryUsageMap_usageTimeExceed_returnsExpectedResult()
1891 BatteryDiffEntry resultEntry = resultDiffData.getAppDiffEntryList().get(0); in generateBatteryUsageMap_hideBackgroundUsageTime_returnsExpectedResult()
2524 final BatteryDiffEntry entry, in assertBatteryDiffEntry()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/
DBatteryDiffData.java44 private final List<BatteryDiffEntry> mAppEntries;
45 private final List<BatteryDiffEntry> mSystemEntries;
55 final @NonNull List<BatteryDiffEntry> appDiffEntries, in BatteryDiffData()
56 final @NonNull List<BatteryDiffEntry> systemDiffEntries, in BatteryDiffData()
103 public List<BatteryDiffEntry> getAppDiffEntryList() { in getAppDiffEntryList()
107 List<BatteryDiffEntry> getSystemDiffEntryList() { in getSystemDiffEntryList()
144 final PowerUsageFeatureProvider featureProvider, final List<BatteryDiffEntry> entries) { in purgeBatteryDiffData()
153 final Iterator<BatteryDiffEntry> iterator = entries.iterator(); in purgeBatteryDiffData()
155 final BatteryDiffEntry entry = iterator.next(); in purgeBatteryDiffData()
181 final @NonNull List<BatteryDiffEntry> appEntries) { in combineIntoSystemApps()
[all …]
DBatteryUsageBreakdownController.java70 private static final List<BatteryDiffEntry> EMPTY_ENTRY_LIST = new ArrayList<>();
120 BatteryDiffEntry.clearCache(); in onResume()
143 private boolean isAnomalyBatteryDiffEntry(BatteryDiffEntry entry) { in isAnomalyBatteryDiffEntry()
149 private void logPreferenceClickedMetrics(BatteryDiffEntry entry) { in logPreferenceClickedMetrics()
177 final BatteryDiffEntry diffEntry = powerPref.getBatteryDiffEntry(); in handlePreferenceTreeClick()
332 private List<BatteryDiffEntry> getBatteryDiffEntries() { in getBatteryDiffEntries()
347 final List<BatteryDiffEntry> entries = getBatteryDiffEntries(); in addAllPreferences()
349 for (BatteryDiffEntry entry : entries) { in addAllPreferences()
395 List<BatteryDiffEntry> entries = getBatteryDiffEntries(); in removeAndCacheAllUnusedPreferences()
413 void setPreferencePercentage(PowerGaugePreference preference, BatteryDiffEntry entry) { in setPreferencePercentage()
[all …]
DBatteryDiffEntry.java43 public class BatteryDiffEntry { class
65 static final Comparator<BatteryDiffEntry> COMPARATOR =
118 public BatteryDiffEntry( in BatteryDiffEntry() method in BatteryDiffEntry
158 public BatteryDiffEntry(Context context, String key, String legacyLabel, int consumerType) { in BatteryDiffEntry() method in BatteryDiffEntry
227 public BatteryDiffEntry clone() { in clone()
228 return new BatteryDiffEntry( in clone()
DPowerGaugePreference.java50 private BatteryDiffEntry mBatteryDiffEntry;
122 public void setBatteryDiffEntry(BatteryDiffEntry entry) { in setBatteryDiffEntry()
130 BatteryDiffEntry getBatteryDiffEntry() { in getBatteryDiffEntry()
DDataProcessor.java628 final List<BatteryDiffEntry> appEntries = new ArrayList<>(); in generateBatteryDiffData()
629 final List<BatteryDiffEntry> systemEntries = new ArrayList<>(); in generateBatteryDiffData()
652 final BatteryDiffEntry currentBatteryDiffEntry = in generateBatteryDiffData()
653 new BatteryDiffEntry( in generateBatteryDiffData()
1346 final List<BatteryDiffEntry> appEntries = new ArrayList<>(); in insertHourlyUsageDiffDataPerSlot()
1347 final List<BatteryDiffEntry> systemEntries = new ArrayList<>(); in insertHourlyUsageDiffDataPerSlot()
1497 final BatteryDiffEntry currentBatteryDiffEntry = in insertHourlyUsageDiffDataPerSlot()
1498 new BatteryDiffEntry( in insertHourlyUsageDiffDataPerSlot()
1590 final Map<String, BatteryDiffEntry> diffEntryMap = new ArrayMap<>(); in getAccumulatedUsageDiffData()
1591 final List<BatteryDiffEntry> appEntries = new ArrayList<>(); in getAccumulatedUsageDiffData()
[all …]
DConvertUtils.java512 final BatteryDiffEntry batteryDiffEntry, in convertToBatteryUsageDiff()
565 for (BatteryDiffEntry batteryDiffEntry : batteryDiffData.getAppDiffEntryList()) { in convertToBatteryUsageSlot()
568 for (BatteryDiffEntry batteryDiffEntry : batteryDiffData.getSystemDiffEntryList()) { in convertToBatteryUsageSlot()
575 private static BatteryDiffEntry convertToBatteryDiffEntry( in convertToBatteryDiffEntry()
577 return new BatteryDiffEntry( in convertToBatteryDiffEntry()
603 final List<BatteryDiffEntry> appDiffEntries = new ArrayList<>(); in convertToBatteryDiffData()
604 final List<BatteryDiffEntry> systemDiffEntries = new ArrayList<>(); in convertToBatteryDiffData()
DBatteryChartPreferenceController.java160 BatteryDiffEntry.clearCache(); in onDestroy()
554 public static List<BatteryDiffEntry> getAppBatteryUsageData(Context context) {
589 public static BatteryDiffEntry getAppBatteryUsageData(
594 final List<BatteryDiffEntry> entries = getAppBatteryUsageData(context);
598 for (BatteryDiffEntry entry : entries) {
DPowerUsageAdvanced.java366 BatteryDiffEntry findRelatedBatteryDiffEntry(AnomalyEventWrapper eventWrapper) { in findRelatedBatteryDiffEntry()
385 for (BatteryDiffEntry entry : relatedDiffData.getAppDiffEntryList()) { in findRelatedBatteryDiffEntry()
418 for (final BatteryDiffEntry entry : allBatteryDiffData.getAppDiffEntryList()) { in logScreenUsageTime()
DAnomalyEventWrapper.java45 private BatteryDiffEntry mRelatedBatteryDiffEntry = null;
94 void setRelatedBatteryDiffEntry(BatteryDiffEntry batteryDiffEntry) { in setRelatedBatteryDiffEntry()
DBatteryUsageBroadcastReceiver.java100 BatteryDiffEntry.clearCache(); in onReceive()
/packages/apps/Settings/src/com/android/settings/applications/appinfo/
DAppBatteryPreferenceController.java42 import com.android.settings.fuelgauge.batteryusage.BatteryDiffEntry;
69 BatteryDiffEntry mBatteryDiffEntry;
169 new AsyncTask<Void, Void, BatteryDiffEntry>() { in loadBatteryDiffEntries()
171 protected BatteryDiffEntry doInBackground(Void... unused) { in loadBatteryDiffEntries()
175 final BatteryDiffEntry entry = in loadBatteryDiffEntries()
183 protected void onPostExecute(BatteryDiffEntry batteryDiffEntry) { in loadBatteryDiffEntries()
/packages/apps/Settings/src/com/android/settings/spa/app/appinfo/
DAppBatteryPreference.kt39 import com.android.settings.fuelgauge.batteryusage.BatteryDiffEntry in <lambda>()
66 private var batteryDiffEntryState: LoadingState<BatteryDiffEntry?>
85 private suspend fun getBatteryDiffEntry(): BatteryDiffEntry? = withContext(Dispatchers.IO) { in <lambda>()
106 private fun BatteryDiffEntry?.getSummary(): String = in BatteryDiffEntry() method
122 private fun BatteryDiffEntry.startBatteryDetailPage() { in startBatteryDetailPage() method
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/spa/app/appinfo/
DAppBatteryPreferenceTest.kt39 import com.android.settings.fuelgauge.batteryusage.BatteryDiffEntry
80 private fun mockBatteryDiffEntry(batteryDiffEntry: BatteryDiffEntry?) { in mockBatteryDiffEntry()
131 val batteryDiffEntry = mock<BatteryDiffEntry>().apply { mConsumePower = 0.0 } in noConsumePower()
143 val batteryDiffEntry = mock<BatteryDiffEntry> { in hasConsumePower()
155 val batteryDiffEntry = mock<BatteryDiffEntry> { in whenClick_openDetailsPage()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DAppBatteryPreferenceControllerTest.java42 import com.android.settings.fuelgauge.batteryusage.BatteryDiffEntry;
84 private BatteryDiffEntry mBatteryDiffEntry;
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DAdvancedPowerUsageDetailTest.java52 import com.android.settings.fuelgauge.batteryusage.BatteryDiffEntry;
125 private BatteryDiffEntry mBatteryDiffEntry;
176 new BatteryDiffEntry( in setUp()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DAdvancedPowerUsageDetail.java47 import com.android.settings.fuelgauge.batteryusage.BatteryDiffEntry;
132 BatteryDiffEntry diffEntry, in startBatteryDetailPage()