/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | BatteryHistEntryTest.java | 77 new BatteryHistEntry(values), in testConstructor_contentValues_returnsExpectedResult() 84 final BatteryHistEntry entry = new BatteryHistEntry(new ContentValues()); in testConstructor_invalidField_returnsInvalidEntry() 107 values.put(BatteryHistEntry.KEY_UID, 3); in testGetKey_consumerUidType_returnExpectedString() 108 final BatteryHistEntry batteryHistEntry = new BatteryHistEntry(values); in testGetKey_consumerUidType_returnExpectedString() 117 values.put(BatteryHistEntry.KEY_USER_ID, 2); in testGetKey_consumerUserType_returnExpectedString() 118 final BatteryHistEntry batteryHistEntry = new BatteryHistEntry(values); in testGetKey_consumerUserType_returnExpectedString() 127 values.put(BatteryHistEntry.KEY_DRAIN_TYPE, 1); in testGetKey_consumerSystemType_returnExpectedString() 128 final BatteryHistEntry batteryHistEntry = new BatteryHistEntry(values); in testGetKey_consumerSystemType_returnExpectedString() 169 final BatteryHistEntry lowerHistEntry = createBatteryHistEntry( in testInterpolate_returnExpectedResult() 177 final BatteryHistEntry upperHistEntry = createBatteryHistEntry( in testInterpolate_returnExpectedResult() [all …]
|
D | ConvertUtilsTest.java | 94 assertThat(values.getAsLong(BatteryHistEntry.KEY_UID)).isEqualTo(1001L); in testConvert_returnsExpectedContentValues() 95 assertThat(values.getAsLong(BatteryHistEntry.KEY_USER_ID)) in testConvert_returnsExpectedContentValues() 97 assertThat(values.getAsString(BatteryHistEntry.KEY_APP_LABEL)) in testConvert_returnsExpectedContentValues() 99 assertThat(values.getAsString(BatteryHistEntry.KEY_PACKAGE_NAME)) in testConvert_returnsExpectedContentValues() 101 assertThat(values.getAsBoolean(BatteryHistEntry.KEY_IS_HIDDEN)).isTrue(); in testConvert_returnsExpectedContentValues() 102 assertThat(values.getAsLong(BatteryHistEntry.KEY_BOOT_TIMESTAMP)) in testConvert_returnsExpectedContentValues() 104 assertThat(values.getAsLong(BatteryHistEntry.KEY_TIMESTAMP)).isEqualTo(10001L); in testConvert_returnsExpectedContentValues() 105 assertThat(values.getAsString(BatteryHistEntry.KEY_ZONE_ID)) in testConvert_returnsExpectedContentValues() 107 assertThat(values.getAsDouble(BatteryHistEntry.KEY_TOTAL_POWER)).isEqualTo(5.1); in testConvert_returnsExpectedContentValues() 108 assertThat(values.getAsDouble(BatteryHistEntry.KEY_CONSUME_POWER)).isEqualTo(1.1); in testConvert_returnsExpectedContentValues() [all …]
|
D | BatteryDiffEntryTest.java | 61 @Mock private BatteryHistEntry mBatteryHistEntry; 124 final BatteryHistEntry batteryHistEntry = new BatteryHistEntry(values); in testLoadLabelAndIcon_forSystemBattery_returnExpectedResult() 149 final BatteryHistEntry batteryHistEntry = new BatteryHistEntry(values); in testLoadLabelAndIcon_forUserBattery_returnExpectedResult() 179 final BatteryHistEntry batteryHistEntry = new BatteryHistEntry(values); in testGetAppLabel_loadDataFromApplicationInfo() 200 final BatteryHistEntry batteryHistEntry = new BatteryHistEntry(values); in testGetAppLabel_loadDataFromPreDefinedNameAndUid() 218 final BatteryHistEntry batteryHistEntry = new BatteryHistEntry(values); in testGetAppLabel_nullAppLabel_returnAppLabelInBatteryHistEntry() 231 final BatteryHistEntry batteryHistEntry = new BatteryHistEntry(values); in testGetAppIcon_nonUidConsumer_returnAppIconInBatteryDiffEntry() 349 createBatteryDiffEntry(10, new BatteryHistEntry(values)); in testUpdateRestrictionFlagState_updateFlagAsExpected() 381 createBatteryDiffEntry(10, new BatteryHistEntry(values)); in testGetPackageName_returnExpectedResult() 395 createBatteryDiffEntry(10, new BatteryHistEntry(values)); in testGetPackageName_withProcessName_returnExpectedResult() [all …]
|
D | BatteryChartPreferenceControllerTest.java | 82 @Mock private BatteryHistEntry mBatteryHistEntry; 700 private static Map<Long, Map<String, BatteryHistEntry>> createBatteryHistoryMap() { in createBatteryHistoryMap() 701 final Map<Long, Map<String, BatteryHistEntry>> batteryHistoryMap = new HashMap<>(); in createBatteryHistoryMap() 705 final BatteryHistEntry entry = new BatteryHistEntry(values); in createBatteryHistoryMap() 706 final Map<String, BatteryHistEntry> entryMap = new HashMap<>(); in createBatteryHistoryMap()
|
D | BatteryHistoryLoaderTest.java | 53 final Map<Long, Map<String, BatteryHistEntry>> batteryHistoryMap = new HashMap<>(); in testLoadIBackground_returnsMapFromPowerFeatureProvider()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | ConvertUtils.java | 46 private static final Map<String, BatteryHistEntry> EMPTY_BATTERY_MAP = new HashMap<>(); 47 private static final BatteryHistEntry EMPTY_BATTERY_HIST_ENTRY = 48 new BatteryHistEntry(new ContentValues()); 104 values.put(BatteryHistEntry.KEY_UID, Long.valueOf(entry.getUid())); in convert() 105 values.put(BatteryHistEntry.KEY_USER_ID, in convert() 107 values.put(BatteryHistEntry.KEY_APP_LABEL, entry.getLabel()); in convert() 108 values.put(BatteryHistEntry.KEY_PACKAGE_NAME, in convert() 110 values.put(BatteryHistEntry.KEY_IS_HIDDEN, Boolean.valueOf(entry.isHidden())); in convert() 111 values.put(BatteryHistEntry.KEY_TOTAL_POWER, in convert() 113 values.put(BatteryHistEntry.KEY_CONSUME_POWER, in convert() [all …]
|
D | BatteryHistEntry.java | 24 public class BatteryHistEntry { class 77 public BatteryHistEntry(ContentValues values) { in BatteryHistEntry() method in BatteryHistEntry 98 public BatteryHistEntry(Cursor cursor) { in BatteryHistEntry() method in BatteryHistEntry 119 private BatteryHistEntry( in BatteryHistEntry() method in BatteryHistEntry 120 BatteryHistEntry fromEntry, in BatteryHistEntry() 294 public static BatteryHistEntry interpolate( in interpolate() 298 BatteryHistEntry lowerHistEntry, in interpolate() 299 BatteryHistEntry upperHistEntry) { in interpolate() 333 return new BatteryHistEntry( in interpolate()
|
D | PowerUsageAdvanced.java | 55 Map<Long, Map<String, BatteryHistEntry>> mBatteryHistoryMap; 213 implements LoaderManager.LoaderCallbacks<Map<Long, Map<String, BatteryHistEntry>>> { 218 public Loader<Map<Long, Map<String, BatteryHistEntry>>> onCreateLoader( in onCreateLoader() 225 public void onLoadFinished(Loader<Map<Long, Map<String, BatteryHistEntry>>> loader, in onLoadFinished() 226 Map<Long, Map<String, BatteryHistEntry>> batteryHistoryMap) { in onLoadFinished() 232 public void onLoaderReset(Loader<Map<Long, Map<String, BatteryHistEntry>>> loader) { in onLoaderReset()
|
D | BatteryHistoryLoader.java | 27 extends AsyncLoaderCompat<Map<Long, Map<String, BatteryHistEntry>>> { 38 protected void onDiscardResult(Map<Long, Map<String, BatteryHistEntry>> result) { in onDiscardResult() 42 public Map<Long, Map<String, BatteryHistEntry>> loadInBackground() { in loadInBackground()
|
D | BatteryChartPreferenceController.java | 218 final BatteryHistEntry histEntry = diffEntry.mBatteryHistEntry; in handlePreferenceTreeClick() 259 final Map<Long, Map<String, BatteryHistEntry>> batteryHistoryMap) { in setBatteryHistoryMap() 272 final Map<String, BatteryHistEntry> entryMap = batteryHistoryMap.get(timestamp); in setBatteryHistoryMap() 280 for (BatteryHistEntry entry : entryMap.values()) { in setBatteryHistoryMap() 618 final Map<Long, Map<String, BatteryHistEntry>> batteryHistoryMap = in getBatteryLast24HrUsageData() 638 final Map<Long, Map<String, BatteryHistEntry>> batteryHistoryMap) { in getBatteryHistoryKeys() 654 private Map<Long, Map<String, BatteryHistEntry>> mBatteryHistoryMap; 657 Map<Long, Map<String, BatteryHistEntry>> batteryHistoryMap) { in LoadAllItemsInfoTask()
|
D | BatteryDiffEntry.java | 53 public final BatteryHistEntry mBatteryHistEntry; 72 BatteryHistEntry batteryHistEntry) { in BatteryDiffEntry()
|
D | PowerUsageFeatureProvider.java | 143 Map<Long, Map<String, BatteryHistEntry>> getBatteryHistory(Context context); in getBatteryHistory()
|
D | PowerUsageFeatureProviderImpl.java | 167 public Map<Long, Map<String, BatteryHistEntry>> getBatteryHistory(Context context) { in getBatteryHistory()
|
D | AdvancedPowerUsageDetail.java | 140 final BatteryHistEntry histEntry = diffEntry.mBatteryHistEntry; in startBatteryDetailPage()
|