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

Skip to content
Commit c76bb787 authored by jackqdyulei's avatar jackqdyulei
Browse files

Make BatteryDatabaseManager singleton

In BatteryTipLoader, two threads may access BatteryDatabaseManager
simultaneously. In this case thread A may close the database thread B
holds, then settings will crash.

In this cl, we make the BatteryDatabaseManager as singleton and
synchronize all the database related method. Then it shouldn't have
the crash anymore.

Bug: 73346734
Test: RunSettingsRoboTests
Change-Id: Ib53b2894b25155cca0c6ec60d1a816663d27a578
parent 1bbe424e
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