Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8d0030d8 authored by Zaiyue Xue's avatar Zaiyue Xue
Browse files

Fix b/241872474 Battery usage page will crash when selecting the last hour...

Fix b/241872474 Battery usage page will crash when selecting the last hour chart bar, going to app detail page, and going back

This bug is because we always use mHourlyChartIndex to construct
every view model in mHoulyViewModels. However, mHourlyChartIndex could
be got from saved instance. So mHourlyChartIndex may be out of bound in
some hourly view model which has not many hours data.

This fix removes the selectedIndex in BatteryChartViewModel constructor. Suppose the selectedIndex should be set everytime the view model is used.

Test: manual
Bug: 236101166
Bug: 241872474
Change-Id: I0bb5568ac33fcc23c406fe3af308b8d2706c5542
parent 248895db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment