Home
last modified time | relevance | path

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

/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryDiffEntryTest.java71 BatteryDiffEntry.clearCache(); in setUp()
76 final BatteryDiffEntry entry = in testSetTotalConsumePower_returnExpectedResult()
77 new BatteryDiffEntry( in testSetTotalConsumePower_returnExpectedResult()
90 final BatteryDiffEntry entry = in testSetTotalConsumePower_setZeroValue_returnsZeroValue()
91 new BatteryDiffEntry( in testSetTotalConsumePower_setZeroValue_returnsZeroValue()
104 final List<BatteryDiffEntry> entryList = new ArrayList<>(); in testComparator_sortCollectionsInDescOrder()
109 Collections.sort(entryList, BatteryDiffEntry.COMPARATOR); in testComparator_sortCollectionsInDescOrder()
126 final BatteryDiffEntry entry = createBatteryDiffEntry(10, batteryHistEntry); in testLoadLabelAndIcon_forSystemBattery_returnExpectedResult()
130 assertThat(BatteryDiffEntry.sResourceCache).hasSize(1); in testLoadLabelAndIcon_forSystemBattery_returnExpectedResult()
133 BatteryDiffEntry.sResourceCache.get(entry.getKey()); in testLoadLabelAndIcon_forSystemBattery_returnExpectedResult()
[all …]
DBatteryChartPreferenceControllerTest.java92 private BatteryDiffEntry mBatteryDiffEntry;
113 mBatteryDiffEntry = new BatteryDiffEntry( in setUp()
121 BatteryDiffEntry.sResourceCache.put( in setUp()
135 assertThat(BatteryDiffEntry.sResourceCache).hasSize(1); in testOnResume_uiModeIsChanged_clearBatteryDiffEntryCache()
141 assertThat(BatteryDiffEntry.sResourceCache).isEmpty(); in testOnResume_uiModeIsChanged_clearBatteryDiffEntryCache()
151 assertThat(BatteryDiffEntry.sResourceCache).hasSize(1); in testOnResume_uiModeIsNotChanged_notClearBatteryDiffEntryCache()
154 assertThat(BatteryDiffEntry.sResourceCache).isNotEmpty(); in testOnResume_uiModeIsNotChanged_notClearBatteryDiffEntryCache()
163 assertThat(BatteryDiffEntry.sResourceCache).hasSize(1); in testOnDestroy_activityIsChanging_clearBatteryEntryCache()
166 assertThat(BatteryDiffEntry.sResourceCache).isEmpty(); in testOnDestroy_activityIsChanging_clearBatteryEntryCache()
173 assertThat(BatteryDiffEntry.sResourceCache).hasSize(1); in testOnDestroy_activityIsNotChanging_notClearBatteryEntryCache()
[all …]
DConvertUtilsTest.java217 final Map<Integer, List<BatteryDiffEntry>> resultMap = in testGetIndexedUsageMap_returnsExpectedResult()
224 List<BatteryDiffEntry> entryList = resultMap.get(Integer.valueOf(0)); in testGetIndexedUsageMap_returnsExpectedResult()
242 final Map<Integer, List<BatteryDiffEntry>> purgedResultMap = in testGetIndexedUsageMap_returnsExpectedResult()
270 final List<BatteryDiffEntry> batteryDiffEntryList = in testGetIndexedUsageMap_returnsExpectedResult()
274 final BatteryDiffEntry resultEntry = batteryDiffEntryList.get(0); in testGetIndexedUsageMap_returnsExpectedResult()
301 final Map<Integer, List<BatteryDiffEntry>> purgedResultMap = in testGetIndexedUsageMap_usageTimeExceed_returnsExpectedResult()
307 final List<BatteryDiffEntry> entryList = purgedResultMap.get(0); in testGetIndexedUsageMap_usageTimeExceed_returnsExpectedResult()
311 final BatteryDiffEntry resultEntry = entryList.get(0); in testGetIndexedUsageMap_usageTimeExceed_returnsExpectedResult()
422 BatteryDiffEntry entry, int percentOfTotal, in assertBatteryDiffEntry()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DConvertUtils.java172 public static Map<Integer, List<BatteryDiffEntry>> getIndexedUsageMap( in getIndexedUsageMap()
181 final Map<Integer, List<BatteryDiffEntry>> resultMap = new HashMap<>(); in getIndexedUsageMap()
207 resultMap.put(Integer.valueOf(index), new ArrayList<BatteryDiffEntry>()); in getIndexedUsageMap()
218 final List<BatteryDiffEntry> batteryDiffEntryList = new ArrayList<>(); in getIndexedUsageMap()
277 new BatteryDiffEntry( in getIndexedUsageMap()
285 for (BatteryDiffEntry diffEntry : batteryDiffEntryList) { in getIndexedUsageMap()
298 final Map<Integer, List<BatteryDiffEntry>> indexedUsageMap) { in insert24HoursData()
299 final Map<String, BatteryDiffEntry> resultMap = new HashMap<>(); in insert24HoursData()
302 for (List<BatteryDiffEntry> entryList : indexedUsageMap.values()) { in insert24HoursData()
303 for (BatteryDiffEntry entry : entryList) { in insert24HoursData()
[all …]
DBatteryChartPreferenceController.java83 Map<Integer, List<BatteryDiffEntry>> mBatteryIndexedMap;
113 final List<BatteryDiffEntry> mSystemEntries = new ArrayList<>();
155 BatteryDiffEntry.clearCache(); in onResume()
176 BatteryDiffEntry.clearCache(); in onDestroy()
217 final BatteryDiffEntry diffEntry = powerPref.getBatteryDiffEntry(); in handlePreferenceTreeClick()
347 final List<BatteryDiffEntry> entries = in addAllPreferences()
355 final List<BatteryDiffEntry> appEntries = new ArrayList<>(); in addAllPreferences()
373 Collections.sort(appEntries, BatteryDiffEntry.COMPARATOR); in addAllPreferences()
374 Collections.sort(mSystemEntries, BatteryDiffEntry.COMPARATOR); in addAllPreferences()
397 void addPreferenceToScreen(List<BatteryDiffEntry> entries) { in addPreferenceToScreen()
[all …]
DBatteryDiffEntry.java36 public class BatteryDiffEntry { class
46 public static final Comparator<BatteryDiffEntry> COMPARATOR =
67 public BatteryDiffEntry( in BatteryDiffEntry() method in BatteryDiffEntry
94 public BatteryDiffEntry clone() { in clone()
95 return new BatteryDiffEntry( in clone()
DPowerGaugePreference.java40 private BatteryDiffEntry mBatteryDiffEntry;
102 public void setBatteryDiffEntry(BatteryDiffEntry entry) { in setBatteryDiffEntry()
110 BatteryDiffEntry getBatteryDiffEntry() { in getBatteryDiffEntry()
DAdvancedPowerUsageDetail.java138 BatteryDiffEntry diffEntry, String usagePercent, in startBatteryDetailPage()
/packages/apps/Settings/src/com/android/settings/applications/appinfo/
DAppBatteryPreferenceController.java42 import com.android.settings.fuelgauge.BatteryDiffEntry;
72 BatteryDiffEntry mBatteryDiffEntry;
173 new AsyncTask<Void, Void, BatteryDiffEntry>() { in loadBatteryDiffEntries()
175 protected BatteryDiffEntry doInBackground(Void... unused) { in loadBatteryDiffEntries()
179 final List<BatteryDiffEntry> batteryDiffEntries = in loadBatteryDiffEntries()
206 protected void onPostExecute(BatteryDiffEntry batteryDiffEntry) { in loadBatteryDiffEntries()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DAppBatteryPreferenceControllerTest.java42 import com.android.settings.fuelgauge.BatteryDiffEntry;
81 private BatteryDiffEntry mBatteryDiffEntry;