Fix crash where DB becomes blocked, add test for Palina Parcelable
Summary:
- Review code for Databases, using the same Singleton pattern and never closing them manually. This fixes a crash due to database lockup.
- Make check for DB version inside the DB update checker worker
- Refactor NearbyStopsFragment to use ViewModel, fixing case with database update running
- Show correct message in Nearby if there is not a position found yet switching to Arrivals
- Add test for Parcelable implementation of Palina
Test Plan:
On previous version, try deleting all application data and then reopening it. This should trigger the DB lockup.
Check that in this diff the problem is gone.
Reviewers: Libre BusTO hackers, valerio.bozzolan
Reviewed By: Libre BusTO hackers, valerio.bozzolan
Subscribers: valerio.bozzolan
Project Tags: Libre BusTO
Differential Revision: https://gitpull.it/D235