Support mouse hover event for BatteryChartView to highlight slot

https://drive.google.com/file/d/19Ms4JOPVfQ6rfXr71vTeXJLSvJqJtRfw/

Bug: 201501553
Test: make SettingsRoboTests
Change-Id: I2c03585163ddb7809a09944aec326a41f6bd4758
This commit is contained in:
ykhung
2021-10-06 15:41:23 +08:00
committed by YUKAI HUNG
parent d1dd4cdf2c
commit 8eff5cc17e
2 changed files with 40 additions and 7 deletions

View File

@@ -350,7 +350,7 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
private void addAllPreferences() {
final List<BatteryDiffEntry> entries =
mBatteryIndexedMap.get(Integer.valueOf(mTrapezoidIndex));
addFooterPreferenceIfNeeded(!entries.isEmpty());
addFooterPreferenceIfNeeded(entries != null && !entries.isEmpty());
if (entries == null) {
Log.w(TAG, "cannot find BatteryDiffEntry for:" + mTrapezoidIndex);
return;