This fixes a NullPointerException that would occur when restoring from
savedInstanceState due to getSupportActionBar returning null. It also removes
the theme definitions from AndroidManifest as we override those anyway.
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
* Typos in strings
- Double space.
- Missing verb in sentence. "need" makes sense here.
- Equal is a verb suitable for speaking of strings. For a final user, identical is more understandable.
* French translation
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
Funny story. Instead of obtaining the actual bytes from the ByteBuffer in the
password encode function, we obtained the entire buffer. This caused some
trailing null bytes to be added to the encoded password. Luckily (and
strangely), PBKDF2 produces collisions for inputs with trailing null bytes and
thus scrypt does this as well. As such, this bug doesn't affect us right now,
but it would if we were to use that encode function for other purposes in the
future.
This also adds a test that checks for the expected collision behavior of scrypt.
This adds an option to automatically lock the app when:
* The back button is pressed
* The device is locked
It's the first step towards implementing #7