« Previous | Next » 

Revision 3ebad383

Parent 9703350f
Child ce3f2109

Added by Peter Serwylo almost 4 years ago

Refactored the recent MR for dynamicly adding default repos.

The idea was good: reduce the amount of copied/pasted code
where ContentValues were initialized, populated, then inserted.
I've kept the idea, by putting it in its own method which is
called twice. But the resources are not loaded dynamically any
more. This is so that the compiler will be able to pick up if
we reference a missing resource. Also, I took the opportunity
to replace the field name string literals with references to
RepoProvider.DataColumns.* constants.

Finally, changed the tests around because now we need to
have the "getInteger()" call mocked in resources correctly
(for priority/inUse).


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences