Skip to content
Commit 1ce0161e authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Extracted persistence layer into a separate class

Introduced AccountsDb class and moved all DB-accessing methods there.
The methods are organized by the database:
- DeDatabaseHelper - provides access to accounts_de data
- CeDatabaseHelper - access to accounts_ce
- PreNDatabaseHelper - migration logic from a pre-N single database to two databases in N
- DebugDbHelper - debug table + helper methods

Notable improvements:
- logRecord methods no longer opens SQLiteDatabase (it was actually unused
  down in the call chain)
- Clean separation between business and persistence logic - no more
  sql statements concatenation in the AMS code.

Test: Refactoring CL.

Bug: 30639520
Change-Id: I41bd1abe47a23efbc735344413f32cbb68a5c8af
parent 7ea61d28
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment