Move the indexing back into DatabaseIndexingManager
For the sake of incremental updates, we moved all of the conversion from PreIndexData to IndexData, and the insertion of the rows into the SQLite DB into a new class, IndexDataConverter. However, it's real role is just to convert PreIndexData into IndexData. So this CL moves the insertion of the rows back into DatabaseIndexingManager. Again, for the sake of simplicity, I did not change the conversion flow. Rather, instead of inserting a row at the end of the conversion, I just put it into a list which is then returned. This lets me move the tests to appropriate locations, without having to change them too much. In the tests, the references to real xml layouts are changed to fake references. Hooray for being less brittle. IndexDataConverter now just tests that the IndexData has the appropriate data from PreIndexdData. Independently, we test that IndexData gets inserted in DatabaseIndexingManager. In the next CL, I'll refactor the conversion flow for readability. Bug: 33577327 Test: make RunSettingsRoboTests Test: Took a database dump before and after change, and they were the same. Cool. Change-Id: I39cc812d1f736e13a0a51af50984c239961ecf7a
Loading
Please register or sign in to comment