Merge "Fix b/277880435: System battery settings app crash" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6ad5b9a5f3
@@ -296,6 +296,10 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
|
|||||||
});
|
});
|
||||||
mHourlyChartView = hourlyChartView;
|
mHourlyChartView = hourlyChartView;
|
||||||
mHourlyChartView.setOnSelectListener(trapezoidIndex -> {
|
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) {
|
if (mHourlyChartIndex == trapezoidIndex) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user