root cause:
the `_prefTitle` is saved in `CharSequence`
solution:
we only able to store `CharSequence` since `Preference.getTitleRes` is removed in AndroidX. As a workaround, we update the title again on Fragment.onStart()
This reduces the chance that we flashbang the user when they launch the
app. The issue remains on older Android versions that don't natively
support dark mode, but I don't think that's fixable.
Activities override the theme based on the user's settings, so this
change only has effect while the app is launching.
This patch addresses the following:
- More consistent offsets between entries in the list, especially in
relation to the action bar and the error card.
- Consistent correct application of card shapes when switching between
favoriting and unfavoriting entries.
- Removal of CompactDividerDecoration. We no longer uses dividers, so
this is no longer needed.
Previously, the dark background colors would not be applied for this
combination of settings.
Unfortunately, I couldn't find a way to avoid some duplication in
themes.xml.
I set CompactDividerDecoration to transparant, because that was already
effectively the case. I think we can remove this class entirely, but
I'll do that in a separate PR.
In rare cases where writing to disk fails after the intro, a crash could
occur if the user presses "Done" again. VaultManager would have been
initialized, and trying to initialize it again would result in a crash.
This fixes an issue where the entry list items no longer animated upon
move, insert, delete, etc.
RecyclerView's DefaultItemAnimator automatically scales the animations
according to the user's settings.
Introduced in 9ff8efab69
This should fix the following crash:
```
Exception java.lang.IndexOutOfBoundsException: setSpan (-1 ... 0) starts before 0
at android.text.SpannableStringInternal.checkRange (SpannableStringInternal.java:499)
at android.text.SpannableStringInternal.setSpan (SpannableStringInternal.java:199)
at android.text.SpannableStringInternal.setSpan (SpannableStringInternal.java:186)
at android.text.SpannableString.setSpan (SpannableString.java:60)
at com.beemdevelopment.aegis.ui.views.EntryAdapter$FooterView.refresh (EntryAdapter.java:596)
```
This trades performance for making VaultManager a bit easier to reason
about.
This also fixes a rare crash that could occur if the user retries to unlock
the app after the previous attempt resulted in an error related to
parsing the vault. The vault file would no longer be present in memory
after the first attempt, causing the second attempt to crash the app.
Icon packs may have very generic issuers for their icons (like [aegis-simple-icons](https://github.com/alexbakker/aegis-simple-icons)).
For example, this causes the icon assigning view to suggest the "C" icon for every
entry that contains a "c".
This patch addresses that by giving inverse matches (where the entry
issuer contains the icon issuer) a lower position in the suggested icons
list.
This is mostly a cleanup of the way we do Glide in-memory caching. It
also fixes a few minor issues along the way:
- Entry icon cache keys were based on entry UUID's. This could cause
problems when changing an entry's icon.
- A TextDrawable could get replaced by the icon of a different entry
when scrolling through the entry list quickly.
Some people have managed to snatch the OTP details from Steam using
Xposed while it is being decrypted by the app. Aegis still won't be
able to do the decryption part, but we can add support for importing
the decrypted JSON blob, which only differs slightly from the old
format.
Users understandably get confused by the "No persisted URI permissions"
error. This patch adds some text to the dialog explaining why this
happened and how the user can fix the issue.
This permission issue can happen for one of two reasons:
- The user made a change to the backup destination (renamed, moved,
deleted, etc)
- Aegis was restored from an Android backup
This patch addresses two issues:
- The entry selection icon would flicker when a non-1x animator
duration scale was set.
- The advanced entry field animation was not shown if the animator
duration scale was set to .5x, due to a rounding error.
Introduced in: 9ff8efab69
Wrapping a ``RecyclerView`` with a ``NestedScrollView`` breaks its recycling
functionality because the view height is stretched to fit the full list
of entries.
We never noticed performance issues in these two cases because these
lists never get very long. Let's fix these cases anyway so that we
don't accidentally base a new use of a ``RecyclerView`` on this broken
pattern.
Also renamed ``list_slots`` to ``list_groups``. Must have been
a copy-paste error.
Some users understandably get confused when they try to import a backup
file from a different 2FA app during the intro and then get greeted
with an error dialog.
This changes the button text to "Import Aegis vault" and adds a small
hint text in the hope that this makes the limitations of the intro more
clear to the user.
<img width="200" src="https://alexbakker.me/u/jzhh3bk30w.png" />
Apparently ``getQsTile()`` can return null, which resulted in a crash.
Reported through the Google Play Console:
```
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'void android.service.quicksettings.Tile.setState(int)' on a null object reference
at com.beemdevelopment.aegis.services.LaunchAppTileService.onStartListening
at android.service.quicksettings.TileService$H.handleMessage (TileService.java:488)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:205)
at android.os.Looper.loop (Looper.java:294)
at android.app.ActivityThread.main (ActivityThread.java:8177)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:971)
```
This introduces a new (optional) 'name' field for iconpack icons. It
will be used to describe the icon in the icon selection dialog. If it is
not present, the name of the icon will be derived from the filename,
like before. Using this new field allows usage of more exotic characters
in the icon name that are not allowed in a filename.
This adds support for Authenticator Pro's latest backup format changes.
The format of the content itself has not changed as far as I can tell, but
they do use a different cipher and KDF now: AES GCM and Argon2id,
respectively.
The memory cost is statically set at 64MiB. I suspect that this may
cause OOM situations on some lower-end devices, but we'll see, not much
we can do about that right now without making more changes.
Fixed issue caused by supplying the VaultEntry with the Base32 encoded string rather than the raw secret
Added blizzard package to manifest so Aegis is allowed to query whether the app is installed
Fixed VaultEntry to be more inline with other entries
Removed the unnecessary encoding of the secret as it is used as is without encoding and changed the way the TotpInfo object is supplied with the relevant information.
Credits to alexbakker (https://github.com/beemdevelopment/Aegis/pull/1032#pullrequestreview-1203477313)
This forcefully resets any HOTP/TOTP entries that were using MD5 back to
SHA1, because users could only configure this by mistake. No website should be
using it, as the HOTP algorithm was not made to be compatible with the
hash length of MD5.