This fixes the following bugs:
- Sort category is forgotten after lock/unlock
- The sort mode is not respected for new entries
I got a little carried away while working on this patch and also included the
following other enhancements:
- Simplify the SortCategory, Theme and ViewMode enums
- Simplify usage of string resources
- Don't call notifyDataSetChanged and runLayoutAnimation unnecessarily
Summary:
- Combine app and file importers into one type
- Split encrypted and plain text file logic into separate DatabaseImporter.State
classes
- Add an abstract FileReader class that can handle reading from apps and files
The idea is that every importer implements its own UI logic to obtain
credentials for decryption through a dialog. Aegis databases are still an
exception to this rule as it still uses an Activity to ask for credentials. This
will be addressed in a future patch.
As a result of this change all app importers are now also available under
"Import from file".
Move onScroll to seperate class to avoid duplicate code
Move importing logic back to the PreferencesFragment
Add minor changes
Add ImportEntry to properly track checked states
Minor layout changes