Fix b/277880435: System battery settings app crash
Bug: 277880435 Fix: 277880435 Test: manual Change-Id: I369c04584c95c13e8636b5c9713e26e528ab627a
This commit is contained in:
@@ -296,6 +296,10 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
|
||||
});
|
||||
mHourlyChartView = hourlyChartView;
|
||||
mHourlyChartView.setOnSelectListener(trapezoidIndex -> {
|
||||
if (mDailyChartIndex == BatteryChartViewModel.SELECTED_INDEX_ALL) {
|
||||
// This will happen when a daily slot and an hour slot are clicked together.
|
||||
return;
|
||||
}
|
||||
if (mHourlyChartIndex == trapezoidIndex) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user